Skip to content

Commit

Permalink
[SCSI] fcoe: check netif operstate instead of IFF_UP & link state
Browse files Browse the repository at this point in the history
Allow for dormant states while link configuration completes.
In the default link mode, this is equivalent to the old check.

Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
  • Loading branch information
Chris Leech authored and James Bottomley committed Apr 11, 2010
1 parent 9ee50e4 commit 03d29bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -2148,8 +2148,7 @@ int fcoe_link_ok(struct fc_lport *lport)
struct net_device *netdev = port->fcoe->netdev;
struct ethtool_cmd ecmd = { ETHTOOL_GSET };

if ((netdev->flags & IFF_UP) && netif_carrier_ok(netdev) &&
(!dev_ethtool_get_settings(netdev, &ecmd))) {
if (netif_oper_up(netdev) && !dev_ethtool_get_settings(netdev, &ecmd)) {
lport->link_supported_speeds &=
~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT);
if (ecmd.supported & (SUPPORTED_1000baseT_Half |
Expand Down

0 comments on commit 03d29bc

Please sign in to comment.