[SCSI] qla2xxx: Refactor shutdown code so some functionality can be reused.
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / qla2xxx / qla_attr.c
index 5f174b83f56fb3dab862d01aa56a3e72935a941a..3464782ab5a4cd1a821594c3a09855a1e12f82bd 100644 (file)
@@ -862,7 +862,7 @@ qla2x00_alloc_sysfs_attr(scsi_qla_host_t *vha)
 }
 
 void
-qla2x00_free_sysfs_attr(scsi_qla_host_t *vha)
+qla2x00_free_sysfs_attr(scsi_qla_host_t *vha, bool stop_beacon)
 {
        struct Scsi_Host *host = vha->host;
        struct sysfs_entry *iter;
@@ -880,7 +880,7 @@ qla2x00_free_sysfs_attr(scsi_qla_host_t *vha)
                    iter->attr);
        }
 
-       if (ha->beacon_blink_led == 1)
+       if (stop_beacon && ha->beacon_blink_led == 1)
                ha->isp_ops->beacon_off(vha);
 }