aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libata-core.c2
-rw-r--r--drivers/scsi/libata-scsi.c12
-rw-r--r--drivers/scsi/libata.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index e5b01997117a..902c76364af7 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -4113,7 +4113,7 @@ int ata_device_add(struct ata_probe_ent *ent)
4113 for (i = 0; i < count; i++) { 4113 for (i = 0; i < count; i++) {
4114 struct ata_port *ap = host_set->ports[i]; 4114 struct ata_port *ap = host_set->ports[i];
4115 4115
4116 scsi_scan_host(ap->host); 4116 ata_scsi_scan_host(ap);
4117 } 4117 }
4118 4118
4119 dev_set_drvdata(dev, host_set); 4119 dev_set_drvdata(dev, host_set);
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 104fd9a63e73..4fc0134d4272 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -1678,3 +1678,15 @@ void ata_scsi_simulate(u16 *id,
1678 } 1678 }
1679} 1679}
1680 1680
1681void ata_scsi_scan_host(struct ata_port *ap)
1682{
1683 unsigned int i;
1684
1685 if (ap->flags & ATA_FLAG_PORT_DISABLED)
1686 return;
1687
1688 for (i = 0; i < ATA_MAX_DEVICES; i++)
1689 if (ata_dev_present(&ap->device[i]))
1690 scsi_scan_target(&ap->host->shost_gendev, 0, i, ~0, 0);
1691}
1692
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h
index d608b3a0f6fe..c7a1fa1c9abc 100644
--- a/drivers/scsi/libata.h
+++ b/drivers/scsi/libata.h
@@ -51,6 +51,7 @@ extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
51 51
52 52
53/* libata-scsi.c */ 53/* libata-scsi.c */
54extern void ata_scsi_scan_host(struct ata_port *ap);
54extern void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat); 55extern void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat);
55extern int ata_scsi_error(struct Scsi_Host *host); 56extern int ata_scsi_error(struct Scsi_Host *host);
56extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, 57extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf,