Re: [PATCH 21/22] e1000: Version increment 7.3.20-k2 and minor cleanups

2006-12-11 Thread Jeff Garzik

Kok, Auke wrote:

Signed-off-by: Auke Kok <[EMAIL PROTECTED]>


ACK


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 21/22] e1000: Version increment 7.3.20-k2 and minor cleanups

2006-12-08 Thread Kok, Auke

Signed-off-by: Auke Kok <[EMAIL PROTECTED]>
---

 drivers/net/e1000/e1000.h   |6 +
 drivers/net/e1000/e1000_hw.c|   52 +++
 drivers/net/e1000/e1000_hw.h|1 +
 drivers/net/e1000/e1000_main.c  |9 +++
 drivers/net/e1000/e1000_osdep.h |9 +--
 5 files changed, 32 insertions(+), 45 deletions(-)

diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 8e7acb0..7c48680 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -61,6 +61,7 @@
 #include 
 #ifdef NETIF_F_TSO6
 #include 
+#include 
 #endif
 #include 
 #include 
@@ -85,11 +86,7 @@ struct e1000_adapter;
 
 #include "e1000_hw.h"
 
-#ifdef DBG
-#define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args)
-#else
 #define E1000_DBG(args...)
-#endif
 
 #define E1000_ERR(args...) printk(KERN_ERR "e1000: " args)
 
@@ -361,5 +358,4 @@ enum e1000_state_t {
__E1000_RESETTING,
__E1000_DOWN
 };
-
 #endif /* _E1000_H_ */
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index 4ad6a11..9a295e0 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -718,8 +718,6 @@ e1000_reset_hw(struct e1000_hw *hw)
  *
  * hw: Struct containing variables accessed by shared code
  *
- * This function contains hardware limitation workarounds for PCI-E adapters
- *
  */
 static void
 e1000_initialize_hardware_bits(struct e1000_hw *hw)
@@ -731,14 +729,15 @@ e1000_initialize_hardware_bits(struct e1
 uint32_t reg_tctl;
 uint32_t reg_txdctl, reg_txdctl1;
 
-/* link autonegotiation/sync workarounds */
 reg_tarc0 = E1000_READ_REG(hw, TARC0);
+/* link autonegotiation/sync workarounds */
 reg_tarc0 &= ~((1 << 30)|(1 << 29)|(1 << 28)|(1 << 27));
 
-/* Enable not-done TX descriptor counting */
 reg_txdctl = E1000_READ_REG(hw, TXDCTL);
+/* Enable not-done TX descriptor counting */
 reg_txdctl |= E1000_TXDCTL_COUNT_DESC;
 E1000_WRITE_REG(hw, TXDCTL, reg_txdctl);
+
 reg_txdctl1 = E1000_READ_REG(hw, TXDCTL1);
 reg_txdctl1 |= E1000_TXDCTL_COUNT_DESC;
 E1000_WRITE_REG(hw, TXDCTL1, reg_txdctl1);
@@ -746,18 +745,18 @@ e1000_initialize_hardware_bits(struct e1
 switch (hw->mac_type) {
 case e1000_82571:
 case e1000_82572:
-/* Clear PHY TX compatible mode bits */
 reg_tarc1 = E1000_READ_REG(hw, TARC1);
+reg_tctl = E1000_READ_REG(hw, TCTL);
+
+/* Clear PHY TX compatible mode bits */
 reg_tarc1 &= ~((1 << 30)|(1 << 29));
 
 /* link autonegotiation/sync workarounds */
 reg_tarc0 |= ((1 << 26)|(1 << 25)|(1 << 24)|(1 << 23));
-
 /* TX ring control fixes */
 reg_tarc1 |= ((1 << 26)|(1 << 25)|(1 << 24));
 
 /* Multiple read bit is reversed polarity */
-reg_tctl = E1000_READ_REG(hw, TCTL);
 if (reg_tctl & E1000_TCTL_MULR)
 reg_tarc1 &= ~(1 << 28);
 else
@@ -767,18 +766,18 @@ e1000_initialize_hardware_bits(struct e1
 break;
 case e1000_82573:
 reg_ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
+reg_ctrl = E1000_READ_REG(hw, CTRL);
+
 reg_ctrl_ext &= ~(1 << 23);
 reg_ctrl_ext |= (1 << 22);
-
 /* TX byte count fix */
-reg_ctrl = E1000_READ_REG(hw, CTRL);
 reg_ctrl &= ~(1 << 29);
 
 E1000_WRITE_REG(hw, CTRL_EXT, reg_ctrl_ext);
 E1000_WRITE_REG(hw, CTRL, reg_ctrl);
 break;
 case e1000_80003es2lan:
-/* improve small packet performace for fiber/serdes */
+/* improve small packet performance for fiber/serdes */
 if ((hw->media_type == e1000_media_type_fiber) ||
 (hw->media_type == e1000_media_type_internal_serdes)) {
 reg_tarc0 &= ~(1 << 20);
@@ -800,7 +799,6 @@ e1000_initialize_hardware_bits(struct e1
 ((hw->device_id != E1000_DEV_ID_ICH8_IGP_M_AMT) &&
  (hw->device_id != E1000_DEV_ID_ICH8_IGP_M)))
 reg_tarc0 |= ((1 << 29)|(1 << 28));
-
 reg_ctrl_ext = E1000_READ_REG(hw, CTRL_EXT);
 reg_ctrl_ext |= (1 << 22);
 E1000_WRITE_REG(hw, CTRL_EXT, reg_ctrl_ext);
@@ -808,15 +806,16 @@ e1000_initialize_hardware_bits(struct e1
 /* workaround TX hang with TSO=on */
 reg_tarc0 |= ((1 << 27)|(1 << 26)|(1 << 24)|(1 << 23));
 
-/* Multiple read bit is reversed polarity */
-reg_tctl = E1000_READ_REG(hw, TCTL);
 reg_tarc1 = E1000_READ_REG(hw, TARC1);
+re