From 59d76bb89eb3353250717774cc6f84cfa2664f99 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Wed, 8 Dec 2010 17:30:46 +0100 Subject: [PATCH] --- yaml --- r: 226830 b: refs/heads/master c: 0d81b4e8dcc4177726f30a1ac8df1f726d2a7c0c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/s390/scsi/zfcp_scsi.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 9bcc791947b4..aa00cc9e3dbf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 51780d2c38a7294c2c302ae9d2ea517bd4153dec +refs/heads/master: 0d81b4e8dcc4177726f30a1ac8df1f726d2a7c0c diff --git a/trunk/drivers/s390/scsi/zfcp_scsi.c b/trunk/drivers/s390/scsi/zfcp_scsi.c index 59a653d15a19..ddb5800823a9 100644 --- a/trunk/drivers/s390/scsi/zfcp_scsi.c +++ b/trunk/drivers/s390/scsi/zfcp_scsi.c @@ -30,6 +30,10 @@ module_param_named(dif, enable_dif, bool, 0600); MODULE_PARM_DESC(dif, "Enable DIF/DIX data integrity support"); #endif +static bool allow_lun_scan = 1; +module_param(allow_lun_scan, bool, 0600); +MODULE_PARM_DESC(allow_lun_scan, "For NPIV, scan and attach all storage LUNs"); + static int zfcp_scsi_change_queue_depth(struct scsi_device *sdev, int depth, int reason) { @@ -130,6 +134,7 @@ static int zfcp_scsi_slave_alloc(struct scsi_device *sdev) struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev); struct zfcp_port *port; struct zfcp_unit *unit; + int npiv = adapter->connection_features & FSF_FEATURE_NPIV_MODE; port = zfcp_get_port_by_wwpn(adapter, rport->port_name); if (!port) @@ -139,7 +144,7 @@ static int zfcp_scsi_slave_alloc(struct scsi_device *sdev) if (unit) put_device(&unit->dev); - if (!unit && !(adapter->connection_features & FSF_FEATURE_NPIV_MODE)) { + if (!unit && !(allow_lun_scan && npiv)) { put_device(&port->dev); return -ENXIO; }