Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161013
b: refs/heads/master
c: 2f718d6
h: refs/heads/master
i:
  161011: 385e87e
v: v3
  • Loading branch information
Yi Zou authored and James Bottomley committed Aug 22, 2009
1 parent a00c4df commit 0907741
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a84baeaf7b8bb4188219140cb326a3e859b2312
refs/heads/master: 2f718d64ecc7010463d36e6ec4ae37778d03fc0b
38 changes: 17 additions & 21 deletions trunk/drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1635,29 +1635,25 @@ int fcoe_link_ok(struct fc_lport *lp)
struct fcoe_softc *fc = lport_priv(lp);
struct net_device *dev = fc->real_dev;
struct ethtool_cmd ecmd = { ETHTOOL_GSET };
int rc = 0;

if ((dev->flags & IFF_UP) && netif_carrier_ok(dev)) {
dev = fc->phys_dev;
if (dev->ethtool_ops->get_settings) {
dev->ethtool_ops->get_settings(dev, &ecmd);
lp->link_supported_speeds &=
~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT);
if (ecmd.supported & (SUPPORTED_1000baseT_Half |
SUPPORTED_1000baseT_Full))
lp->link_supported_speeds |= FC_PORTSPEED_1GBIT;
if (ecmd.supported & SUPPORTED_10000baseT_Full)
lp->link_supported_speeds |=
FC_PORTSPEED_10GBIT;
if (ecmd.speed == SPEED_1000)
lp->link_speed = FC_PORTSPEED_1GBIT;
if (ecmd.speed == SPEED_10000)
lp->link_speed = FC_PORTSPEED_10GBIT;
}
} else
rc = -1;
if ((dev->flags & IFF_UP) && netif_carrier_ok(dev) &&
(!dev_ethtool_get_settings(dev, &ecmd))) {
lp->link_supported_speeds &=
~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT);
if (ecmd.supported & (SUPPORTED_1000baseT_Half |
SUPPORTED_1000baseT_Full))
lp->link_supported_speeds |= FC_PORTSPEED_1GBIT;
if (ecmd.supported & SUPPORTED_10000baseT_Full)
lp->link_supported_speeds |=
FC_PORTSPEED_10GBIT;
if (ecmd.speed == SPEED_1000)
lp->link_speed = FC_PORTSPEED_1GBIT;
if (ecmd.speed == SPEED_10000)
lp->link_speed = FC_PORTSPEED_10GBIT;

return rc;
return 0;
}
return -1;
}

/**
Expand Down

0 comments on commit 0907741

Please sign in to comment.