Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1246254 > unrolled thread

[PATCH net-next] net: hisilicon net: fix a bug about led

Started byyankejian <yankejian@huawei.com>
First post2015-10-14 04:20 +0200
Last post2015-10-15 03:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next] net: hisilicon net: fix a bug about led yankejian <yankejian@huawei.com> - 2015-10-14 04:20 +0200
    Re: [PATCH net-next] net: hisilicon net: fix a bug about led David Miller <davem@davemloft.net> - 2015-10-15 03:30 +0200

#1246254 — [PATCH net-next] net: hisilicon net: fix a bug about led

Fromyankejian <yankejian@huawei.com>
Date2015-10-14 04:20 +0200
Subject[PATCH net-next] net: hisilicon net: fix a bug about led
Message-ID<qjjPA-10U-7@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1247286

FromDavid Miller <davem@davemloft.net>
Date2015-10-15 03:30 +0200
Message-ID<qjFwJ-82o-7@gated-at.bofh.it>
In reply to#1246254
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web