I think it's going to take me a bit of time to look into this, but I don' t 
think you can reset it with a static value. Let me go poke at some other people 
and see what they think.

Todd Fujinaka
Software Application Engineer
Networking Division (ND)
Intel Corporation
[email protected]
(503) 712-4565

-----Original Message-----
From: Jeff Westfahl [mailto:[email protected]] 
Sent: Thursday, May 08, 2014 8:39 AM
To: [email protected]
Subject: Re: [E1000-devel] i210 register TXPBSIZE is only reset at power-on

Looks like my attachment was stripped, here's the patch inline:

>From f4fd2e861c77a45509f1c79a505f44add064807d Mon Sep 17 00:00:00 2001
From: Jeff Westfahl <[email protected]>
Date: Thu, 8 May 2014 09:05:02 -0500
Subject: [PATCH] igb: Reset TXPBSIZE to default value

The TXPBSIZE register of the i210 resets to its default value only at power-on. 
It doesn't reset if you reboot the system, only if you pull power. If something 
(another driver, another OS, etc.) modifies this register from its default 
value, the igb driver doesn't function correctly. It detects a hang of the 
transmitter and continuously resets the adapter. Here we set this value to its 
default when resetting the
i210 to resolve this issue.

Signed-off-by: Jeff Westfahl <[email protected]>
---
  drivers/net/ethernet/intel/igb/e1000_82575.c   | 4 ++++
  drivers/net/ethernet/intel/igb/e1000_defines.h | 3 +++
  drivers/net/ethernet/intel/igb/e1000_regs.h    | 1 +
  3 files changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c
b/drivers/net/ethernet/intel/igb/e1000_82575.c
index ff6a17c..c6c6c41 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -2021,6 +2021,10 @@ static s32 igb_reset_hw_82580(struct e1000_hw *hw)
        wr32(E1000_TCTL, E1000_TCTL_PSP);
        wrfl();

+       if (hw->mac.type == e1000_i210)
+               /* TXPBSIZE resets only on power-up. */
+               wr32(E1000_TXPBSIZE, E1000_TXPBSIZE_RESET);
+
        msleep(10);

        /* Determine whether or not a global dev reset is requested */ diff 
--git a/drivers/net/ethernet/intel/igb/e1000_defines.h
b/drivers/net/ethernet/intel/igb/e1000_defines.h
index 31a0f82..90cb372 100644
--- a/drivers/net/ethernet/intel/igb/e1000_defines.h
+++ b/drivers/net/ethernet/intel/igb/e1000_defines.h
@@ -293,6 +293,9 @@
  #define E1000_TCTL_COLD   0x003ff000    /* collision distance */
  #define E1000_TCTL_RTLC   0x01000000    /* Re-transmit on late collision 
*/

+/* Transmit Packet Buffer Size */
+#define E1000_TXPBSIZE_RESET 0x04000014
+
  /* DMA Coalescing register fields */
  #define E1000_DMACR_DMACWT_MASK         0x00003FFF /* DMA Coalescing
                                                        * Watchdog Timer
*/
diff --git a/drivers/net/ethernet/intel/igb/e1000_regs.h
b/drivers/net/ethernet/intel/igb/e1000_regs.h
index 82632c6..dffb1aa 100644
--- a/drivers/net/ethernet/intel/igb/e1000_regs.h
+++ b/drivers/net/ethernet/intel/igb/e1000_regs.h
@@ -63,6 +63,7 @@
  #define E1000_TCTL     0x00400  /* TX Control - RW */
  #define E1000_TCTL_EXT 0x00404  /* Extended TX Control - RW */
  #define E1000_TIPG     0x00410  /* TX Inter-packet gap -RW */
+#define E1000_TXPBSIZE 0x03404  /* Transmit Packet Buffer Size - RW */
  #define E1000_AIT      0x00458  /* Adaptive Interframe Spacing Throttle - 
RW */
  #define E1000_LEDCTL   0x00E00  /* LED Control - RW */
  #define E1000_LEDMUX   0x08130  /* LED MUX Control */
--
1.8.1.2

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity &#149; Requirements for 
releasing software faster &#149; Expert tips and advice for migrating your SCM 
now http://p.sf.net/sfu/perforce _______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to