Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

lipeng and committed by
David S. Miller
7f0abb1f d3074cce

+3 -1
+3 -1
drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c
··· 744 744 mac_cb->serdes_vaddr = dsaf_dev->sds_base; 745 745 746 746 if (dsaf_dev->cpld_base && 747 - mac_idx < DSAF_SERVICE_PORT_NUM_PER_DSAF) 747 + mac_idx < DSAF_SERVICE_PORT_NUM_PER_DSAF) { 748 748 mac_cb->cpld_vaddr = dsaf_dev->cpld_base + 749 749 mac_cb->mac_id * CPLD_ADDR_PORT_OFFSET; 750 + cpld_led_reset(mac_cb); 751 + } 750 752 mac_cb->sfp_prsnt = 0; 751 753 mac_cb->txpkt_for_led = 0; 752 754 mac_cb->rxpkt_for_led = 0;