summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_xl.c
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2006-08-12 02:05:13 +0000
committeryongari <yongari@FreeBSD.org>2006-08-12 02:05:13 +0000
commite1c874eddae9ec6e620c76731899134baa1b528e (patch)
treeb264307c49891166ba56d67e94f297f4b46af544 /sys/pci/if_xl.c
parent6a3a2128e9c6c9262c0f09c30fb6106b3a84fe76 (diff)
downloadFreeBSD-src-e1c874eddae9ec6e620c76731899134baa1b528e.zip
FreeBSD-src-e1c874eddae9ec6e620c76731899134baa1b528e.tar.gz
Don't reset Tx threshold value whenever xl_init_locked() is called.
Instead the threshould is initialized in device attach. Later the threshold could be increased in Tx underrun error and the new threshold should be used in xl_init_locked().
Diffstat (limited to 'sys/pci/if_xl.c')
-rw-r--r--sys/pci/if_xl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index 503ce72..5870bb4 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -1479,6 +1479,9 @@ xl_attach(device_t dev)
else
sc->xl_type = XL_TYPE_90X;
+ /* Set the TX start threshold for best performance. */
+ sc->xl_tx_thresh = XL_MIN_FRAMELEN;
+
ifp->if_mtu = ETHERMTU;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = xl_ioctl;
@@ -2848,7 +2851,6 @@ xl_init_locked(struct xl_softc *sc)
CSR_WRITE_1(sc, XL_TX_FREETHRESH, XL_PACKET_SIZE >> 8);
/* Set the TX start threshold for best performance. */
- sc->xl_tx_thresh = XL_MIN_FRAMELEN;
CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_TX_SET_START|sc->xl_tx_thresh);
/*
OpenPOWER on IntegriCloud