From: Chad Dupuis Date: Fri, 15 Oct 2010 18:27:40 +0000 (-0700) Subject: qla2xxx: Add module parameter to enable/disable GFF_ID device type check. X-Git-Tag: firefly_0821_release~9833^2~79^2^2~10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=67dfc84c731289ab4d5d7b8c5847acc0fa870db7;p=firefly-linux-kernel-4.4.55.git qla2xxx: Add module parameter to enable/disable GFF_ID device type check. commit 4da26e162b69d89c3186a35a052c05e61a555637 upstream. Add the module parameter ql2xgffidenable to disable/enable the use of the GFF_ID name server command to prevent non FCP SCSI devices from being added to the driver's internal fc_port database. Signed-off-by: Chad Dupuis Signed-off-by: Madhuranath Iyengar Signed-off-by: James Bottomley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 1a1b281cea33..16df82ac1b26 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -92,6 +92,7 @@ extern int ql2xshiftctondsd; extern int ql2xdbwr; extern int ql2xdontresethba; extern int ql2xasynctmfenable; +extern int ql2xgffidenable; extern int ql2xenabledif; extern int ql2xenablehba_err_chk; extern int ql2xtargetreset; diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 9c383baebe27..49e7b0916364 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -3258,8 +3258,9 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *vha, continue; /* Bypass ports whose FCP-4 type is not FCP_SCSI */ - if (new_fcport->fc4_type != FC4_TYPE_FCP_SCSI && - new_fcport->fc4_type != FC4_TYPE_UNKNOWN) + if (ql2xgffidenable && + (new_fcport->fc4_type != FC4_TYPE_FCP_SCSI && + new_fcport->fc4_type != FC4_TYPE_UNKNOWN)) continue; /* Locate matching device in database. */ diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 1e4bff695254..4e29d43cdbdf 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -160,6 +160,11 @@ MODULE_PARM_DESC(ql2xtargetreset, "Enable target reset." "Default is 1 - use hw defaults."); +int ql2xgffidenable; +module_param(ql2xgffidenable, int, S_IRUGO|S_IRUSR); +MODULE_PARM_DESC(ql2xgffidenable, + "Enables GFF_ID checks of port type. " + "Default is 0 - Do not use GFF_ID information."); int ql2xasynctmfenable; module_param(ql2xasynctmfenable, int, S_IRUGO|S_IRUSR);