Message ID | 20230208152014.109214-1-dwagner@suse.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 877b03795fcf29ff2e2351f7e574ecc9b9c51732 |
Headers | show |
Series | qla2xxx: Add option to disable FC2 Target support | expand |
On Wed, Feb 08, 2023 at 04:20:14PM +0100, Daniel Wagner wrote: > 44c57f205876 ("scsi: qla2xxx: Changes to support FCP2 Target") added > support for FC2 Targets. Unfortunately, there are older setups which > break with this new feature enabled. > > Allow to disable it via module option. > > Signed-off-by: Daniel Wagner <dwagner@suse.de> > --- > > We got two bug reports, one which dependend on revert of the above mentioned > commit to fix their setup and one which depended on this commit to present to > fix their setup. The only way I see how we can help out here is to make the > feature optional. ping
> On Feb 8, 2023, at 7:20 AM, Daniel Wagner <dwagner@suse.de> wrote: > > 44c57f205876 ("scsi: qla2xxx: Changes to support FCP2 Target") added > support for FC2 Targets. Unfortunately, there are older setups which > break with this new feature enabled. > > Allow to disable it via module option. > > Signed-off-by: Daniel Wagner <dwagner@suse.de> > --- > > We got two bug reports, one which dependend on revert of the above mentioned > commit to fix their setup and one which depended on this commit to present to > fix their setup. The only way I see how we can help out here is to make the > feature optional. > > drivers/scsi/qla2xxx/qla_gbl.h | 1 + > drivers/scsi/qla2xxx/qla_init.c | 3 ++- > drivers/scsi/qla2xxx/qla_os.c | 10 +++++++++- > 3 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h > index e3256e721be1..ee54207fc531 100644 > --- a/drivers/scsi/qla2xxx/qla_gbl.h > +++ b/drivers/scsi/qla2xxx/qla_gbl.h > @@ -192,6 +192,7 @@ extern int ql2xsecenable; > extern int ql2xenforce_iocb_limit; > extern int ql2xabts_wait_nvme; > extern u32 ql2xnvme_queues; > +extern int ql2xfc2target; > > extern int qla2x00_loop_reset(scsi_qla_host_t *); > extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); > diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c > index 8d9ecabb1aac..a6a08d475f5f 100644 > --- a/drivers/scsi/qla2xxx/qla_init.c > +++ b/drivers/scsi/qla2xxx/qla_init.c > @@ -1839,7 +1839,8 @@ void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea) > case RSCN_PORT_ADDR: > fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1); > if (fcport) { > - if (fcport->flags & FCF_FCP2_DEVICE && > + if (ql2xfc2target && > + fcport->flags & FCF_FCP2_DEVICE && > atomic_read(&fcport->state) == FCS_ONLINE) { > ql_dbg(ql_dbg_disc, vha, 0x2115, > "Delaying session delete for FCP2 portid=%06x %8phC ", > diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c > index 7fb28c207ee5..d7c8bf3a6f9a 100644 > --- a/drivers/scsi/qla2xxx/qla_os.c > +++ b/drivers/scsi/qla2xxx/qla_os.c > @@ -360,6 +360,13 @@ MODULE_PARM_DESC(ql2xnvme_queues, > "1 - Minimum number of queues supported\n" > "8 - Default value"); > > +int ql2xfc2target = 1; > +module_param(ql2xfc2target, int, 0444); > +MODULE_PARM_DESC(qla2xfc2target, > + "Enables FC2 Target support. " > + "0 - FC2 Target support is disabled. " > + "1 - FC2 Target support is enabled (default)."); > + > static struct scsi_transport_template *qla2xxx_transport_template = NULL; > struct scsi_transport_template *qla2xxx_transport_vport_template = NULL; > > @@ -4075,7 +4082,8 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha) > "Mark all dev lost\n"); > > list_for_each_entry(fcport, &vha->vp_fcports, list) { > - if (fcport->loop_id != FC_NO_LOOP_ID && > + if (ql2xfc2target && > + fcport->loop_id != FC_NO_LOOP_ID && > (fcport->flags & FCF_FCP2_DEVICE) && > fcport->port_type == FCT_TARGET && > !qla2x00_reset_active(vha)) { > -- > 2.35.3 > Looks Good. Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com <mailto:himanshu.madhani@oracle.com>>
On Wed, 08 Feb 2023 16:20:14 +0100, Daniel Wagner wrote: > 44c57f205876 ("scsi: qla2xxx: Changes to support FCP2 Target") added > support for FC2 Targets. Unfortunately, there are older setups which > break with this new feature enabled. > > Allow to disable it via module option. > > > [...] Applied to 6.3/scsi-fixes, thanks! [1/1] qla2xxx: Add option to disable FC2 Target support https://git.kernel.org/mkp/scsi/c/877b03795fcf
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index e3256e721be1..ee54207fc531 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -192,6 +192,7 @@ extern int ql2xsecenable; extern int ql2xenforce_iocb_limit; extern int ql2xabts_wait_nvme; extern u32 ql2xnvme_queues; +extern int ql2xfc2target; extern int qla2x00_loop_reset(scsi_qla_host_t *); extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 8d9ecabb1aac..a6a08d475f5f 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -1839,7 +1839,8 @@ void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea) case RSCN_PORT_ADDR: fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1); if (fcport) { - if (fcport->flags & FCF_FCP2_DEVICE && + if (ql2xfc2target && + fcport->flags & FCF_FCP2_DEVICE && atomic_read(&fcport->state) == FCS_ONLINE) { ql_dbg(ql_dbg_disc, vha, 0x2115, "Delaying session delete for FCP2 portid=%06x %8phC ", diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 7fb28c207ee5..d7c8bf3a6f9a 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -360,6 +360,13 @@ MODULE_PARM_DESC(ql2xnvme_queues, "1 - Minimum number of queues supported\n" "8 - Default value"); +int ql2xfc2target = 1; +module_param(ql2xfc2target, int, 0444); +MODULE_PARM_DESC(qla2xfc2target, + "Enables FC2 Target support. " + "0 - FC2 Target support is disabled. " + "1 - FC2 Target support is enabled (default)."); + static struct scsi_transport_template *qla2xxx_transport_template = NULL; struct scsi_transport_template *qla2xxx_transport_vport_template = NULL; @@ -4075,7 +4082,8 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha) "Mark all dev lost\n"); list_for_each_entry(fcport, &vha->vp_fcports, list) { - if (fcport->loop_id != FC_NO_LOOP_ID && + if (ql2xfc2target && + fcport->loop_id != FC_NO_LOOP_ID && (fcport->flags & FCF_FCP2_DEVICE) && fcport->port_type == FCT_TARGET && !qla2x00_reset_active(vha)) {
44c57f205876 ("scsi: qla2xxx: Changes to support FCP2 Target") added support for FC2 Targets. Unfortunately, there are older setups which break with this new feature enabled. Allow to disable it via module option. Signed-off-by: Daniel Wagner <dwagner@suse.de> --- We got two bug reports, one which dependend on revert of the above mentioned commit to fix their setup and one which depended on this commit to present to fix their setup. The only way I see how we can help out here is to make the feature optional. drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_init.c | 3 ++- drivers/scsi/qla2xxx/qla_os.c | 10 +++++++++- 3 files changed, 12 insertions(+), 2 deletions(-)