aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 59a653d15a19..ddb5800823a9 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -30,6 +30,10 @@ module_param_named(dif, enable_dif, bool, 0600);
30MODULE_PARM_DESC(dif, "Enable DIF/DIX data integrity support"); 30MODULE_PARM_DESC(dif, "Enable DIF/DIX data integrity support");
31#endif 31#endif
32 32
33static bool allow_lun_scan = 1;
34module_param(allow_lun_scan, bool, 0600);
35MODULE_PARM_DESC(allow_lun_scan, "For NPIV, scan and attach all storage LUNs");
36
33static int zfcp_scsi_change_queue_depth(struct scsi_device *sdev, int depth, 37static int zfcp_scsi_change_queue_depth(struct scsi_device *sdev, int depth,
34 int reason) 38 int reason)
35{ 39{
@@ -130,6 +134,7 @@ static int zfcp_scsi_slave_alloc(struct scsi_device *sdev)
130 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); 134 struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
131 struct zfcp_port *port; 135 struct zfcp_port *port;
132 struct zfcp_unit *unit; 136 struct zfcp_unit *unit;
137 int npiv = adapter->connection_features & FSF_FEATURE_NPIV_MODE;
133 138
134 port = zfcp_get_port_by_wwpn(adapter, rport->port_name); 139 port = zfcp_get_port_by_wwpn(adapter, rport->port_name);
135 if (!port) 140 if (!port)
@@ -139,7 +144,7 @@ static int zfcp_scsi_slave_alloc(struct scsi_device *sdev)
139 if (unit) 144 if (unit)
140 put_device(&unit->dev); 145 put_device(&unit->dev);
141 146
142 if (!unit && !(adapter->connection_features & FSF_FEATURE_NPIV_MODE)) { 147 if (!unit && !(allow_lun_scan && npiv)) {
143 put_device(&port->dev); 148 put_device(&port->dev);
144 return -ENXIO; 149 return -ENXIO;
145 } 150 }