[SCSI] scsi_transport_fc: Introduce disable_target_scan flag
authorChristof Schmitt <christof.schmitt@de.ibm.com>
Tue, 28 Aug 2007 07:31:21 +0000 (09:31 +0200)
committerJames Bottomley <jejb@mulgrave.localdomain>
Fri, 12 Oct 2007 18:46:29 +0000 (14:46 -0400)
This change has already been discussed on linux-scsi:
http://marc.info/?t=118771096400003
http://marc.info/?t=118760913100005

Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_transport_fc.c
include/scsi/scsi_transport_fc.h

index 47057254850dae0cf3d7f4b86811474c953455bd..dd97f2652508d741c1514b22c0e4bb8f975be696 100644 (file)
@@ -2988,10 +2988,12 @@ fc_scsi_scan_rport(struct work_struct *work)
        struct fc_rport *rport =
                container_of(work, struct fc_rport, scan_work);
        struct Scsi_Host *shost = rport_to_shost(rport);
+       struct fc_internal *i = to_fc_internal(shost->transportt);
        unsigned long flags;
 
        if ((rport->port_state == FC_PORTSTATE_ONLINE) &&
-           (rport->roles & FC_PORT_ROLE_FCP_TARGET)) {
+           (rport->roles & FC_PORT_ROLE_FCP_TARGET) &&
+           !(i->f->disable_target_scan)) {
                scsi_scan_target(&rport->dev, rport->channel,
                        rport->scsi_target_id, SCAN_WILD_CARD, 1);
        }
index a0d80bcaa93d489c909a4f67f3142dbdbd040ef4..616a96a3ab81ca442a841fd6e59869246ac2260e 100644 (file)
@@ -632,6 +632,8 @@ struct fc_function_template {
        unsigned long   show_host_fabric_name:1;
        unsigned long   show_host_symbolic_name:1;
        unsigned long   show_host_system_hostname:1;
+
+       unsigned long   disable_target_scan:1;
 };