提交 2f718d64 编写于 作者: Y Yi Zou 提交者: James Bottomley

[SCSI] fcoe: Call dev_ethtool_get_settings() in fcoe_link_ok

No need to check phys_dev here, just call dev_ethtool_get_settings() directly
will take care of this.
Signed-off-by: NYi Zou <yi.zou@intel.com>
Signed-off-by: NRobert Love <robert.w.love@intel.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 5a84baea
......@@ -1635,12 +1635,9 @@ 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);
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 |
......@@ -1653,11 +1650,10 @@ int fcoe_link_ok(struct fc_lport *lp)
lp->link_speed = FC_PORTSPEED_1GBIT;
if (ecmd.speed == SPEED_10000)
lp->link_speed = FC_PORTSPEED_10GBIT;
}
} else
rc = -1;
return rc;
return 0;
}
return -1;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部