tg3.c (e42f6f9be4f83c537aa81b4c6239ea94ff5b29ce) tg3.c (58056c1e1b0e4951f3486bd552d8278194f8b84b)
1/*
2 * tg3.c: Broadcom Tigon3 ethernet driver.
3 *
4 * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com)
5 * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com)
6 * Copyright (C) 2004 Sun Microsystems Inc.
7 * Copyright (C) 2005-2016 Broadcom Corporation.
8 * Copyright (C) 2016-2017 Broadcom Limited.

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

2117 return PTR_ERR(phydev);
2118 }
2119
2120 /* Mask with MAC supported features. */
2121 switch (phydev->interface) {
2122 case PHY_INTERFACE_MODE_GMII:
2123 case PHY_INTERFACE_MODE_RGMII:
2124 if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
1/*
2 * tg3.c: Broadcom Tigon3 ethernet driver.
3 *
4 * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com)
5 * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com)
6 * Copyright (C) 2004 Sun Microsystems Inc.
7 * Copyright (C) 2005-2016 Broadcom Corporation.
8 * Copyright (C) 2016-2017 Broadcom Limited.

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

2117 return PTR_ERR(phydev);
2118 }
2119
2120 /* Mask with MAC supported features. */
2121 switch (phydev->interface) {
2122 case PHY_INTERFACE_MODE_GMII:
2123 case PHY_INTERFACE_MODE_RGMII:
2124 if (!(tp->phy_flags & TG3_PHYFLG_10_100_ONLY)) {
2125 phydev->supported &= (PHY_GBIT_FEATURES |
2126 SUPPORTED_Pause |
2125 phy_set_max_speed(phydev, SPEED_1000);
2126 phydev->supported &= (SUPPORTED_Pause |
2127 SUPPORTED_Asym_Pause);
2128 break;
2129 }
2130 /* fallthru */
2131 case PHY_INTERFACE_MODE_MII:
2127 SUPPORTED_Asym_Pause);
2128 break;
2129 }
2130 /* fallthru */
2131 case PHY_INTERFACE_MODE_MII:
2132 phydev->supported &= (PHY_BASIC_FEATURES |
2133 SUPPORTED_Pause |
2132 phy_set_max_speed(phydev, SPEED_100);
2133 phydev->supported &= (SUPPORTED_Pause |
2134 SUPPORTED_Asym_Pause);
2135 break;
2136 default:
2137 phy_disconnect(mdiobus_get_phy(tp->mdio_bus, tp->phy_addr));
2138 return -EINVAL;
2139 }
2140
2141 tp->phy_flags |= TG3_PHYFLG_IS_CONNECTED;

--- 16225 unchanged lines hidden ---
2134 SUPPORTED_Asym_Pause);
2135 break;
2136 default:
2137 phy_disconnect(mdiobus_get_phy(tp->mdio_bus, tp->phy_addr));
2138 return -EINVAL;
2139 }
2140
2141 tp->phy_flags |= TG3_PHYFLG_IS_CONNECTED;

--- 16225 unchanged lines hidden ---