patch-2.2.11 linux/drivers/scsi/qlogicisp.c

Next file: linux/drivers/scsi/scsi.c
Previous file: linux/drivers/scsi/qlogicfc_asm.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.10/linux/drivers/scsi/qlogicisp.c linux/drivers/scsi/qlogicisp.c
@@ -1065,8 +1065,10 @@
 		ip[0] = 255;
 		ip[1] = 63;
 		ip[2] = size / (ip[0] * ip[1]);
+#if 0
 		if (ip[2] > 1023)
 			ip[2] = 1023;
+#endif			
 	}
 
 	LEAVE("isp1020_biosparam");
@@ -1207,7 +1209,16 @@
 	pci_write_config_word(pdev, PCI_COMMAND, command);
 	pci_read_config_word(pdev, PCI_COMMAND, &command);
 	pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 16);
-	pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 64);
+	{
+		unsigned char min_gnt, latency_timer;
+
+		pci_read_config_byte(pdev, PCI_MIN_GNT, &min_gnt);
+		if (min_gnt == 0)
+			latency_timer = 64;
+		else
+			latency_timer = ((min_gnt << 3) & 0xff);
+		pci_write_config_byte(pdev, PCI_LATENCY_TIMER, latency_timer);
+	}
 #endif
 
 	if (command & PCI_COMMAND_IO && (io_base & 3) == 1)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)