b44.c (664b0bae0b87f69bc9deb098f5e0158b9cf18e04) b44.c (3c1bcc8614db10803f1f57ef0295363917448cb2)
1/* b44.c: Broadcom 44xx/47xx Fast Ethernet device driver.
2 *
3 * Copyright (C) 2002 David S. Miller (davem@redhat.com)
4 * Copyright (C) 2004 Pekka Pietikainen (pp@ee.oulu.fi)
5 * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
6 * Copyright (C) 2006 Felix Fietkau (nbd@openwrt.org)
7 * Copyright (C) 2006 Broadcom Corporation.
8 * Copyright (C) 2007 Michael Buesch <m@bues.ch>

--- 2234 unchanged lines hidden (view full) ---

2243 val &= ~TX_CTRL_DUPLEX;
2244 bw32(bp, B44_TX_CTRL, val);
2245 phy_print_status(phydev);
2246 }
2247}
2248
2249static int b44_register_phy_one(struct b44 *bp)
2250{
1/* b44.c: Broadcom 44xx/47xx Fast Ethernet device driver.
2 *
3 * Copyright (C) 2002 David S. Miller (davem@redhat.com)
4 * Copyright (C) 2004 Pekka Pietikainen (pp@ee.oulu.fi)
5 * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
6 * Copyright (C) 2006 Felix Fietkau (nbd@openwrt.org)
7 * Copyright (C) 2006 Broadcom Corporation.
8 * Copyright (C) 2007 Michael Buesch <m@bues.ch>

--- 2234 unchanged lines hidden (view full) ---

2243 val &= ~TX_CTRL_DUPLEX;
2244 bw32(bp, B44_TX_CTRL, val);
2245 phy_print_status(phydev);
2246 }
2247}
2248
2249static int b44_register_phy_one(struct b44 *bp)
2250{
2251 __ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
2251 struct mii_bus *mii_bus;
2252 struct ssb_device *sdev = bp->sdev;
2253 struct phy_device *phydev;
2254 char bus_id[MII_BUS_ID_SIZE + 3];
2255 struct ssb_sprom *sprom = &sdev->bus->sprom;
2256 int err;
2257
2258 mii_bus = mdiobus_alloc();

--- 39 unchanged lines hidden (view full) ---

2298 if (IS_ERR(phydev)) {
2299 dev_err(sdev->dev, "could not attach PHY at %i\n",
2300 bp->phy_addr);
2301 err = PTR_ERR(phydev);
2302 goto err_out_mdiobus_unregister;
2303 }
2304
2305 /* mask with MAC supported features */
2252 struct mii_bus *mii_bus;
2253 struct ssb_device *sdev = bp->sdev;
2254 struct phy_device *phydev;
2255 char bus_id[MII_BUS_ID_SIZE + 3];
2256 struct ssb_sprom *sprom = &sdev->bus->sprom;
2257 int err;
2258
2259 mii_bus = mdiobus_alloc();

--- 39 unchanged lines hidden (view full) ---

2299 if (IS_ERR(phydev)) {
2300 dev_err(sdev->dev, "could not attach PHY at %i\n",
2301 bp->phy_addr);
2302 err = PTR_ERR(phydev);
2303 goto err_out_mdiobus_unregister;
2304 }
2305
2306 /* mask with MAC supported features */
2306 phydev->supported &= (SUPPORTED_100baseT_Half |
2307 SUPPORTED_100baseT_Full |
2308 SUPPORTED_Autoneg |
2309 SUPPORTED_MII);
2310 phydev->advertising = phydev->supported;
2307 linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, mask);
2308 linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, mask);
2309 linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, mask);
2310 linkmode_set_bit(ETHTOOL_LINK_MODE_MII_BIT, mask);
2311 linkmode_and(phydev->supported, phydev->supported, mask);
2312 linkmode_copy(phydev->advertising, phydev->supported);
2311
2312 bp->old_link = 0;
2313 bp->phy_addr = phydev->mdio.addr;
2314
2315 phy_attached_info(phydev);
2316
2317 return 0;
2318

--- 293 unchanged lines hidden ---
2313
2314 bp->old_link = 0;
2315 bp->phy_addr = phydev->mdio.addr;
2316
2317 phy_attached_info(phydev);
2318
2319 return 0;
2320

--- 293 unchanged lines hidden ---