diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-08-11 11:35:10 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-08-11 11:35:10 +0000 |
commit | fe7d2e88535d298db38bb322f3d19d2459335553 (patch) | |
tree | 4880f6f7283d46794e60aff3b606f2a7a2830adc | |
parent | e90502d78bbb9c1427f4f639fc394ee091bb4bd0 (diff) |
Use the correct offsets when reading/writing to DCA_TXCTRL in the 82599
case. Adapted from Intel code in FreeBSD and tested on 82598/82599.
-rw-r--r-- | sys/dev/pci/if_ix.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index 6d3e6afe1aa..9081531e6c4 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.42 2010/04/20 14:54:58 jsg Exp $ */ +/* $OpenBSD: if_ix.c,v 1.43 2010/08/11 11:35:09 jsg Exp $ */ /****************************************************************************** @@ -1843,9 +1843,27 @@ ixgbe_initialize_transmit_units(struct ix_softc *sc) (txhwb & 0x00000000ffffffffULL)); IXGBE_WRITE_REG(hw, IXGBE_TDWBAH(i), (txhwb >> 32)); - txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); + + /* Disable Head Writeback */ + switch (hw->mac.type) { + case ixgbe_mac_82598EB: + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); + break; + case ixgbe_mac_82599EB: + default: + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); + break; + } txctrl &= ~IXGBE_DCA_TXCTRL_TX_WB_RO_EN; - IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), txctrl); + switch (hw->mac.type) { + case ixgbe_mac_82598EB: + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), txctrl); + break; + case ixgbe_mac_82599EB: + default: + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), txctrl); + break; + } /* Setup the HW Tx Head and Tail descriptor pointers */ IXGBE_WRITE_REG(hw, IXGBE_TDH(i), 0); |