Skip to contentSkip to conversation

[PATCH} DAC960 fix for fibre channel transfer rate

PATCH Dave Olien 1 participant 1 message Jun 4, 2003 Block layer

lore
Share & tools
lore

Dave Olien

author
#0 lore raw

Andrew, could you push this into 2.5 for me? I got the patch originally from Michael Griffith <[email protected]>. I've looked it over and tested it on the equipment I have. The change makes the transfer rate numbers come out right for the fibre channel version of this controller.

For 1G FC, the NegotiatedSynchronousMegaTransfers is 1000, and the NegotiatedDataWidthBIts is 1. The old code assumed NegotiatedDataWidthBits was always either 8 or 16. The new code is simpler, and does the calculation correctly for all cases.

Thanks!
Dave Olien

drivers/block/DAC960.c +1 -2
@@ -2309,8 +2309,7 @@
 		    (PhysicalDeviceInfo->NegotiatedDataWidthBits == 16
 		     ? "Wide " :""),
 		    (PhysicalDeviceInfo->NegotiatedSynchronousMegaTransfers
-		     * (PhysicalDeviceInfo->NegotiatedDataWidthBits == 16
-			? 2 : 1)));
+		     * PhysicalDeviceInfo->NegotiatedDataWidthBits/8));
       if (InquiryUnitSerialNumber->PeripheralDeviceType != 0x1F)
 	DAC960_Info("         Serial Number: %s\n", Controller, SerialNumber);
       if (PhysicalDeviceInfo->PhysicalDeviceState ==