patch-2.2.11 linux/drivers/net/sunhme.c
Next file: linux/drivers/net/syncppp.c
Previous file: linux/drivers/net/sonic.h
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Mon Aug 9 12:05:45 1999
- Orig file:
v2.2.10/linux/drivers/net/sunhme.c
- Orig date:
Sat May 29 11:10:15 1999
diff -u --recursive --new-file v2.2.10/linux/drivers/net/sunhme.c linux/drivers/net/sunhme.c
@@ -3406,7 +3406,16 @@
/* Set the latency timer and cache line size as well,
* PROM leaves it at zero.
*/
- pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 128);
+ {
+ 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);
+ }
#ifdef __sparc_v9__
/* NOTE: Cache line size is in 32-bit word units. */
pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x10);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)