summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2000-10-27 00:15:04 +0000
committerwpaul <wpaul@FreeBSD.org>2000-10-27 00:15:04 +0000
commitf05284397ec89629b21217f6251a1d84737169f8 (patch)
tree1a1c8df777d514e8fdb03e8c2e6477daf5e184f3 /sys
parent489eb0f7772fb2e82e8b90a84cb542be305fd1e3 (diff)
downloadFreeBSD-src-f05284397ec89629b21217f6251a1d84737169f8.zip
FreeBSD-src-f05284397ec89629b21217f6251a1d84737169f8.tar.gz
Yet another bug fix/optimization for the Davicom DM9100/9102: increase
the PCI latency timer value to 0x80. Davicom's Linux driver does this, and it drastically reduces the number of TX underruns in my tests. (Note: this is done only for the Davicom chips. I'm not sure it's a good idea to do it for all of them.) Again, still waiting on confirmation before merging to stable.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/dc/if_dc.c5
-rw-r--r--sys/pci/if_dc.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index a838709..ee83951 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -1836,6 +1836,11 @@ static int dc_attach(dev)
sc->dc_flags |= DC_TX_COALESCE|DC_TX_INTR_ALWAYS;
sc->dc_flags |= DC_REDUCED_MII_POLL|DC_TX_STORENFWD;
sc->dc_pmode = DC_PMODE_MII;
+ /* Increase the latency timer value. */
+ command = pci_read_config(dev, DC_PCI_CFLT, 4);
+ command &= 0xFFFF00FF;
+ command |= 0x00008000;
+ pci_write_config(dev, DC_PCI_CFLT, command, 4);
break;
case DC_DEVICEID_AL981:
sc->dc_type = DC_TYPE_AL981;
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index a838709..ee83951 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -1836,6 +1836,11 @@ static int dc_attach(dev)
sc->dc_flags |= DC_TX_COALESCE|DC_TX_INTR_ALWAYS;
sc->dc_flags |= DC_REDUCED_MII_POLL|DC_TX_STORENFWD;
sc->dc_pmode = DC_PMODE_MII;
+ /* Increase the latency timer value. */
+ command = pci_read_config(dev, DC_PCI_CFLT, 4);
+ command &= 0xFFFF00FF;
+ command |= 0x00008000;
+ pci_write_config(dev, DC_PCI_CFLT, command, 4);
break;
case DC_DEVICEID_AL981:
sc->dc_type = DC_TYPE_AL981;
OpenPOWER on IntegriCloud