slave.c (22d91ed32b653481f47e81719858678e8c92089e) slave.c (6146dd453e235c487d85ae4dc6cc08978a1c890f)
1/*
2 * net/dsa/slave.c - Slave device handling
3 * Copyright (c) 2008-2009 Marvell Semiconductor
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

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

1278 */
1279 if (ds->ops->phylink_fixed_state)
1280 phylink_fixed_state_cb(dp->pl, dsa_slave_phylink_fixed_state);
1281
1282 if (ds->ops->get_phy_flags)
1283 phy_flags = ds->ops->get_phy_flags(ds, dp->index);
1284
1285 ret = phylink_of_phy_connect(dp->pl, port_dn, phy_flags);
1/*
2 * net/dsa/slave.c - Slave device handling
3 * Copyright (c) 2008-2009 Marvell Semiconductor
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

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

1278 */
1279 if (ds->ops->phylink_fixed_state)
1280 phylink_fixed_state_cb(dp->pl, dsa_slave_phylink_fixed_state);
1281
1282 if (ds->ops->get_phy_flags)
1283 phy_flags = ds->ops->get_phy_flags(ds, dp->index);
1284
1285 ret = phylink_of_phy_connect(dp->pl, port_dn, phy_flags);
1286 if (ret == -ENODEV) {
1287 /* We could not connect to a designated PHY or SFP, so use the
1288 * switch internal MDIO bus instead
1286 if (ret == -ENODEV && ds->slave_mii_bus) {
1287 /* We could not connect to a designated PHY or SFP, so try to
1288 * use the switch internal MDIO bus instead
1289 */
1290 ret = dsa_slave_phy_connect(slave_dev, dp->index);
1291 if (ret) {
1292 netdev_err(slave_dev,
1293 "failed to connect to port %d: %d\n",
1294 dp->index, ret);
1295 phylink_destroy(dp->pl);
1296 return ret;
1297 }
1298 }
1299
1289 */
1290 ret = dsa_slave_phy_connect(slave_dev, dp->index);
1291 if (ret) {
1292 netdev_err(slave_dev,
1293 "failed to connect to port %d: %d\n",
1294 dp->index, ret);
1295 phylink_destroy(dp->pl);
1296 return ret;
1297 }
1298 }
1299
1300 return 0;
1300 return ret;
1301}
1302
1303static struct lock_class_key dsa_slave_netdev_xmit_lock_key;
1304static void dsa_slave_set_lockdep_class_one(struct net_device *dev,
1305 struct netdev_queue *txq,
1306 void *_unused)
1307{
1308 lockdep_set_class(&txq->_xmit_lock,

--- 436 unchanged lines hidden ---
1301}
1302
1303static struct lock_class_key dsa_slave_netdev_xmit_lock_key;
1304static void dsa_slave_set_lockdep_class_one(struct net_device *dev,
1305 struct netdev_queue *txq,
1306 void *_unused)
1307{
1308 lockdep_set_class(&txq->_xmit_lock,

--- 436 unchanged lines hidden ---