From: Chris Leech Date: Fri, 9 Apr 2010 21:22:28 +0000 (-0700) Subject: [SCSI] fcoe: check netif operstate instead of IFF_UP & link state X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=03d29bc1d58dcfc2fa30aed7af199f24444c2052;p=deliverable%2Flinux.git [SCSI] fcoe: check netif operstate instead of IFF_UP & link state 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 Signed-off-by: Robert Love Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 0d8127e58feb..d16dd1232572 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -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 |