Modify

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#11268 closed defect (fixed)

[PATCH] b44 fix workaround detection on some brcm47xx boards

Reported by: b.sander Owned by: hauke
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: workaround b44 brcm47xx Cc:

Description

Hi,

because of api change of nvram_getenv, the workaround failed to detect the hardware

Index: target/linux/brcm47xx/patches-3.2/210-b44_phy_fix.patch
===================================================================
--- target/linux/brcm47xx/patches-3.2/210-b44_phy_fix.patch	(Revision 31236)
+++ target/linux/brcm47xx/patches-3.2/210-b44_phy_fix.patch	(Arbeitskopie)
@@ -1,6 +1,6 @@
 --- a/drivers/net/ethernet/broadcom/b44.c
 +++ b/drivers/net/ethernet/broadcom/b44.c
-@@ -410,10 +410,41 @@ static void b44_wap54g10_workaround(stru
+@@ -410,10 +410,40 @@ static void b44_wap54g10_workaround(stru
  error:
  	pr_warning("PHY: cannot reset MII transceiver isolate bit\n");
  }
@@ -10,23 +10,22 @@
 +       return !strncmp(source,cmp,strlen(cmp)); 
 +}
 +
-+static inline void b44_bcm47xx_workarounds(struct b44 *bp)
++static void b44_bcm47xx_workarounds(struct b44 *bp)
 +{
 +	char buf[20];
-+	/* Toshiba WRC-1000, Siemens SE505 v1, Askey RT-210W, RT-220W */
-+	if (nvram_getenv("boardnum", buf, sizeof(buf)) > 0)
-+		return;
-+	if (simple_strtoul(buf, NULL, 0) == 100) {
-+		bp->phy_addr = B44_PHY_ADDR_NO_PHY;
-+	} else {
-+		/* WL-HDD */
-+		struct ssb_device *sdev = bp->sdev;
-+		if (nvram_getenv("hardware_version", buf, sizeof(buf)) > 0)
-+			return;
-+		if (startswith(buf, "WL300-")) {
-+			if (sdev->bus->sprom.et0phyaddr == 0 &&
-+			    sdev->bus->sprom.et1phyaddr == 1)
-+				bp->phy_addr = B44_PHY_ADDR_NO_PHY;
++	if (nvram_getenv("boardnum", buf, sizeof(buf)) >= 0) {
++		/* Toshiba WRC-1000, Siemens SE505 v1, Askey RT-210W, RT-220W */
++		if (simple_strtoul(buf, NULL, 0) == 100) {
++			bp->phy_addr = B44_PHY_ADDR_NO_PHY;
++		} else {
++			/* WL-HDD */
++			struct ssb_device *sdev = bp->sdev;
++			if (nvram_getenv("hardware_version", buf, sizeof(buf)) >= 0 &&
++			    startswith(buf, "WL300-")) {
++				if (sdev->bus->sprom.et0phyaddr == 0 &&
++				    sdev->bus->sprom.et1phyaddr == 1)
++					bp->phy_addr = B44_PHY_ADDR_NO_PHY;
++			}
 +		}
 +	}
 +	return;

Regards,
b.sander

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by jow

  • Owner changed from developers to hauke
  • Status changed from new to assigned

comment:2 Changed 6 years ago by hauke

  • Resolution set to fixed
  • Status changed from assigned to closed

This is fixed in r31470.

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.