summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.10/780-b44-phylib.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm47xx/patches-3.10/780-b44-phylib.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.10/780-b44-phylib.patch29
1 files changed, 12 insertions, 17 deletions
diff --git a/target/linux/brcm47xx/patches-3.10/780-b44-phylib.patch b/target/linux/brcm47xx/patches-3.10/780-b44-phylib.patch
index 244978b3f2..0295ca0e4d 100644
--- a/target/linux/brcm47xx/patches-3.10/780-b44-phylib.patch
+++ b/target/linux/brcm47xx/patches-3.10/780-b44-phylib.patch
@@ -155,7 +155,7 @@
}
static void b44_get_ringparam(struct net_device *dev,
-@@ -2102,20 +2027,81 @@ static const struct ethtool_ops b44_etht
+@@ -2102,20 +2027,74 @@ static const struct ethtool_ops b44_etht
static int b44_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
@@ -181,7 +181,7 @@
+{
+ struct b44 *bp = netdev_priv(dev);
+ struct phy_device *phydev = bp->phydev;
-+ int status_changed = 0;
++ bool status_changed = 0;
+
+ BUG_ON(!phydev);
+
@@ -196,14 +196,8 @@
+ bp->old_duplex = phydev->duplex;
+ }
+
-+ if (status_changed) {
-+ pr_info("%s: link %s", dev->name, phydev->link ?
-+ "UP" : "DOWN");
-+ if (phydev->link)
-+ pr_cont(" - %d/%s", phydev->speed,
-+ phydev->duplex == DUPLEX_FULL ? "full" : "half");
-+ pr_cont("\n");
-+ }
++ if (status_changed)
++ phy_print_status(phydev);
+}
+
+static int b44_mii_probe(struct net_device *dev)
@@ -219,7 +213,7 @@
+ phydev = phy_connect(dev, phy_id, &b44_adjust_link,
+ PHY_INTERFACE_MODE_MII);
+ if (IS_ERR(phydev)) {
-+ netdev_err(dev, "could not attach PHY: %s", phy_id);
++ netdev_err(dev, "could not attach PHY: %s\n", phy_id);
+ bp->phy_addr = B44_PHY_ADDR_NO_PHY;
+ return PTR_ERR(phydev);
+ }
@@ -229,9 +223,8 @@
+ bp->old_duplex = -1;
+ bp->phy_addr = phydev->addr;
+
-+ netdev_info(dev, "attached PHY driver [%s] "
-+ "(mii_bus:phy_addr=%s)\n",
-+ phydev->drv->name, dev_name(&phydev->dev));
++ netdev_info(dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s)\n",
++ phydev->drv->name, dev_name(&phydev->dev));
+
+ return 0;
+}
@@ -239,7 +232,7 @@
static int b44_get_invariants(struct b44 *bp)
{
struct ssb_device *sdev = bp->sdev;
-@@ -2235,12 +2221,38 @@ static int b44_init_one(struct ssb_devic
+@@ -2235,12 +2214,40 @@ static int b44_init_one(struct ssb_devic
goto err_out_powerdown;
}
@@ -260,6 +253,8 @@
+ bp->mii_bus->read = b44_mii_read;
+ bp->mii_bus->write = b44_mii_write;
+ bp->mii_bus->name = "b44_eth_mii";
++ bp->mii_bus->parent = sdev->dev;
++ bp->mii_bus->phy_mask = ~(1 << bp->phy_addr);
+ snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%x", instance);
+ bp->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
+ if (!bp->mii_bus->irq) {
@@ -284,7 +279,7 @@
/* By default, advertise all speed/duplex settings. */
bp->flags |= (B44_FLAG_ADV_10HALF | B44_FLAG_ADV_10FULL |
-@@ -2272,6 +2284,16 @@ static int b44_init_one(struct ssb_devic
+@@ -2272,6 +2279,16 @@ static int b44_init_one(struct ssb_devic
return 0;
@@ -301,7 +296,7 @@
err_out_powerdown:
ssb_bus_may_powerdown(sdev->bus);
-@@ -2285,8 +2307,12 @@ out:
+@@ -2285,8 +2302,12 @@ out:
static void b44_remove_one(struct ssb_device *sdev)
{
struct net_device *dev = ssb_get_drvdata(sdev);