Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 218021 Details for
Bug 320841
[Broadcom 5.1 Regression] tg3 3.77 to 3.79 polarity-bit-revert patch
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to fix regression in tg3 v. 3.79
tg3-polarity-bit-revert.patch (text/plain), 4.32 KB, created by
Andrius Benokraitis
on 2007-10-05 21:03:26 UTC
(
hide
)
Description:
Patch to fix regression in tg3 v. 3.79
Filename:
MIME Type:
Creator:
Andrius Benokraitis
Created:
2007-10-05 21:03:26 UTC
Size:
4.32 KB
patch
obsolete
>--- linux-2.6.18.i686/drivers/net/tg3.c.polarity-fix 2007-10-05 10:44:40.000000000 -0400 >+++ linux-2.6.18.i686/drivers/net/tg3.c 2007-10-05 10:47:38.000000000 -0400 >@@ -1241,19 +1241,6 @@ static void tg3_frob_aux_power(struct tg > } > } > >-static int tg3_5700_link_polarity(struct tg3 *tp, u32 speed) >-{ >- if (tp->led_ctrl == LED_CTRL_MODE_PHY_2) >- return 1; >- else if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5411) { >- if (speed != SPEED_10) >- return 1; >- } else if (speed == SPEED_10) >- return 1; >- >- return 0; >-} >- > static int tg3_setup_phy(struct tg3 *, int); > > #define RESET_KIND_SHUTDOWN 0 >@@ -1412,17 +1399,9 @@ static int tg3_set_power_state(struct tg > else > mac_mode = MAC_MODE_PORT_MODE_MII; > >- mac_mode |= tp->mac_mode & MAC_MODE_LINK_POLARITY; >- if (GET_ASIC_REV(tp->pci_chip_rev_id) == >- ASIC_REV_5700) { >- u32 speed = (tp->tg3_flags & >- TG3_FLAG_WOL_SPEED_100MB) ? >- SPEED_100 : SPEED_10; >- if (tg3_5700_link_polarity(tp, speed)) >- mac_mode |= MAC_MODE_LINK_POLARITY; >- else >- mac_mode &= ~MAC_MODE_LINK_POLARITY; >- } >+ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 || >+ !(tp->tg3_flags & TG3_FLAG_WOL_SPEED_100MB)) >+ mac_mode |= MAC_MODE_LINK_POLARITY; > } else { > mac_mode = MAC_MODE_PORT_MODE_TBI; > } >@@ -2090,12 +2069,15 @@ relink: > if (tp->link_config.active_duplex == DUPLEX_HALF) > tp->mac_mode |= MAC_MODE_HALF_DUPLEX; > >+ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; > if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) { >- if (current_link_up == 1 && >- tg3_5700_link_polarity(tp, tp->link_config.active_speed)) >+ if ((tp->led_ctrl == LED_CTRL_MODE_PHY_2) || >+ (current_link_up == 1 && >+ tp->link_config.active_speed == SPEED_10)) >+ tp->mac_mode |= MAC_MODE_LINK_POLARITY; >+ } else { >+ if (current_link_up == 1) > tp->mac_mode |= MAC_MODE_LINK_POLARITY; >- else >- tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; > } > > /* ??? Without this setting Netgear GA302T PHY does not >@@ -2736,9 +2718,6 @@ static int tg3_setup_fiber_by_hand(struc > > tw32_f(MAC_MODE, (tp->mac_mode | MAC_MODE_SEND_CONFIGS)); > udelay(40); >- >- tw32_f(MAC_MODE, tp->mac_mode); >- udelay(40); > } > > out: >@@ -2798,6 +2777,10 @@ static int tg3_setup_fiber_phy(struct tg > else > current_link_up = tg3_setup_fiber_by_hand(tp, mac_status); > >+ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; >+ tw32_f(MAC_MODE, tp->mac_mode); >+ udelay(40); >+ > tp->hw_status->status = > (SD_STATUS_UPDATED | > (tp->hw_status->status & ~SD_STATUS_LINK_CHG)); >@@ -6570,10 +6553,6 @@ static int tg3_reset_hw(struct tg3 *tp, > > tp->mac_mode = MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE | > MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE | MAC_MODE_FHDE_ENABLE; >- if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && >- !(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) && >- GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) >- tp->mac_mode |= MAC_MODE_LINK_POLARITY; > tw32_f(MAC_MODE, tp->mac_mode | MAC_MODE_RXSTAT_CLEAR | MAC_MODE_TXSTAT_CLEAR); > udelay(40); > >@@ -8940,9 +8919,7 @@ static int tg3_run_loopback(struct tg3 * > return 0; > > mac_mode = (tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK) | >- MAC_MODE_PORT_INT_LPBACK; >- if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) >- mac_mode |= MAC_MODE_LINK_POLARITY; >+ MAC_MODE_PORT_INT_LPBACK | MAC_MODE_LINK_POLARITY; > if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) > mac_mode |= MAC_MODE_PORT_MODE_MII; > else >@@ -8972,7 +8949,8 @@ static int tg3_run_loopback(struct tg3 * > tg3_writephy(tp, MII_BMCR, val); > udelay(40); > >- mac_mode = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK; >+ mac_mode = (tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK) | >+ MAC_MODE_LINK_POLARITY; > if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) { > tg3_writephy(tp, MII_TG3_EPHY_PTEST, 0x1800); > mac_mode |= MAC_MODE_PORT_MODE_MII; >@@ -8985,11 +8963,8 @@ static int tg3_run_loopback(struct tg3 * > udelay(10); > tw32_f(MAC_RX_MODE, tp->rx_mode); > } >- if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) { >- if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) >- mac_mode &= ~MAC_MODE_LINK_POLARITY; >- else if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5411) >- mac_mode |= MAC_MODE_LINK_POLARITY; >+ if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { >+ mac_mode &= ~MAC_MODE_LINK_POLARITY; > tg3_writephy(tp, MII_TG3_EXT_CTRL, > MII_TG3_EXT_CTRL_LNK3_LED_MODE); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 320841
: 218021