* [PATCH V2 net 1/4] net: hns: fix a bug for cycle index
2016-03-11 10:20 [PATCH V2 net 0/4] net: hns: bugs fix about hns driver Lisheng
@ 2016-03-11 10:20 ` Lisheng
2016-03-11 10:20 ` [PATCH V2 net 2/4] net: hns: bug fix for format string Lisheng
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Lisheng @ 2016-03-11 10:20 UTC (permalink / raw)
To: davem
Cc: yisen.zhuang, yankejian, xieqianqian, huangdaode, salil.mehta,
andriy.shevchenko, netdev, haifeng.wei, charles.chenxin, linuxarm
From: Qianqian Xie <xieqianqian@huawei.com>
The cycle index should be varied while the variable j is a fixed value.
The patch will fix this bug.
Signed-off-by: Qianqian Xie <xieqianqian@huawei.com>
---
drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
index 7fe1c1c..ef4f154 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
@@ -2182,17 +2182,17 @@ void hns_dsaf_get_regs(struct dsaf_device *ddev, u32 port, void *data)
/* dsaf onode registers */
for (i = 0; i < DSAF_XOD_NUM; i++) {
p[311 + i] = dsaf_read_dev(ddev,
- DSAF_XOD_ETS_TSA_TC0_TC3_CFG_0_REG + j * 0x90);
+ DSAF_XOD_ETS_TSA_TC0_TC3_CFG_0_REG + i * 0x90);
p[319 + i] = dsaf_read_dev(ddev,
- DSAF_XOD_ETS_TSA_TC4_TC7_CFG_0_REG + j * 0x90);
+ DSAF_XOD_ETS_TSA_TC4_TC7_CFG_0_REG + i * 0x90);
p[327 + i] = dsaf_read_dev(ddev,
- DSAF_XOD_ETS_BW_TC0_TC3_CFG_0_REG + j * 0x90);
+ DSAF_XOD_ETS_BW_TC0_TC3_CFG_0_REG + i * 0x90);
p[335 + i] = dsaf_read_dev(ddev,
- DSAF_XOD_ETS_BW_TC4_TC7_CFG_0_REG + j * 0x90);
+ DSAF_XOD_ETS_BW_TC4_TC7_CFG_0_REG + i * 0x90);
p[343 + i] = dsaf_read_dev(ddev,
- DSAF_XOD_ETS_BW_OFFSET_CFG_0_REG + j * 0x90);
+ DSAF_XOD_ETS_BW_OFFSET_CFG_0_REG + i * 0x90);
p[351 + i] = dsaf_read_dev(ddev,
- DSAF_XOD_ETS_TOKEN_CFG_0_REG + j * 0x90);
+ DSAF_XOD_ETS_TOKEN_CFG_0_REG + i * 0x90);
}
p[359] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_0_0_REG + port * 0x90);
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH V2 net 2/4] net: hns: bug fix for format string
2016-03-11 10:20 [PATCH V2 net 0/4] net: hns: bugs fix about hns driver Lisheng
2016-03-11 10:20 ` [PATCH V2 net 1/4] net: hns: fix a bug for cycle index Lisheng
@ 2016-03-11 10:20 ` Lisheng
2016-03-11 10:20 ` [PATCH V2 net 3/4] net: hns: bug fix for return values Lisheng
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Lisheng @ 2016-03-11 10:20 UTC (permalink / raw)
To: davem
Cc: yisen.zhuang, yankejian, xieqianqian, huangdaode, salil.mehta,
andriy.shevchenko, netdev, haifeng.wei, charles.chenxin, linuxarm
From: Qianqian Xie <xieqianqian@huawei.com>
There is not a format string in function snprinf().
This patch will fix it.
Signed-off-by: Qianqian Xie <xieqianqian@huawei.com>
---
drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
index b8517b0..d0591d9 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
@@ -641,7 +641,8 @@ static void hns_gmac_get_strings(u32 stringset, u8 *data)
return;
for (i = 0; i < ARRAY_SIZE(g_gmac_stats_string); i++) {
- snprintf(buff, ETH_GSTRING_LEN, g_gmac_stats_string[i].desc);
+ snprintf(buff, ETH_GSTRING_LEN, "%s",
+ g_gmac_stats_string[i].desc);
buff = buff + ETH_GSTRING_LEN;
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH V2 net 3/4] net: hns: bug fix for return values
2016-03-11 10:20 [PATCH V2 net 0/4] net: hns: bugs fix about hns driver Lisheng
2016-03-11 10:20 ` [PATCH V2 net 1/4] net: hns: fix a bug for cycle index Lisheng
2016-03-11 10:20 ` [PATCH V2 net 2/4] net: hns: bug fix for format string Lisheng
@ 2016-03-11 10:20 ` Lisheng
2016-03-11 10:20 ` [PATCH V2 net 4/4] net: hns: remove useless head=ring->next_to_clean Lisheng
2016-03-11 16:56 ` [PATCH V2 net 0/4] net: hns: bugs fix about hns driver David Miller
4 siblings, 0 replies; 8+ messages in thread
From: Lisheng @ 2016-03-11 10:20 UTC (permalink / raw)
To: davem
Cc: yisen.zhuang, yankejian, xieqianqian, huangdaode, salil.mehta,
andriy.shevchenko, netdev, haifeng.wei, charles.chenxin, linuxarm
From: Qianqian Xie <xieqianqian@huawei.com>
The return values in the first two functions mdiobus_write()
are ignored. The patch will fix it.
Signed-off-by: Qianqian Xie <xieqianqian@huawei.com>
---
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
index 3df2284..cc5c545 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
@@ -1000,8 +1000,8 @@ int hns_phy_led_set(struct net_device *netdev, int value)
struct phy_device *phy_dev = priv->phy;
retval = phy_write(phy_dev, HNS_PHY_PAGE_REG, HNS_PHY_PAGE_LED);
- retval = phy_write(phy_dev, HNS_LED_FC_REG, value);
- retval = phy_write(phy_dev, HNS_PHY_PAGE_REG, HNS_PHY_PAGE_COPPER);
+ retval |= phy_write(phy_dev, HNS_LED_FC_REG, value);
+ retval |= phy_write(phy_dev, HNS_PHY_PAGE_REG, HNS_PHY_PAGE_COPPER);
if (retval) {
netdev_err(netdev, "mdiobus_write fail !\n");
return retval;
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH V2 net 4/4] net: hns: remove useless head=ring->next_to_clean
2016-03-11 10:20 [PATCH V2 net 0/4] net: hns: bugs fix about hns driver Lisheng
` (2 preceding siblings ...)
2016-03-11 10:20 ` [PATCH V2 net 3/4] net: hns: bug fix for return values Lisheng
@ 2016-03-11 10:20 ` Lisheng
2016-03-11 16:56 ` [PATCH V2 net 0/4] net: hns: bugs fix about hns driver David Miller
4 siblings, 0 replies; 8+ messages in thread
From: Lisheng @ 2016-03-11 10:20 UTC (permalink / raw)
To: davem
Cc: yisen.zhuang, yankejian, xieqianqian, huangdaode, salil.mehta,
andriy.shevchenko, netdev, haifeng.wei, charles.chenxin, linuxarm
From: Qianqian Xie <xieqianqian@huawei.com>
The variable head in hns_nic_tx_fini_pro has read a value,
but the value is not used. The patch will solve it.
The bug-fixed comment is for the function pointer
ring_data->fini_process,that is called in function
hns_nic_common_poll.The comment should not be there, so remove it.
Signed-off-by: Qianqian Xie <xieqianqian@huawei.com>
---
change log:
PATCH v2:
- This patchset fixes the comments provided by Andy Shevchenko <Andy Shevchenko>
PATCH v1:
- first submit
---
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 3f77ff7..5456531 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -901,10 +901,7 @@ static int hns_nic_tx_poll_one(struct hns_nic_ring_data *ring_data,
static void hns_nic_tx_fini_pro(struct hns_nic_ring_data *ring_data)
{
struct hnae_ring *ring = ring_data->ring;
- int head = ring->next_to_clean;
-
- /* for hardware bug fixed */
- head = readl_relaxed(ring->io_base + RCB_REG_HEAD);
+ int head = readl_relaxed(ring->io_base + RCB_REG_HEAD);
if (head != ring->next_to_clean) {
ring_data->ring->q->handle->dev->ops->toggle_ring_irq(
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH V2 net 0/4] net: hns: bugs fix about hns driver
2016-03-11 10:20 [PATCH V2 net 0/4] net: hns: bugs fix about hns driver Lisheng
` (3 preceding siblings ...)
2016-03-11 10:20 ` [PATCH V2 net 4/4] net: hns: remove useless head=ring->next_to_clean Lisheng
@ 2016-03-11 16:56 ` David Miller
2016-03-14 6:25 ` Lisheng011
2016-03-15 3:14 ` Yankejian (Hackim Yim)
4 siblings, 2 replies; 8+ messages in thread
From: David Miller @ 2016-03-11 16:56 UTC (permalink / raw)
To: lisheng011
Cc: yisen.zhuang, yankejian, xieqianqian, huangdaode, salil.mehta,
andriy.shevchenko, netdev, haifeng.wei, charles.chenxin, linuxarm
This does not work.
I will not allow two sets of people sending me patches in parallel to the
same driver at the same time.
Have one person manage the maintainence of this driver and consolidate the
patch submissions to me.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2 net 0/4] net: hns: bugs fix about hns driver
2016-03-11 16:56 ` [PATCH V2 net 0/4] net: hns: bugs fix about hns driver David Miller
@ 2016-03-14 6:25 ` Lisheng011
2016-03-15 3:14 ` Yankejian (Hackim Yim)
1 sibling, 0 replies; 8+ messages in thread
From: Lisheng011 @ 2016-03-14 6:25 UTC (permalink / raw)
To: David Miller
Cc: yisen.zhuang, yankejian, xieqianqian, huangdaode, salil.mehta,
andriy.shevchenko, netdev, haifeng.wei, charles.chenxin, linuxarm
We will appoint Daode Huang <huangdaode@hisilicon.com> to send these patchs.
Thanks.
在 2016/3/12 0:56, David Miller 写道:
> This does not work.
>
> I will not allow two sets of people sending me patches in parallel to the
> same driver at the same time.
>
> Have one person manage the maintainence of this driver and consolidate the
> patch submissions to me.
>
> Thanks.
>
> .
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V2 net 0/4] net: hns: bugs fix about hns driver
2016-03-11 16:56 ` [PATCH V2 net 0/4] net: hns: bugs fix about hns driver David Miller
2016-03-14 6:25 ` Lisheng011
@ 2016-03-15 3:14 ` Yankejian (Hackim Yim)
1 sibling, 0 replies; 8+ messages in thread
From: Yankejian (Hackim Yim) @ 2016-03-15 3:14 UTC (permalink / raw)
To: David Miller, lisheng011
Cc: yisen.zhuang, xieqianqian, huangdaode, salil.mehta,
andriy.shevchenko, netdev, haifeng.wei, charles.chenxin, linuxarm
On 2016/3/12 0:56, David Miller wrote:
> This does not work.
>
> I will not allow two sets of people sending me patches in parallel to the
> same driver at the same time.
>
> Have one person manage the maintainence of this driver and consolidate the
> patch submissions to me.
>
> Thanks.
>
> .
>
Hi David,
Thanks for your reply. we will upstream the patches one by one. And we will ask Daode Huang to help us
to upsream.
MBR, Kejian
^ permalink raw reply [flat|nested] 8+ messages in thread