[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.
This commit is contained in:
Jeff Garzik
2005-10-03 15:55:19 -04:00
parent 87e807b6c4
commit 644dd0cc49
3 changed files with 14 additions and 1 deletions

View File

@@ -1678,3 +1678,15 @@ void ata_scsi_simulate(u16 *id,
}
}
void ata_scsi_scan_host(struct ata_port *ap)
{
unsigned int i;
if (ap->flags & ATA_FLAG_PORT_DISABLED)
return;
for (i = 0; i < ATA_MAX_DEVICES; i++)
if (ata_dev_present(&ap->device[i]))
scsi_scan_target(&ap->host->shost_gendev, 0, i, ~0, 0);
}