diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-10-27 18:20:03 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-10-27 18:20:03 +0000 |
commit | 1f17ed9cbcefc7c44c2f775bdb1f882f6e8d7359 (patch) | |
tree | 517dbe1c7deec590c87cf619202f934f0db2f1cf /sys/dev | |
parent | d842b4810b4aa0ccb059d1496ebf5969127a8607 (diff) |
From FreeBSD:
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.)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_dc_pci.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c index 166d828d130..2c03a8ff590 100644 --- a/sys/dev/pci/if_dc_pci.c +++ b/sys/dev/pci/if_dc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dc_pci.c,v 1.8 2000/10/27 18:13:44 aaron Exp $ */ +/* $OpenBSD: if_dc_pci.c,v 1.9 2000/10/27 18:20:02 aaron Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -271,6 +271,12 @@ void dc_pci_attach(parent, self, aux) 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_conf_read(pc, pa->pa_tag, DC_PCI_CFLT); + command &= 0xFFFF00FF; + command |= 0x00008000; + pci_conf_write(pc, pa->pa_tag, DC_PCI_CFLT, command); } break; case PCI_VENDOR_ADMTEK: |