scsi: qla2xxx: Add option to disable FC2 Target support
[ Upstream commit877b03795f
] Commit44c57f2058
("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. Link: https://lore.kernel.org/r/20230208152014.109214-1-dwagner@suse.de Signed-off-by: Daniel Wagner <dwagner@suse.de> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
27f6579f3c
commit
b139678fb1
@ -192,6 +192,7 @@ extern int ql2xsecenable;
|
|||||||
extern int ql2xenforce_iocb_limit;
|
extern int ql2xenforce_iocb_limit;
|
||||||
extern int ql2xabts_wait_nvme;
|
extern int ql2xabts_wait_nvme;
|
||||||
extern u32 ql2xnvme_queues;
|
extern u32 ql2xnvme_queues;
|
||||||
|
extern int ql2xfc2target;
|
||||||
|
|
||||||
extern int qla2x00_loop_reset(scsi_qla_host_t *);
|
extern int qla2x00_loop_reset(scsi_qla_host_t *);
|
||||||
extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
|
extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
|
||||||
|
@ -1841,7 +1841,8 @@ void qla2x00_handle_rscn(scsi_qla_host_t *vha, struct event_arg *ea)
|
|||||||
case RSCN_PORT_ADDR:
|
case RSCN_PORT_ADDR:
|
||||||
fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1);
|
fcport = qla2x00_find_fcport_by_nportid(vha, &ea->id, 1);
|
||||||
if (fcport) {
|
if (fcport) {
|
||||||
if (fcport->flags & FCF_FCP2_DEVICE &&
|
if (ql2xfc2target &&
|
||||||
|
fcport->flags & FCF_FCP2_DEVICE &&
|
||||||
atomic_read(&fcport->state) == FCS_ONLINE) {
|
atomic_read(&fcport->state) == FCS_ONLINE) {
|
||||||
ql_dbg(ql_dbg_disc, vha, 0x2115,
|
ql_dbg(ql_dbg_disc, vha, 0x2115,
|
||||||
"Delaying session delete for FCP2 portid=%06x %8phC ",
|
"Delaying session delete for FCP2 portid=%06x %8phC ",
|
||||||
|
@ -360,6 +360,13 @@ MODULE_PARM_DESC(ql2xnvme_queues,
|
|||||||
"1 - Minimum number of queues supported\n"
|
"1 - Minimum number of queues supported\n"
|
||||||
"8 - Default value");
|
"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;
|
static struct scsi_transport_template *qla2xxx_transport_template = NULL;
|
||||||
struct scsi_transport_template *qla2xxx_transport_vport_template = NULL;
|
struct scsi_transport_template *qla2xxx_transport_vport_template = NULL;
|
||||||
|
|
||||||
@ -4087,7 +4094,8 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *vha)
|
|||||||
"Mark all dev lost\n");
|
"Mark all dev lost\n");
|
||||||
|
|
||||||
list_for_each_entry(fcport, &vha->vp_fcports, list) {
|
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->flags & FCF_FCP2_DEVICE) &&
|
||||||
fcport->port_type == FCT_TARGET &&
|
fcport->port_type == FCT_TARGET &&
|
||||||
!qla2x00_reset_active(vha)) {
|
!qla2x00_reset_active(vha)) {
|
||||||
|
Reference in New Issue
Block a user