All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: hisilicon net: fix a bug about led
@ 2015-10-14  2:28 yankejian
  2015-10-15  1:42 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: yankejian @ 2015-10-14  2:28 UTC (permalink / raw)
  To: liguozhu, yisen.zhuang, huangdaode, lipeng321, yankejian, davem
  Cc: netdev, linux-kernel, linuxarm

From: lipeng <lipeng321@huawei.com>

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>
---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: hisilicon net: fix a bug about led
  2015-10-14  2:28 [PATCH net-next] net: hisilicon net: fix a bug about led yankejian
@ 2015-10-15  1:42 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-10-15  1:42 UTC (permalink / raw)
  To: yankejian
  Cc: liguozhu, yisen.zhuang, huangdaode, lipeng321, netdev,
	linux-kernel, linuxarm

From: yankejian <yankejian@huawei.com>
Date: Wed, 14 Oct 2015 10:28:57 +0800

> From: lipeng <lipeng321@huawei.com>
> 
> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-15  1:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14  2:28 [PATCH net-next] net: hisilicon net: fix a bug about led yankejian
2015-10-15  1:42 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.