This change updates the 3ware raid drivers to use scsi_scan_target(),
rather than scsi_scan_host(). This is especially nice for 3w-xxxx,
which does not support LUNs. The device scan is a bit quicker and more
direct, even if it is a tiny bit more code in the driver.
Patch untested.
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -1992,7 +1992,7 @@ static int __devinit twa_probe(struct pc
struct Scsi_Host *host = NULL;
TW_Device_Extension *tw_dev;
u32 mem_addr;
- int retval = -ENODEV;
+ int retval = -ENODEV, i;
retval = pci_enable_device(pdev);
if (retval) {
@@ -2092,7 +2092,8 @@ static int __devinit twa_probe(struct pc
TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev);
/* Finally, scan the host */
- scsi_scan_host(host);
+ for (i = 0; i < TW_MAX_UNITS; i++)
+ scsi_scan_target(&host->shost_gendev, 0, i, ~0, 0);
if (twa_major == -1) {
if ((twa_major = register_chrdev (0, "twa", &twa_fops)) < 0)
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -2315,7 +2315,7 @@ static int __devinit tw_probe(struct pci
{
struct Scsi_Host *host = NULL;
TW_Device_Extension *tw_dev;
- int retval = -ENODEV;
+ int retval = -ENODEV, i;
retval = pci_enable_device(pdev);
if (retval) {
@@ -2404,7 +2404,8 @@ static int __devinit tw_probe(struct pci
TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev);
/* Finally, scan the host */
- scsi_scan_host(host);
+ for (i = 0; i < TW_MAX_UNITS; i++)
+ scsi_scan_target(&host->shost_gendev, 0, i, 0, 0);
if (twe_major == -1) {
if ((twe_major = register_chrdev (0, "twe", &tw_fops)) < 0)