Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2014 18:31:44 +0000 (UTC)
From:      David C Somayajulu <davidcs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r271479 - stable/7/sys/dev/bxe
Message-ID:  <201409121831.s8CIViX4089314@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidcs
Date: Fri Sep 12 18:31:44 2014
New Revision: 271479
URL: http://svnweb.freebsd.org/changeset/base/271479

Log:
      MFC r268854
        Initiate error recovery stats fail to update after 3 retries.
        Change bxe_panic() ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() to
        panic only if ECORE_STOP_ON_ERROR is defined.

Modified:
  stable/7/sys/dev/bxe/bxe.c
  stable/7/sys/dev/bxe/bxe.h
  stable/7/sys/dev/bxe/bxe_stats.c
  stable/7/sys/dev/bxe/ecore_reg.h
  stable/7/sys/dev/bxe/ecore_sp.h
Directory Properties:
  stable/7/   (props changed)
  stable/7/sys/   (props changed)

Modified: stable/7/sys/dev/bxe/bxe.c
==============================================================================
--- stable/7/sys/dev/bxe/bxe.c	Fri Sep 12 18:27:20 2014	(r271478)
+++ stable/7/sys/dev/bxe/bxe.c	Fri Sep 12 18:31:44 2014	(r271479)
@@ -11488,6 +11488,10 @@ bxe_process_kill(struct bxe_softc *sc,
     bxe_process_kill_chip_reset(sc, global);
     mb();
 
+    /* clear errors in PGB */
+    if (!CHIP_IS_E1(sc))
+        REG_WR(sc, PGLUE_B_REG_LATCHED_ERRORS_CLR, 0x7f);
+
     /* Recover after reset: */
     /* MCP */
     if (global && bxe_reset_mcp_comp(sc, val)) {

Modified: stable/7/sys/dev/bxe/bxe.h
==============================================================================
--- stable/7/sys/dev/bxe/bxe.h	Fri Sep 12 18:27:20 2014	(r271478)
+++ stable/7/sys/dev/bxe/bxe.h	Fri Sep 12 18:31:44 2014	(r271479)
@@ -2301,11 +2301,20 @@ void ecore_storm_memset_struct(struct bx
         }                                             \
     } while(0)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define bxe_panic(sc, msg) \
     do {                   \
         panic msg;         \
     } while (0)
 
+#else
+
+#define bxe_panic(sc, msg) \
+    device_printf((sc)->dev, "%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__);
+
+#endif
+
 #define CATC_TRIGGER(sc, data) REG_WR((sc), 0x2000, (data));
 #define CATC_TRIGGER_START(sc) CATC_TRIGGER((sc), 0xcafecafe)
 

Modified: stable/7/sys/dev/bxe/bxe_stats.c
==============================================================================
--- stable/7/sys/dev/bxe/bxe_stats.c	Fri Sep 12 18:27:20 2014	(r271478)
+++ stable/7/sys/dev/bxe/bxe_stats.c	Fri Sep 12 18:31:44 2014	(r271479)
@@ -1306,7 +1306,10 @@ bxe_stats_update(struct bxe_softc *sc)
 
         if (bxe_storm_stats_update(sc)) {
             if (sc->stats_pending++ == 3) {
-                bxe_panic(sc, ("storm stats not updated for 3 times\n"));
+		if (sc->ifnet->if_drv_flags & IFF_DRV_RUNNING) {
+			atomic_store_rel_long(&sc->chip_tq_flags, CHIP_TQ_REINIT);
+			taskqueue_enqueue(sc->chip_tq, &sc->chip_tq_task);
+		}
             }
             return;
         }

Modified: stable/7/sys/dev/bxe/ecore_reg.h
==============================================================================
--- stable/7/sys/dev/bxe/ecore_reg.h	Fri Sep 12 18:27:20 2014	(r271478)
+++ stable/7/sys/dev/bxe/ecore_reg.h	Fri Sep 12 18:31:44 2014	(r271479)
@@ -1039,6 +1039,8 @@ __FBSDID("$FreeBSD$");
 	0x942cUL
 #define PGLUE_B_REG_INTERNAL_PFID_ENABLE_TARGET_READ \
 	0x9430UL
+#define PGLUE_B_REG_LATCHED_ERRORS_CLR \
+	0x943CUL
 #define PGLUE_B_REG_PGLUE_B_INT_STS \
 	0x9298UL
 #define PGLUE_B_REG_PGLUE_B_INT_STS_CLR \

Modified: stable/7/sys/dev/bxe/ecore_sp.h
==============================================================================
--- stable/7/sys/dev/bxe/ecore_sp.h	Fri Sep 12 18:27:20 2014	(r271478)
+++ stable/7/sys/dev/bxe/ecore_sp.h	Fri Sep 12 18:31:44 2014	(r271479)
@@ -223,6 +223,8 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
 #define ecore_sp_post(_sc, _a, _b, _c, _d) \
     bxe_sp_post(_sc, _a, _b, U64_HI(_c), U64_LO(_c), _d)
 
+#ifdef ECORE_STOP_ON_ERROR
+
 #define ECORE_DBG_BREAK_IF(exp)     \
     do {                            \
         if (__predict_false(exp)) { \
@@ -242,6 +244,20 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m
         }                                                \
     } while (0)
 
+#else
+
+#define ECORE_DBG_BREAK_IF(exp)     \
+    printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG(exp)     \
+    printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__);
+
+#define ECORE_BUG_ON(exp)     \
+    printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__);
+
+
+#endif /* #ifdef ECORE_STOP_ON_ERROR */
+
 #define ECORE_ERR(str, ...) \
     BLOGE(sc, "ECORE: " str, ##__VA_ARGS__)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409121831.s8CIViX4089314>