]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
igb: fix hung at dev_get_stats()
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 1 Apr 2016 06:15:27 +0000 (08:15 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 1 Apr 2016 06:20:36 +0000 (08:20 +0200)
without this igb can bring the whole userspace to hung
with "cpu_stuck for more than 22s". I don't understand
why this bug is set to "wont-fix" at the bugtracker.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
lfs/igb
src/patches/igb-5.3.4.4_fix_hung_at_dev_get_stats.patch [new file with mode: 0644]

diff --git a/lfs/igb b/lfs/igb
index 0b817a84ad593325cbb7e54c25a8c06b1d00d213..d00a1e1c90c41279b43b034ee20a9018c72718d8 100644 (file)
--- a/lfs/igb
+++ b/lfs/igb
@@ -79,6 +79,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        -mv $(MODPATH)/igb.ko \
            $(MODPATH)/igb.ko.org
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/igb-5.3.4.4_fix_hung_at_dev_get_stats.patch
        cd $(DIR_APP)/src && make BUILD_KERNEL=$(KVER)-$(VERSUFIX)
        cd $(DIR_APP)/src && install -m 644 igb.ko $(MODPATH)
        @rm -rf $(DIR_APP)
diff --git a/src/patches/igb-5.3.4.4_fix_hung_at_dev_get_stats.patch b/src/patches/igb-5.3.4.4_fix_hung_at_dev_get_stats.patch
new file mode 100644 (file)
index 0000000..a92c441
--- /dev/null
@@ -0,0 +1,35 @@
+Don't read phy_idle_errors at dev_get_stats() because this can
+hung the userspace.
+
+https://sourceforge.net/p/e1000/bugs/500/
+Why this is set to wont-fix?
+
+I think it is better when phy errors are not reportet in the stats
+than a random hanging of the whole sytem.
+
+diff -Naur igb-5.3.4.4.org/src/igb_main.c igb-5.3.4.4/src/igb_main.c
+--- igb-5.3.4.4.org/src/igb_main.c     2016-02-26 01:48:39.000000000 +0100
++++ igb-5.3.4.4/src/igb_main.c 2016-03-31 09:22:10.671794282 +0200
+@@ -6032,14 +6032,14 @@
+       /* Tx Dropped needs to be maintained elsewhere */
+-      /* Phy Stats */
+-      if (hw->phy.media_type == e1000_media_type_copper) {
+-              if ((adapter->link_speed == SPEED_1000) &&
+-                 (!e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_tmp))) {
+-                      phy_tmp &= PHY_IDLE_ERROR_COUNT_MASK;
+-                      adapter->phy_stats.idle_errors += phy_tmp;
+-              }
+-      }
++//    /* Phy Stats */
++//    if (hw->phy.media_type == e1000_media_type_copper) {
++//            if ((adapter->link_speed == SPEED_1000) &&
++//               (!e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_tmp))) {
++//                    phy_tmp &= PHY_IDLE_ERROR_COUNT_MASK;
++//                    adapter->phy_stats.idle_errors += phy_tmp;
++//            }
++//    }
+       /* Management Stats */
+       adapter->stats.mgptc += E1000_READ_REG(hw, E1000_MGTPTC);