diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 13 | ||||
-rw-r--r-- | drivers/net/macvlan.c | 3 | ||||
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 | ||||
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 4 |
4 files changed, 13 insertions, 11 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 8cb75a6efec3..1dcb07ce5263 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -557,7 +557,7 @@ down: | |||
557 | static int bond_update_speed_duplex(struct slave *slave) | 557 | static int bond_update_speed_duplex(struct slave *slave) |
558 | { | 558 | { |
559 | struct net_device *slave_dev = slave->dev; | 559 | struct net_device *slave_dev = slave->dev; |
560 | struct ethtool_cmd etool = { .cmd = ETHTOOL_GSET }; | 560 | struct ethtool_cmd ecmd; |
561 | u32 slave_speed; | 561 | u32 slave_speed; |
562 | int res; | 562 | int res; |
563 | 563 | ||
@@ -565,18 +565,15 @@ static int bond_update_speed_duplex(struct slave *slave) | |||
565 | slave->speed = SPEED_100; | 565 | slave->speed = SPEED_100; |
566 | slave->duplex = DUPLEX_FULL; | 566 | slave->duplex = DUPLEX_FULL; |
567 | 567 | ||
568 | if (!slave_dev->ethtool_ops || !slave_dev->ethtool_ops->get_settings) | 568 | res = __ethtool_get_settings(slave_dev, &ecmd); |
569 | return -1; | ||
570 | |||
571 | res = slave_dev->ethtool_ops->get_settings(slave_dev, &etool); | ||
572 | if (res < 0) | 569 | if (res < 0) |
573 | return -1; | 570 | return -1; |
574 | 571 | ||
575 | slave_speed = ethtool_cmd_speed(&etool); | 572 | slave_speed = ethtool_cmd_speed(&ecmd); |
576 | if (slave_speed == 0 || slave_speed == ((__u32) -1)) | 573 | if (slave_speed == 0 || slave_speed == ((__u32) -1)) |
577 | return -1; | 574 | return -1; |
578 | 575 | ||
579 | switch (etool.duplex) { | 576 | switch (ecmd.duplex) { |
580 | case DUPLEX_FULL: | 577 | case DUPLEX_FULL: |
581 | case DUPLEX_HALF: | 578 | case DUPLEX_HALF: |
582 | break; | 579 | break; |
@@ -585,7 +582,7 @@ static int bond_update_speed_duplex(struct slave *slave) | |||
585 | } | 582 | } |
586 | 583 | ||
587 | slave->speed = slave_speed; | 584 | slave->speed = slave_speed; |
588 | slave->duplex = etool.duplex; | 585 | slave->duplex = ecmd.duplex; |
589 | 586 | ||
590 | return 0; | 587 | return 0; |
591 | } | 588 | } |
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 836e13fcb3ec..b100c90e8507 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -543,7 +543,8 @@ static int macvlan_ethtool_get_settings(struct net_device *dev, | |||
543 | struct ethtool_cmd *cmd) | 543 | struct ethtool_cmd *cmd) |
544 | { | 544 | { |
545 | const struct macvlan_dev *vlan = netdev_priv(dev); | 545 | const struct macvlan_dev *vlan = netdev_priv(dev); |
546 | return dev_ethtool_get_settings(vlan->lowerdev, cmd); | 546 | |
547 | return __ethtool_get_settings(vlan->lowerdev, cmd); | ||
547 | } | 548 | } |
548 | 549 | ||
549 | static const struct ethtool_ops macvlan_ethtool_ops = { | 550 | static const struct ethtool_ops macvlan_ethtool_ops = { |
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 2c780a78fcbd..820a1840c3f7 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |||
@@ -673,7 +673,7 @@ static void bnx2fc_link_speed_update(struct fc_lport *lport) | |||
673 | struct net_device *netdev = interface->netdev; | 673 | struct net_device *netdev = interface->netdev; |
674 | struct ethtool_cmd ecmd; | 674 | struct ethtool_cmd ecmd; |
675 | 675 | ||
676 | if (!dev_ethtool_get_settings(netdev, &ecmd)) { | 676 | if (!__ethtool_get_settings(netdev, &ecmd)) { |
677 | lport->link_supported_speeds &= | 677 | lport->link_supported_speeds &= |
678 | ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); | 678 | ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); |
679 | if (ecmd.supported & (SUPPORTED_1000baseT_Half | | 679 | if (ecmd.supported & (SUPPORTED_1000baseT_Half | |
@@ -1001,9 +1001,11 @@ static int bnx2fc_vport_create(struct fc_vport *vport, bool disabled) | |||
1001 | "this interface\n"); | 1001 | "this interface\n"); |
1002 | return -EIO; | 1002 | return -EIO; |
1003 | } | 1003 | } |
1004 | rtnl_lock(); | ||
1004 | mutex_lock(&bnx2fc_dev_lock); | 1005 | mutex_lock(&bnx2fc_dev_lock); |
1005 | vn_port = bnx2fc_if_create(interface, &vport->dev, 1); | 1006 | vn_port = bnx2fc_if_create(interface, &vport->dev, 1); |
1006 | mutex_unlock(&bnx2fc_dev_lock); | 1007 | mutex_unlock(&bnx2fc_dev_lock); |
1008 | rtnl_unlock(); | ||
1007 | 1009 | ||
1008 | if (IS_ERR(vn_port)) { | 1010 | if (IS_ERR(vn_port)) { |
1009 | printk(KERN_ERR PFX "bnx2fc_vport_create (%s) failed\n", | 1011 | printk(KERN_ERR PFX "bnx2fc_vport_create (%s) failed\n", |
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 3416ab673814..83aa3ac52c40 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -2043,7 +2043,7 @@ int fcoe_link_speed_update(struct fc_lport *lport) | |||
2043 | struct net_device *netdev = fcoe_netdev(lport); | 2043 | struct net_device *netdev = fcoe_netdev(lport); |
2044 | struct ethtool_cmd ecmd; | 2044 | struct ethtool_cmd ecmd; |
2045 | 2045 | ||
2046 | if (!dev_ethtool_get_settings(netdev, &ecmd)) { | 2046 | if (!__ethtool_get_settings(netdev, &ecmd)) { |
2047 | lport->link_supported_speeds &= | 2047 | lport->link_supported_speeds &= |
2048 | ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); | 2048 | ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); |
2049 | if (ecmd.supported & (SUPPORTED_1000baseT_Half | | 2049 | if (ecmd.supported & (SUPPORTED_1000baseT_Half | |
@@ -2452,7 +2452,9 @@ static int fcoe_vport_create(struct fc_vport *vport, bool disabled) | |||
2452 | } | 2452 | } |
2453 | 2453 | ||
2454 | mutex_lock(&fcoe_config_mutex); | 2454 | mutex_lock(&fcoe_config_mutex); |
2455 | rtnl_lock(); | ||
2455 | vn_port = fcoe_if_create(fcoe, &vport->dev, 1); | 2456 | vn_port = fcoe_if_create(fcoe, &vport->dev, 1); |
2457 | rtnl_unlock(); | ||
2456 | mutex_unlock(&fcoe_config_mutex); | 2458 | mutex_unlock(&fcoe_config_mutex); |
2457 | 2459 | ||
2458 | if (IS_ERR(vn_port)) { | 2460 | if (IS_ERR(vn_port)) { |