提交 03d29bc1 编写于 作者: C Chris Leech 提交者: James Bottomley

[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: NChris Leech <christopher.leech@intel.com>
Signed-off-by: NRobert Love <robert.w.love@intel.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 9ee50e48
......@@ -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 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册