svn commit: r256319 - stable/10/sys/dev/bxe
Eric Davis
edavis at FreeBSD.org
Fri Oct 11 17:34:21 UTC 2013
Author: edavis
Date: Fri Oct 11 17:34:20 2013
New Revision: 256319
URL: http://svnweb.freebsd.org/changeset/base/256319
Log:
Merge r256299 from head.
Approved by: re@ (gjb)
Approved by: davidch (mentor)
Modified:
stable/10/sys/dev/bxe/bxe.c
stable/10/sys/dev/bxe/bxe_stats.c
stable/10/sys/dev/bxe/ecore_sp.h
Directory Properties:
stable/10/sys/ (props changed)
Modified: stable/10/sys/dev/bxe/bxe.c
==============================================================================
--- stable/10/sys/dev/bxe/bxe.c Fri Oct 11 17:10:28 2013 (r256318)
+++ stable/10/sys/dev/bxe/bxe.c Fri Oct 11 17:34:20 2013 (r256319)
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#define BXE_DRIVER_VERSION "1.78.17"
+#define BXE_DRIVER_VERSION "1.78.18"
#include "bxe.h"
#include "ecore_sp.h"
@@ -936,8 +936,8 @@ bxe_dma_alloc(struct bxe_softc *sc,
int rc;
if (dma->size > 0) {
- BLOGE(sc, "dma block '%s' already has size %lu\n", msg,
- (unsigned long) dma->size);
+ BLOGE(sc, "dma block '%s' already has size %lu\n", msg,
+ (unsigned long)dma->size);
return (1);
}
@@ -14201,8 +14201,14 @@ bxe_media_detect(struct bxe_softc *sc)
uint32_t phy_idx = bxe_get_cur_phy_idx(sc);
switch (sc->link_params.phy[phy_idx].media_type) {
case ELINK_ETH_PHY_SFPP_10G_FIBER:
- case ELINK_ETH_PHY_SFP_1G_FIBER:
case ELINK_ETH_PHY_XFP_FIBER:
+ BLOGI(sc, "Found 10Gb Fiber media.\n");
+ sc->media = IFM_10G_SR;
+ break;
+ case ELINK_ETH_PHY_SFP_1G_FIBER:
+ BLOGI(sc, "Found 1Gb Fiber media.\n");
+ sc->media = IFM_1000_SX;
+ break;
case ELINK_ETH_PHY_KR:
case ELINK_ETH_PHY_CX4:
BLOGI(sc, "Found 10GBase-CX4 media.\n");
@@ -14213,8 +14219,14 @@ bxe_media_detect(struct bxe_softc *sc)
sc->media = IFM_10G_TWINAX;
break;
case ELINK_ETH_PHY_BASE_T:
- BLOGI(sc, "Found 10GBase-T media.\n");
- sc->media = IFM_10G_T;
+ if (sc->link_params.speed_cap_mask[0] &
+ PORT_HW_CFG_SPEED_CAPABILITY_D0_10G) {
+ BLOGI(sc, "Found 10GBase-T media.\n");
+ sc->media = IFM_10G_T;
+ } else {
+ BLOGI(sc, "Found 1000Base-T media.\n");
+ sc->media = IFM_1000_T;
+ }
break;
case ELINK_ETH_PHY_NOT_PRESENT:
BLOGI(sc, "Media not present.\n");
Modified: stable/10/sys/dev/bxe/bxe_stats.c
==============================================================================
--- stable/10/sys/dev/bxe/bxe_stats.c Fri Oct 11 17:10:28 2013 (r256318)
+++ stable/10/sys/dev/bxe/bxe_stats.c Fri Oct 11 17:34:20 2013 (r256319)
@@ -263,6 +263,17 @@ bxe_stats_pmf_update(struct bxe_softc *s
int loader_idx = PMF_DMAE_C(sc);
uint32_t *stats_comp = BXE_SP(sc, stats_comp);
+ if (sc->devinfo.bc_ver <= 0x06001400) {
+ /*
+ * Bootcode v6.0.21 fixed a GRC timeout that occurs when accessing
+ * BRB registers while the BRB block is in reset. The DMA transfer
+ * below triggers this issue resulting in the DMAE to stop
+ * functioning. Skip this initial stats transfer for old bootcode
+ * versions <= 6.0.20.
+ */
+ return;
+ }
+
/* sanity */
if (!sc->port.pmf || !sc->port.port_stx) {
BLOGE(sc, "BUG!\n");
Modified: stable/10/sys/dev/bxe/ecore_sp.h
==============================================================================
--- stable/10/sys/dev/bxe/ecore_sp.h Fri Oct 11 17:10:28 2013 (r256318)
+++ stable/10/sys/dev/bxe/ecore_sp.h Fri Oct 11 17:34:20 2013 (r256319)
@@ -77,9 +77,14 @@ struct bxe_softc;
typedef bus_addr_t ecore_dma_addr_t; /* expected to be 64 bit wide */
typedef volatile int ecore_atomic_t;
-#if __FreeBSD_version < 1000002
-typedef int bool;
+#ifndef __bool_true_false_are_defined
+#ifndef __cplusplus
+#define bool _Bool
+#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER)
+typedef _Bool bool;
#endif
+#endif /* !__cplusplus */
+#endif /* !__bool_true_false_are_defined$ */
#define ETH_ALEN ETHER_ADDR_LEN /* 6 */
More information about the svn-src-stable-10
mailing list