Mercurial > illumos > illumos-gate
changeset 11065:fb7e90cc9e53
6836071 onboard bge PHY is streaming garbage when unplumbed
author | Rijawanemohammadhusen Nadaf<Riz.Nadaf@Sun.COM> |
---|---|
date | Fri, 13 Nov 2009 14:46:03 +0530 |
parents | 51207b1af901 |
children | cebb50cbe4f9 |
files | usr/src/uts/common/io/bge/bge_main2.c usr/src/uts/common/io/bge/bge_mii.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/bge/bge_main2.c Fri Nov 13 09:02:24 2009 +0100 +++ b/usr/src/uts/common/io/bge/bge_main2.c Fri Nov 13 14:46:03 2009 +0530 @@ -37,7 +37,7 @@ /* * Make sure you keep the version ID up to date! */ -static char bge_version[] = "Broadcom Gb Ethernet v1.12"; +static char bge_version[] = "Broadcom Gb Ethernet v1.13"; /* * Property names
--- a/usr/src/uts/common/io/bge/bge_mii.c Fri Nov 13 09:02:24 2009 +0100 +++ b/usr/src/uts/common/io/bge/bge_mii.c Fri Nov 13 14:46:03 2009 +0530 @@ -418,6 +418,7 @@ boolean_t reset_success; boolean_t phy_locked; uint16_t extctrl; + uint16_t gigctrl; uint_t retries; for (retries = 0; retries < 5; ++retries) { @@ -444,6 +445,7 @@ bge_mii_put16(bgep, 0x0, 0x0140); /* Set to Master mode */ + gigctrl = bge_mii_get16(bgep, 0x9); bge_mii_put16(bgep, 0x9, 0x1800); /* Enable SM_DSP_CLOCK & 6dB */ @@ -486,6 +488,9 @@ /* Restore PHY back to operating state */ bge_mii_put16(bgep, 0x18, 0x0400); + /* Restore 1000BASE-T Control Register */ + bge_mii_put16(bgep, 0x9, gigctrl); + /* Enable transmitter and interrupt */ extctrl = bge_mii_get16(bgep, 0x10); bge_mii_put16(bgep, 0x10, extctrl & ~0x3000); @@ -825,15 +830,15 @@ if ((*bgep->physops->phys_restart)(bgep, B_FALSE) == DDI_FAILURE) return (DDI_FAILURE); bge_mii_put16(bgep, MII_AN_ADVERT, anar); - bge_mii_put16(bgep, MII_CONTROL, control); if (auxctrl & MII_AUX_CTRL_NORM_EXT_LOOPBACK) bge_mii_put16(bgep, MII_AUX_CONTROL, auxctrl); bge_mii_put16(bgep, MII_MSCONTROL, gigctrl); + bge_mii_put16(bgep, MII_CONTROL, control); BGE_DEBUG(("bge_update_copper: anar <- 0x%x", anar)); - BGE_DEBUG(("bge_update_copper: control <- 0x%x", control)); BGE_DEBUG(("bge_update_copper: auxctrl <- 0x%x", auxctrl)); BGE_DEBUG(("bge_update_copper: gigctrl <- 0x%x", gigctrl)); + BGE_DEBUG(("bge_update_copper: control <- 0x%x", control)); #if BGE_COPPER_WIRESPEED /*