Page MenuHomeFreeBSD

D10816.diff
No OneTemporary

D10816.diff

Index: head/sys/dev/bnxt/if_bnxt.c
===================================================================
--- head/sys/dev/bnxt/if_bnxt.c
+++ head/sys/dev/bnxt/if_bnxt.c
@@ -287,7 +287,7 @@
* iflib shared context
*/
-#define BNXT_DRIVER_VERSION "1.0.0.0"
+#define BNXT_DRIVER_VERSION "1.0.0.1"
char bnxt_driver_version[] = BNXT_DRIVER_VERSION;
extern struct if_txrx bnxt_txrx;
static struct if_shared_ctx bnxt_sctx_init = {
@@ -1158,7 +1158,12 @@
ifmr->ifm_active |= IFM_1000_SGMII;
break;
default:
- ifmr->ifm_active |= IFM_UNKNOWN;
+ /*
+ * Workaround:
+ * Don't return IFM_UNKNOWN until
+ * Stratus return proper media_type
+ */
+ ifmr->ifm_active |= IFM_1000_KX;
break;
}
break;
@@ -1198,7 +1203,12 @@
ifmr->ifm_active |= IFM_10G_T;
break;
default:
- ifmr->ifm_active |= IFM_UNKNOWN;
+ /*
+ * Workaround:
+ * Don't return IFM_UNKNOWN until
+ * Stratus return proper media_type
+ */
+ ifmr->ifm_active |= IFM_10G_CR1;
break;
}
break;
@@ -1219,7 +1229,12 @@
ifmr->ifm_active |= IFM_25G_SR;
break;
default:
- ifmr->ifm_active |= IFM_UNKNOWN;
+ /*
+ * Workaround:
+ * Don't return IFM_UNKNOWN until
+ * Stratus return proper media_type
+ */
+ ifmr->ifm_active |= IFM_25G_CR;
break;
}
break;
@@ -1255,7 +1270,12 @@
ifmr->ifm_active |= IFM_50G_KR2;
break;
default:
- ifmr->ifm_active |= IFM_UNKNOWN;
+ /*
+ * Workaround:
+ * Don't return IFM_UNKNOWN until
+ * Stratus return proper media_type
+ */
+ ifmr->ifm_active |= IFM_50G_CR2;
break;
}
break;
@@ -1276,7 +1296,12 @@
ifmr->ifm_active |= IFM_100G_SR4;
break;
default:
- ifmr->ifm_active |= IFM_UNKNOWN;
+ /*
+ * Workaround:
+ * Don't return IFM_UNKNOWN until
+ * Stratus return proper media_type
+ */
+ ifmr->ifm_active |= IFM_100G_CR4;
break;
}
default:
@@ -2031,9 +2056,6 @@
ifmedia_add(softc->media, IFM_ETHER | IFM_10G_CR1, 0,
NULL);
break;
- case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN:
- /* Auto only */
- break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4:
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2:
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR:
@@ -2114,6 +2136,32 @@
if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB)
ifmedia_add(softc->media, IFM_ETHER | IFM_1000_SGMII, 0,
NULL);
+ break;
+ case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN:
+ default:
+ /*
+ * Workaround for Cumulus & Stratus
+ * For Stratus:
+ * media_type is being returned as 0x0
+ * Return support speeds as 10G, 25G, 50G & 100G
+ *
+ * For Cumulus:
+ * phy_type is being returned as 0x14 (PHY_TYPE_40G_BASECR4)
+ * Return support speeds as 1G, 10G, 25G & 50G
+ */
+ if (pci_get_device(softc->dev) == BCM57454) {
+ /* For Stratus: 10G, 25G, 50G & 100G */
+ ifmedia_add(softc->media, IFM_ETHER | IFM_100G_CR4, 0, NULL);
+ ifmedia_add(softc->media, IFM_ETHER | IFM_50G_CR2, 0, NULL);
+ ifmedia_add(softc->media, IFM_ETHER | IFM_25G_CR, 0, NULL);
+ ifmedia_add(softc->media, IFM_ETHER | IFM_10G_CR1, 0, NULL);
+ } else if (pci_get_device(softc->dev) == BCM57414) {
+ /* For Cumulus: 1G, 10G, 25G & 50G */
+ ifmedia_add(softc->media, IFM_ETHER | IFM_50G_CR2, 0, NULL);
+ ifmedia_add(softc->media, IFM_ETHER | IFM_25G_CR, 0, NULL);
+ ifmedia_add(softc->media, IFM_ETHER | IFM_10G_CR1, 0, NULL);
+ ifmedia_add(softc->media, IFM_ETHER | IFM_1000_T, 0, NULL);
+ }
break;
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 5:21 PM (15 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14806619
Default Alt Text
D10816.diff (4 KB)

Event Timeline