diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 15:55:19 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-03 15:55:19 -0400 |
commit | 644dd0cc494702ecd0698f467de113ace9593888 (patch) | |
tree | d49e781476dea85a4bfc1b05b6d15ed0a224a747 /drivers/scsi/libata-scsi.c | |
parent | 87e807b6c461bbd449496a4c3ab78ab164a4ba97 (diff) |
[libata] improve device scan
Replace SCSI's legacy "bang at the door" method of probing with one
directly controlled by the underlying ATA transport layer.
We now only call scsi_scan_target() for devices we find, rather than
probing every possible channel/id within a certain range.
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 | ||
1681 | void 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 | |||