Merge branch 'scsi-scan'
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / libata-scsi.c
index 4982e6eff7004f7a7a7a078aa6d8eb07bc4c08e1..45ebe9fd52eaaccf38d9b96a0b90b39879a58d60 100644 (file)
@@ -1816,3 +1816,19 @@ void ata_scsi_simulate(u16 *id,
        }
 }
 
+void ata_scsi_scan_host(struct ata_port *ap)
+{
+       struct ata_device *dev;
+       unsigned int i;
+
+       if (ap->flags & ATA_FLAG_PORT_DISABLED)
+               return;
+
+       for (i = 0; i < ATA_MAX_DEVICES; i++) {
+               dev = &ap->device[i];
+
+               if (ata_dev_present(dev))
+                       scsi_scan_target(&ap->host->shost_gendev, 0, i, 0, 0);
+       }
+}
+