summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2000-10-25 23:46:31 +0000
committerwpaul <wpaul@FreeBSD.org>2000-10-25 23:46:31 +0000
commit523c773acc05f900d296bf6641c78c9a77c520d7 (patch)
tree299bac0bc74969118b35b4d47a6e33cb0dbb7f9b /sys
parent385109d266621a3c0f5501c28b46d32a772afc77 (diff)
downloadFreeBSD-src-523c773acc05f900d296bf6641c78c9a77c520d7.zip
FreeBSD-src-523c773acc05f900d296bf6641c78c9a77c520d7.tar.gz
Set the DC_TX_INTR_ALWAYS and DC_TX_STORENFWD flags for the Davicom
DM9100/DM9102 chips. Do not set DC_TX_ONE. The DC_TX_USE_TX_INTR flag causes dc_encap() to set the 'interrupt on TX completion' bit only once every 64 packets. This is an attempt to reduce the number of interrupts generated by the chip. You're supposed to get a 'no more TX buffers left' interrupt once you hit the last packet whether you ask for one or not, however it seems the Davicom chip doesn't generate this interrupt, or at least it doesn't generate it under the same circumstances. The result is that if you transmit n packets, where n is less than 64, and then wait 5 seconds, you'll get a watchdog timeout whether you want one or not. The DC_TX_INTR_ALWAYS causes dc_encap() to request an interrupt for every frame. I'm still waiting on confirmation from a couple of users to see if this fixes their problems with the Davicom DM9102 before I merge this into -stable, but this fixed the problem for me in my own testing so I'm willing to make the change to -current right away.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/dc/if_dc.c4
-rw-r--r--sys/pci/if_dc.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 262387d..a838709 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -1833,8 +1833,8 @@ static int dc_attach(dev)
case DC_DEVICEID_DM9100:
case DC_DEVICEID_DM9102:
sc->dc_type = DC_TYPE_DM9102;
- sc->dc_flags |= DC_TX_COALESCE|DC_TX_USE_TX_INTR;
- sc->dc_flags |= DC_REDUCED_MII_POLL|DC_TX_ONE;
+ 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;
break;
case DC_DEVICEID_AL981:
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 262387d..a838709 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -1833,8 +1833,8 @@ static int dc_attach(dev)
case DC_DEVICEID_DM9100:
case DC_DEVICEID_DM9102:
sc->dc_type = DC_TYPE_DM9102;
- sc->dc_flags |= DC_TX_COALESCE|DC_TX_USE_TX_INTR;
- sc->dc_flags |= DC_REDUCED_MII_POLL|DC_TX_ONE;
+ 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;
break;
case DC_DEVICEID_AL981:
OpenPOWER on IntegriCloud