summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
diff options
context:
space:
mode:
authorlipeng <lipeng321@huawei.com>2015-10-14 10:28:57 +0800
committerDavid S. Miller <davem@davemloft.net>2015-10-14 18:41:50 -0700
commit7f0abb1f0f2b110ec38ade73c241fcba30f9112a (patch)
treedc5c86d5f0b4b1732e5a33949b7a8d5bff8c3ea6 /drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
parentd3074cce904a26bb645d3ee7ab5026cf7ef0a3d1 (diff)
downloadop-kernel-dev-7f0abb1f0f2b110ec38ade73c241fcba30f9112a.zip
op-kernel-dev-7f0abb1f0f2b110ec38ade73c241fcba30f9112a.tar.gz
net: hisilicon net: fix a bug about led
this patch fixes a bug in hns driver. the link led is on at the beginning, but at this time the ethernet port is on down status. it needs to reset the led status on init sequence. Signed-off-by: lipeng <lipeng321@huawei.com> Signed-off-by: yankejian <yankejian@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
index 95bf42a..f8f7347 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
@@ -744,9 +744,11 @@ int hns_mac_get_cfg(struct dsaf_device *dsaf_dev, int mac_idx)
mac_cb->serdes_vaddr = dsaf_dev->sds_base;
if (dsaf_dev->cpld_base &&
- mac_idx < DSAF_SERVICE_PORT_NUM_PER_DSAF)
+ mac_idx < DSAF_SERVICE_PORT_NUM_PER_DSAF) {
mac_cb->cpld_vaddr = dsaf_dev->cpld_base +
mac_cb->mac_id * CPLD_ADDR_PORT_OFFSET;
+ cpld_led_reset(mac_cb);
+ }
mac_cb->sfp_prsnt = 0;
mac_cb->txpkt_for_led = 0;
mac_cb->rxpkt_for_led = 0;
OpenPOWER on IntegriCloud