[PATCH 1/2] fusion :  shost max_id not set in VMWare guest os

In vmware guest os with emulated LSI 53c1030, the port facts config page is
not having MaxDevices initialized to 16 devices. Instead its set to zero.
Thereforewhen driver loads, no devices are scanned for from scsi_scan_host.
Prior to the3.04.04 driver, shost max_id was set to hard coded value 
MPT_MAX_SCSI_DEVICES. After that release, support for greater than 255 targets 
was added, and the driver was taking the target count from the port facts 
instead.  With this patch we will restore the hard coded values for SPI, but at 
the same time use the settingsneeded for SAS and Fibre Channel.

Signed-off-by: Eric Moore <[EMAIL PROTECTED]>


diff -uarpN b/drivers/message/fusion/mptbase.c 
a/drivers/message/fusion/mptbase.c
--- b/drivers/message/fusion/mptbase.c  2007-03-15 18:20:01.000000000 -0600
+++ a/drivers/message/fusion/mptbase.c  2007-03-18 12:05:54.000000000 -0600
@@ -2570,8 +2570,19 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
        pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs);
        pfacts->MaxLanBuckets = le16_to_cpu(pfacts->MaxLanBuckets);
 
-       max_id = (ioc->bus_type == SAS) ? pfacts->PortSCSIID :
-           pfacts->MaxDevices;
+       switch (ioc->bus_type) {
+       case SAS:
+               max_id = pfacts->PortSCSIID;
+               break;
+       case FC:
+               max_id = pfacts->MaxDevices;
+               break;
+       case SPI:
+       default:
+               max_id = MPT_MAX_SCSI_DEVICES;
+               break;
+       }
+
        ioc->devices_per_bus = (max_id > 255) ? 256 : max_id;
        ioc->number_of_buses = (ioc->devices_per_bus < 256) ? 1 : max_id/256;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to