brcm47xx: BGMAC Driver corrections

1) Fix what appears to be a logic error in bgmac_phy_advertise.

2) Fix bgmac_ioctl to use passed phy_id; needed for switch-robo
interface w/ the driver to work correctly.  I still have the issue
with the interface always being HD when the speed/duplex is set
manually (e.g., echo "100FD" > /proc/switch/eth0/port/N/media).

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

SVN-Revision: 35052
master
Hauke Mehrtens 12 years ago
parent 3b27974c7a
commit 7b0af8193b
  1. 6
      target/linux/brcm47xx/patches-3.6/750-bgmac.patch

@ -608,7 +608,7 @@
+ if (bgmac->phyaddr == BGMAC_PHY_NOREGS) + if (bgmac->phyaddr == BGMAC_PHY_NOREGS)
+ return; + return;
+ +
+ if (bgmac->autoneg) + if (!bgmac->autoneg)
+ return; + return;
+ +
+ /* Adv selected 10/100 speeds */ + /* Adv selected 10/100 speeds */
@ -1097,13 +1097,13 @@
+ case SIOCGMIIREG: + case SIOCGMIIREG:
+ if (!netif_running(net_dev)) + if (!netif_running(net_dev))
+ return -EAGAIN; + return -EAGAIN;
+ data->val_out = bgmac_phy_read(bgmac, bgmac->phyaddr, + data->val_out = bgmac_phy_read(bgmac, data->phy_id,
+ data->reg_num & 0x1f); + data->reg_num & 0x1f);
+ return 0; + return 0;
+ case SIOCSMIIREG: + case SIOCSMIIREG:
+ if (!netif_running(net_dev)) + if (!netif_running(net_dev))
+ return -EAGAIN; + return -EAGAIN;
+ bgmac_phy_write(bgmac, bgmac->phyaddr, data->reg_num & 0x1f, + bgmac_phy_write(bgmac, data->phy_id, data->reg_num & 0x1f,
+ data->val_in); + data->val_in);
+ return 0; + return 0;
+ default: + default:

Loading…
Cancel
Save