]> Pileus Git - ~andy/linux/blobdiff - drivers/s390/scsi/zfcp_fc.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth...
[~andy/linux] / drivers / s390 / scsi / zfcp_fc.c
index 88688a80b2c11334bcc99686634bee964858b816..ff598cd68b2d0bde11c99c412ca0ea70a90d6ece 100644 (file)
@@ -26,6 +26,27 @@ static u32 zfcp_fc_rscn_range_mask[] = {
        [ELS_ADDR_FMT_FAB]              = 0x000000,
 };
 
+static bool no_auto_port_rescan;
+module_param_named(no_auto_port_rescan, no_auto_port_rescan, bool, 0600);
+MODULE_PARM_DESC(no_auto_port_rescan,
+                "no automatic port_rescan (default off)");
+
+void zfcp_fc_conditional_port_scan(struct zfcp_adapter *adapter)
+{
+       if (no_auto_port_rescan)
+               return;
+
+       queue_work(adapter->work_queue, &adapter->scan_work);
+}
+
+void zfcp_fc_inverse_conditional_port_scan(struct zfcp_adapter *adapter)
+{
+       if (!no_auto_port_rescan)
+               return;
+
+       queue_work(adapter->work_queue, &adapter->scan_work);
+}
+
 /**
  * zfcp_fc_post_event - post event to userspace via fc_transport
  * @work: work struct with enqueued events
@@ -206,7 +227,7 @@ static void zfcp_fc_incoming_rscn(struct zfcp_fsf_req *fsf_req)
                zfcp_fc_enqueue_event(fsf_req->adapter, FCH_EVT_RSCN,
                                      *(u32 *)page);
        }
-       queue_work(fsf_req->adapter->work_queue, &fsf_req->adapter->scan_work);
+       zfcp_fc_conditional_port_scan(fsf_req->adapter);
 }
 
 static void zfcp_fc_incoming_wwpn(struct zfcp_fsf_req *req, u64 wwpn)