summaryrefslogtreecommitdiff
path: root/usr/src/uts/common
diff options
context:
space:
mode:
authorsbehera <none@none>2007-10-11 15:56:24 -0700
committersbehera <none@none>2007-10-11 15:56:24 -0700
commit936117e260c5349fe6d7ee9e4d87afa399bbdc7f (patch)
tree1cd5721b36edce1ba6c0268a500cb9457b2e72a5 /usr/src/uts/common
parent45100b726a2249674d5bc4334098738a27dcaffd (diff)
downloadillumos-joyent-936117e260c5349fe6d7ee9e4d87afa399bbdc7f.tar.gz
6593733 Maramba fails the Clause 4 MAC test suite on the on-board Gigabit Ethernet
6614882 nxge driver fails loopback test when configured at 10Gbps on Monza
Diffstat (limited to 'usr/src/uts/common')
-rw-r--r--usr/src/uts/common/io/nxge/nxge_hw.c39
-rw-r--r--usr/src/uts/common/io/nxge/nxge_mac.c3
2 files changed, 31 insertions, 11 deletions
diff --git a/usr/src/uts/common/io/nxge/nxge_hw.c b/usr/src/uts/common/io/nxge/nxge_hw.c
index b861c47507..c17e289ead 100644
--- a/usr/src/uts/common/io/nxge/nxge_hw.c
+++ b/usr/src/uts/common/io/nxge/nxge_hw.c
@@ -607,10 +607,16 @@ nxge_loopback_ioctl(p_nxge_t nxgep, queue_t *wq, mblk_t *mp,
size = sizeof (lb_normal);
if (nxgep->statsp->mac_stats.cap_10gfdx) {
size += sizeof (lb_external10g);
- size += sizeof (lb_phy10g);
- size += sizeof (lb_serdes10g);
size += sizeof (lb_mac10g);
+ /* Publish PHY loopback if PHY is present */
+ if (nxgep->mac.portmode == PORT_10G_COPPER ||
+ nxgep->mac.portmode == PORT_10G_FIBER)
+ size += sizeof (lb_phy10g);
}
+ if (nxgep->mac.portmode == PORT_10G_FIBER ||
+ nxgep->mac.portmode == PORT_10G_SERDES)
+ size += sizeof (lb_serdes10g);
+
if (nxgep->statsp->mac_stats.cap_1000fdx) {
size += sizeof (lb_external1000);
size += sizeof (lb_mac1000);
@@ -623,8 +629,8 @@ nxge_loopback_ioctl(p_nxge_t nxgep, queue_t *wq, mblk_t *mp,
size += sizeof (lb_external100);
if (nxgep->statsp->mac_stats.cap_10fdx)
size += sizeof (lb_external10);
- else if ((nxgep->mac.portmode == PORT_1G_FIBER) ||
- (nxgep->mac.portmode == PORT_1G_SERDES))
+ if (nxgep->mac.portmode == PORT_1G_FIBER ||
+ nxgep->mac.portmode == PORT_1G_SERDES)
size += sizeof (lb_serdes1000);
*(lb_info_sz_t *)mp->b_cont->b_rptr = size;
@@ -642,10 +648,16 @@ nxge_loopback_ioctl(p_nxge_t nxgep, queue_t *wq, mblk_t *mp,
size = sizeof (lb_normal);
if (nxgep->statsp->mac_stats.cap_10gfdx) {
size += sizeof (lb_external10g);
- size += sizeof (lb_phy10g);
- size += sizeof (lb_serdes10g);
size += sizeof (lb_mac10g);
+ /* Publish PHY loopback if PHY is present */
+ if (nxgep->mac.portmode == PORT_10G_COPPER ||
+ nxgep->mac.portmode == PORT_10G_FIBER)
+ size += sizeof (lb_phy10g);
}
+ if (nxgep->mac.portmode == PORT_10G_FIBER ||
+ nxgep->mac.portmode == PORT_10G_SERDES)
+ size += sizeof (lb_serdes10g);
+
if (nxgep->statsp->mac_stats.cap_1000fdx) {
size += sizeof (lb_external1000);
size += sizeof (lb_mac1000);
@@ -658,8 +670,8 @@ nxge_loopback_ioctl(p_nxge_t nxgep, queue_t *wq, mblk_t *mp,
size += sizeof (lb_external100);
if (nxgep->statsp->mac_stats.cap_10fdx)
size += sizeof (lb_external10);
- else if ((nxgep->mac.portmode == PORT_1G_FIBER) ||
- (nxgep->mac.portmode == PORT_1G_SERDES))
+ if (nxgep->mac.portmode == PORT_1G_FIBER ||
+ nxgep->mac.portmode == PORT_1G_SERDES)
size += sizeof (lb_serdes1000);
NXGE_DEBUG_MSG((nxgep, IOC_CTL,
@@ -670,10 +682,17 @@ nxge_loopback_ioctl(p_nxge_t nxgep, queue_t *wq, mblk_t *mp,
lb_props[i++] = lb_normal;
if (nxgep->statsp->mac_stats.cap_10gfdx) {
lb_props[i++] = lb_mac10g;
- lb_props[i++] = lb_serdes10g;
- lb_props[i++] = lb_phy10g;
+ if (nxgep->mac.portmode ==
+ PORT_10G_COPPER ||
+ nxgep->mac.portmode ==
+ PORT_10G_FIBER)
+ lb_props[i++] = lb_phy10g;
lb_props[i++] = lb_external10g;
}
+ if (nxgep->mac.portmode == PORT_10G_FIBER ||
+ nxgep->mac.portmode == PORT_10G_SERDES)
+ lb_props[i++] = lb_serdes10g;
+
if (nxgep->statsp->mac_stats.cap_1000fdx)
lb_props[i++] = lb_external1000;
if (nxgep->statsp->mac_stats.cap_100fdx)
diff --git a/usr/src/uts/common/io/nxge/nxge_mac.c b/usr/src/uts/common/io/nxge/nxge_mac.c
index f7af1909c9..2ed8e06d7c 100644
--- a/usr/src/uts/common/io/nxge/nxge_mac.c
+++ b/usr/src/uts/common/io/nxge/nxge_mac.c
@@ -1937,8 +1937,9 @@ nxge_tx_mac_init(p_nxge_t nxgep)
SET_MAC_ATTR2(handle, ap, portn,
MAC_PORT_FRAME_SIZE, 64, 0x2400, rs);
} else {
+ /* Do not add CRC 4 bytes to the max or the min frame size */
SET_MAC_ATTR2(handle, ap, portn,
- MAC_PORT_FRAME_SIZE, 64, 0x5EE + 4, rs);
+ MAC_PORT_FRAME_SIZE, 64, 0x5EE, rs);
}
if (rs != NPI_SUCCESS)