diff options
author | Kejian Yan <yankejian@huawei.com> | 2016-06-03 05:55:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-05 04:32:41 +0300 |
commit | a24274aa5c2328a6ef4296d1ca8e81648cd0ddda (patch) | |
tree | fa3d472517f49ae5453871bc911389a309be771f /drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | |
parent | 652d39b0d50a6e99495442431c8dadeb8c05c986 (diff) | |
download | linux-a24274aa5c2328a6ef4296d1ca8e81648cd0ddda.tar.xz |
net: hns: add dsaf misc operation method
The misc operation for different hw platform may be different, if using
current implementation, it will add a new branch on each function for
every new hw platform, so we add a method for this operation.
Signed-off-by: Kejian Yan <yankejian@huawei.com>
Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c index 8e009f4f0ee7..d37b778b4a1b 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c @@ -637,13 +637,15 @@ static int hns_ae_config_loopback(struct hnae_handle *handle, int ret; struct hnae_vf_cb *vf_cb = hns_ae_get_vf_cb(handle); struct hns_mac_cb *mac_cb = hns_get_mac_cb(handle); + struct dsaf_device *dsaf_dev = mac_cb->dsaf_dev; switch (loop) { case MAC_INTERNALLOOP_PHY: ret = 0; break; case MAC_INTERNALLOOP_SERDES: - ret = hns_mac_config_sds_loopback(vf_cb->mac_cb, en); + ret = dsaf_dev->misc_op->cfg_serdes_loopback(vf_cb->mac_cb, + !!en); break; case MAC_INTERNALLOOP_MAC: ret = hns_mac_config_mac_loopback(vf_cb->mac_cb, loop, en); |