All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kok, Auke" <auke-jan.h.kok@intel.com>
To: "Garzik, Jeff" <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org, "Brandeburg,
	Jesse" <jesse.brandeburg@intel.com>,
	"Kok, Auke" <auke-jan.h.kok@intel.com>,
	"Kok, Auke" <auke@foo-projects.org>,
	"Ronciak, John" <john.ronciak@intel.com>
Subject: [PATCH 21/22] e1000: Version increment 7.3.20-k2 and minor cleanups
Date: Fri, 08 Dec 2006 15:03:32 -0800	[thread overview]
Message-ID: <20061208230331.30109.23517.stgit@gitlost.site> (raw)
In-Reply-To: <20061208230209.30109.49157.stgit@gitlost.site>


Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---

 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 <linux/ip.h>
 #ifdef NETIF_F_TSO6
 #include <linux/ipv6.h>
+#include <net/ip6_checksum.h>
 #endif
 #include <linux/tcp.h>
 #include <linux/udp.h>
@@ -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);
+                reg_tctl = E1000_READ_REG(hw, TCTL);
+
+                /* Multiple read bit is reversed polarity */
                 if (reg_tctl & E1000_TCTL_MULR)
                     reg_tarc1 &= ~(1 << 28);
                 else
                     reg_tarc1 |= (1 << 28);
 
-                /* workaround TX hang with TSO=on */
+                /* workaround TX hang and TSO=on */
                 reg_tarc1 |= ((1 << 30)|(1 << 26)|(1 << 24));
 
                 E1000_WRITE_REG(hw, TARC1, reg_tarc1);
@@ -4580,7 +4579,6 @@ e1000_init_eeprom_params(struct e1000_hw
         hw->flash_bank_size *= ICH_FLASH_SECTOR_SIZE;
 
         hw->flash_bank_size /= 2 * sizeof(uint16_t);
-
         break;
         }
     default:
@@ -6342,12 +6340,12 @@ e1000_clear_hw_cntrs(struct e1000_hw *hw
     temp = E1000_READ_REG(hw, FCRUC);
 
     if (hw->mac_type != e1000_ich8lan) {
-    temp = E1000_READ_REG(hw, PRC64);
-    temp = E1000_READ_REG(hw, PRC127);
-    temp = E1000_READ_REG(hw, PRC255);
-    temp = E1000_READ_REG(hw, PRC511);
-    temp = E1000_READ_REG(hw, PRC1023);
-    temp = E1000_READ_REG(hw, PRC1522);
+        temp = E1000_READ_REG(hw, PRC64);
+        temp = E1000_READ_REG(hw, PRC127);
+        temp = E1000_READ_REG(hw, PRC255);
+        temp = E1000_READ_REG(hw, PRC511);
+        temp = E1000_READ_REG(hw, PRC1023);
+        temp = E1000_READ_REG(hw, PRC1522);
     }
 
     temp = E1000_READ_REG(hw, GPRC);
@@ -6371,12 +6369,12 @@ e1000_clear_hw_cntrs(struct e1000_hw *hw
     temp = E1000_READ_REG(hw, TPT);
 
     if (hw->mac_type != e1000_ich8lan) {
-    temp = E1000_READ_REG(hw, PTC64);
-    temp = E1000_READ_REG(hw, PTC127);
-    temp = E1000_READ_REG(hw, PTC255);
-    temp = E1000_READ_REG(hw, PTC511);
-    temp = E1000_READ_REG(hw, PTC1023);
-    temp = E1000_READ_REG(hw, PTC1522);
+        temp = E1000_READ_REG(hw, PTC64);
+        temp = E1000_READ_REG(hw, PTC127);
+        temp = E1000_READ_REG(hw, PTC255);
+        temp = E1000_READ_REG(hw, PTC511);
+        temp = E1000_READ_REG(hw, PTC1023);
+        temp = E1000_READ_REG(hw, PTC1522);
     }
 
     temp = E1000_READ_REG(hw, MPTC);
diff --git a/drivers/net/e1000/e1000_hw.h b/drivers/net/e1000/e1000_hw.h
index fd15f62..520e52d 100644
--- a/drivers/net/e1000/e1000_hw.h
+++ b/drivers/net/e1000/e1000_hw.h
@@ -1042,6 +1042,7 @@ struct e1000_ffvt_entry {
 #define E1000_ICRXDMTC 0x04120  /* Interrupt Cause Rx Descriptor Minimum Threshold Count */
 #define E1000_ICRXOC   0x04124  /* Interrupt Cause Receiver Overrun Count */
 #define E1000_RXCSUM   0x05000  /* RX Checksum Control - RW */
+#define E1000_RLPML    0x05004  /* RX Long Packet Max Length */
 #define E1000_RFCTL    0x05008  /* Receive Filter Control*/
 #define E1000_MTA      0x05200  /* Multicast Table Array - RW Array */
 #define E1000_RA       0x05400  /* Receive Address - RW Array */
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 458aa38..092476a 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -27,7 +27,6 @@
 *******************************************************************************/
 
 #include "e1000.h"
-#include <net/ip6_checksum.h>
 
 char e1000_driver_name[] = "e1000";
 static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
@@ -36,7 +35,7 @@ static char e1000_driver_string[] = "Int
 #else
 #define DRIVERNAPI "-NAPI"
 #endif
-#define DRV_VERSION "7.3.15-k2"DRIVERNAPI
+#define DRV_VERSION "7.3.20-k2"DRIVERNAPI
 char e1000_driver_version[] = DRV_VERSION;
 static char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
 
@@ -1353,7 +1352,6 @@ e1000_sw_init(struct e1000_adapter *adap
 	spin_lock_init(&adapter->stats_lock);
 
 	set_bit(__E1000_DOWN, &adapter->flags);
-
 	return 0;
 }
 
@@ -1713,7 +1711,8 @@ e1000_configure_tx(struct e1000_adapter 
 		tarc = E1000_READ_REG(hw, TARC0);
 		/* set the speed mode bit, we'll clear it if we're not at
 		 * gigabit link later */
-		tarc |= (1 << 21);
+#define SPEED_MODE_BIT (1 << 21)
+		tarc |= SPEED_MODE_BIT;
 		E1000_WRITE_REG(hw, TARC0, tarc);
 	} else if (hw->mac_type == e1000_80003es2lan) {
 		tarc = E1000_READ_REG(hw, TARC0);
@@ -2631,7 +2630,7 @@ e1000_watchdog(unsigned long data)
 			    txb2b == 0) {
 				uint32_t tarc0;
 				tarc0 = E1000_READ_REG(&adapter->hw, TARC0);
-				tarc0 &= ~(1 << 21);
+				tarc0 &= ~SPEED_MODE_BIT;
 				E1000_WRITE_REG(&adapter->hw, TARC0, tarc0);
 			}
 
diff --git a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h
index 18afc0c..da8c641 100644
--- a/drivers/net/e1000/e1000_osdep.h
+++ b/drivers/net/e1000/e1000_osdep.h
@@ -48,17 +48,10 @@ typedef enum {
     TRUE = 1
 } boolean_t;
 
-#define MSGOUT(S, A, B)	printk(KERN_DEBUG S "\n", A, B)
-
-#ifdef DBG
-#define DEBUGOUT(S)		printk(KERN_DEBUG S "\n")
-#define DEBUGOUT1(S, A...)	printk(KERN_DEBUG S "\n", A)
-#else
 #define DEBUGOUT(S)
 #define DEBUGOUT1(S, A...)
-#endif
 
-#define DEBUGFUNC(F) DEBUGOUT(F)
+#define DEBUGFUNC(F) DEBUGOUT(F "\n")
 #define DEBUGOUT2 DEBUGOUT1
 #define DEBUGOUT3 DEBUGOUT2
 #define DEBUGOUT7 DEBUGOUT3



---
Auke Kok <auke-jan.h.kok@intel.com>

  parent reply	other threads:[~2006-12-08 22:54 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-08 23:02 [PATCH 00/22] ixgb, e1000 fixes Kok, Auke
2006-12-08 23:02 ` [PATCH 01/22] e1000: Fix early TSO completion Kok, Auke
2006-12-11 14:36   ` Jeff Garzik
2006-12-08 23:02 ` [PATCH 02/22] ixgb: Maybe stop TX if not enough free descriptors Kok, Auke
2006-12-11 14:37   ` Jeff Garzik
2006-12-08 23:02 ` [PATCH 03/22] ixgb: Write RA register high word first, increment version Kok, Auke
2006-12-11 14:37   ` Jeff Garzik
2006-12-08 23:02 ` [PATCH 04/22] e1000: display FC link properties Kok, Auke
2006-12-08 23:02 ` [PATCH 05/22] e1000: dynamic itr code fixes Kok, Auke
2006-12-08 23:02 ` [PATCH 06/22] e1000: minor tso ipv6 cleanups Kok, Auke
2006-12-11 14:42   ` Jeff Garzik
2006-12-08 23:02 ` [PATCH 07/22] e1000: omit stats for broken counter in 82543 Kok, Auke
2006-12-11 14:42   ` Jeff Garzik
2006-12-08 23:03 ` [PATCH 08/22] e1000: Fix all manageability workarounds Kok, Auke
2006-12-11 14:41   ` Jeff Garzik
2006-12-08 23:03 ` [PATCH 09/22] e1000: Fix PBA allocation calculations Kok, Auke
2006-12-08 23:03 ` [PATCH 10/22] e1000: Make copybreak parameter changeable by user Kok, Auke
2006-12-08 23:03 ` [PATCH 11/22] e1000: Fire a link even interrupt instead of a watchdog at init Kok, Auke
2006-12-11 22:48   ` Shaw Vrana
2006-12-08 23:03 ` [PATCH 12/22] e1000: Fix powerdown link loss when forced to gig speed Kok, Auke
2006-12-11 14:46   ` Jeff Garzik
2006-12-08 23:03 ` [PATCH 13/22] e1000: disable TSO when debugging slab Kok, Auke
2006-12-11 14:47   ` Jeff Garzik
2006-12-15  2:42     ` Herbert Xu
2006-12-08 23:03 ` [PATCH 14/22] e1000: always turn on receives on esb2 Kok, Auke
2006-12-11 14:47   ` Jeff Garzik
2006-12-08 23:03 ` [PATCH 15/22] e1000: simplify msi specific interrupt handler Kok, Auke
2006-12-11 14:48   ` Jeff Garzik
2006-12-08 23:03 ` [PATCH 16/22] e1000: Rewrite parm handling code to warn when forcing autoneg to gig only Kok, Auke
2006-12-08 23:03 ` [PATCH 17/22] e1000: set max frame size before enabling new link settings Kok, Auke
2006-12-08 23:03 ` [PATCH 18/22] e1000: For older adapters, we know that the pci bus type is pci Kok, Auke
2006-12-08 23:03 ` [PATCH 19/22] e1000: Don't set tipg (fiber) timings for pci-e adapters to fix fiber output Kok, Auke
2006-12-08 23:03 ` [PATCH 20/22] e1000: Fix poor quad port performance with NAPI Kok, Auke
2006-12-11 14:49   ` Jeff Garzik
2006-12-08 23:03 ` Kok, Auke [this message]
2006-12-11 14:50   ` [PATCH 21/22] e1000: Version increment 7.3.20-k2 and minor cleanups Jeff Garzik
2006-12-08 23:03 ` [PATCH 22/22] # This series applies on GIT commit 0ae851352a87db3f829511816a2da227860bf585 Kok, Auke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061208230331.30109.23517.stgit@gitlost.site \
    --to=auke-jan.h.kok@intel.com \
    --cc=auke@foo-projects.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=john.ronciak@intel.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.