Skip to contentSkip to conversation

2.6.21-rc regression in mptbase

DISCUSSION Petr Vandrovec 2 participants 2 messages Mar 24, 2007 – Apr 1, 2007 1 message not in the archive LSI Logic MPT fusion drivers (FC/SAS/SPI)

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines · Jan Engelhardt
Quoted 8 lines

Hello world,

in at least 2.6.21-rc4, one or more of the mptscsi scsi modules is broken with respect to not detecting any harddisk (VMware provides that virtual LSI MPT controller), which means no working system. No problems in 2.6.20.2.
...

Quoted 4 lines

Could be a bug in the driver or a bug in the emulation exposed by a change in the driver.

Can you bisect which change to the driver broke it?

Hello,
it is bug in the emulation. It should be fixed in Workstation 6.0 RC1. If you
want to use VMware's LSILogic emulation with older products, you need fix below until new releases come out (or unless I'll put out binary patch to fix binaries to return 16 instead of previous value).
Petr

If port reports that no devices are connected to it, assume that 16 devices are there. Hopefully nobody will ever build device with port but no devices, and even for them it should be safe as before code always probed 16 devices regardless of MaxDevices reported by port facts.

drivers/message/fusion/mptbase.c renamed from drivers/message/fusion/mptbase.c.orig +10 -0
@@ -2564,6 +2564,16 @@
 	pfacts->IOCStatus = le16_to_cpu(pfacts->IOCStatus);
 	pfacts->IOCLogInfo = le32_to_cpu(pfacts->IOCLogInfo);
 	pfacts->MaxDevices = le16_to_cpu(pfacts->MaxDevices);
+	/*
+	 * VMware emulation is broken, its PortFact's MaxDevices reports value
+	 * programmed by IOC Init, so if you program IOC Init to 256 (which is 0,
+	 * as that field is only 8 bit), it reports back 0 in port facts, instead
+	 * of 256...  And unfortunately using 256 triggers another bug in the
+	 * code (parallel SCSI can have only 16 devices).
+	 */
+	if (pfacts->MaxDevices == 0) {
+	   pfacts->MaxDevices = 16;
+	}
 	pfacts->PortSCSIID = le16_to_cpu(pfacts->PortSCSIID);
 	pfacts->ProtocolFlags = le16_to_cpu(pfacts->ProtocolFlags);
 	pfacts->MaxPostedCmdBuffers = le16_to_cpu(pfacts->MaxPostedCmdBuffers);
#2 lore raw
Quoted 5 lines · Petr Vandrovec
Quoted 5 lines
Quoted 4 lines

in at least 2.6.21-rc4, one or more of the mptscsi scsi modules is broken with respect to not detecting any harddisk (VMware provides that virtual LSI MPT controller), which means no working system. No problems in 2.6.20.2.

Quoted 8 lines
Quoted 3 lines

Could be a bug in the driver or a bug in the emulation exposed by a change in the driver.

Hello,
it is bug in the emulation. It should be fixed in Workstation 6.0 RC1. If you
want to use VMware's LSILogic emulation with older products, you need fix below until new releases come out (or unless I'll put out binary patch to fix binaries to return 16 instead of previous value).

Yes (workaround works) and rc1 works. Thanks.

Jan