]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge branch 'scsi-scan'
authorJeff Garzik <jgarzik@pobox.com>
Tue, 4 Oct 2005 18:24:04 +0000 (14:24 -0400)
committerJeff Garzik <jgarzik@pobox.com>
Tue, 4 Oct 2005 18:24:04 +0000 (14:24 -0400)
drivers/scsi/libata-core.c
drivers/scsi/libata-scsi.c
drivers/scsi/libata.h

index 82ec7f30bf3f0b146e5e9c01f13a4c3f29af7193..f0894bfa908b3953401e4ffb8456f33211d95dc1 100644 (file)
@@ -4203,7 +4203,7 @@ int ata_device_add(struct ata_probe_ent *ent)
        for (i = 0; i < count; i++) {
                struct ata_port *ap = host_set->ports[i];
 
-               scsi_scan_host(ap->host);
+               ata_scsi_scan_host(ap);
        }
 
        dev_set_drvdata(dev, host_set);
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);
+       }
+}
+
index d608b3a0f6fe6897d108cd8f6557c8e4d53c1820..c7a1fa1c9abc143136de8caa475e117ccdf1a7ed 100644 (file)
@@ -51,6 +51,7 @@ extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
 
 
 /* libata-scsi.c */
+extern void ata_scsi_scan_host(struct ata_port *ap);
 extern void ata_to_sense_error(struct ata_queued_cmd *qc, u8 drv_stat);
 extern int ata_scsi_error(struct Scsi_Host *host);
 extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf,