diff options
author | Qianqian Xie <xieqianqian@huawei.com> | 2016-03-24 07:08:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-24 14:33:06 -0400 |
commit | 526131262223e9315bfd41213f5a76e792f184ff (patch) | |
tree | 9f34968aeb59a27378bc4960aee6fe0b8cdea0c2 /drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | |
parent | 071d36bf21bcc837be00cea55bcef8d129e7f609 (diff) |
net: hns: fix a bug for cycle index
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>
Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 12 |
1 files 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 5c1ac9ba1bf2..5978a5c8ef35 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | |||
@@ -2219,17 +2219,17 @@ void hns_dsaf_get_regs(struct dsaf_device *ddev, u32 port, void *data) | |||
2219 | /* dsaf onode registers */ | 2219 | /* dsaf onode registers */ |
2220 | for (i = 0; i < DSAF_XOD_NUM; i++) { | 2220 | for (i = 0; i < DSAF_XOD_NUM; i++) { |
2221 | p[311 + i] = dsaf_read_dev(ddev, | 2221 | p[311 + i] = dsaf_read_dev(ddev, |
2222 | DSAF_XOD_ETS_TSA_TC0_TC3_CFG_0_REG + j * 0x90); | 2222 | DSAF_XOD_ETS_TSA_TC0_TC3_CFG_0_REG + i * 0x90); |
2223 | p[319 + i] = dsaf_read_dev(ddev, | 2223 | p[319 + i] = dsaf_read_dev(ddev, |
2224 | DSAF_XOD_ETS_TSA_TC4_TC7_CFG_0_REG + j * 0x90); | 2224 | DSAF_XOD_ETS_TSA_TC4_TC7_CFG_0_REG + i * 0x90); |
2225 | p[327 + i] = dsaf_read_dev(ddev, | 2225 | p[327 + i] = dsaf_read_dev(ddev, |
2226 | DSAF_XOD_ETS_BW_TC0_TC3_CFG_0_REG + j * 0x90); | 2226 | DSAF_XOD_ETS_BW_TC0_TC3_CFG_0_REG + i * 0x90); |
2227 | p[335 + i] = dsaf_read_dev(ddev, | 2227 | p[335 + i] = dsaf_read_dev(ddev, |
2228 | DSAF_XOD_ETS_BW_TC4_TC7_CFG_0_REG + j * 0x90); | 2228 | DSAF_XOD_ETS_BW_TC4_TC7_CFG_0_REG + i * 0x90); |
2229 | p[343 + i] = dsaf_read_dev(ddev, | 2229 | p[343 + i] = dsaf_read_dev(ddev, |
2230 | DSAF_XOD_ETS_BW_OFFSET_CFG_0_REG + j * 0x90); | 2230 | DSAF_XOD_ETS_BW_OFFSET_CFG_0_REG + i * 0x90); |
2231 | p[351 + i] = dsaf_read_dev(ddev, | 2231 | p[351 + i] = dsaf_read_dev(ddev, |
2232 | DSAF_XOD_ETS_TOKEN_CFG_0_REG + j * 0x90); | 2232 | DSAF_XOD_ETS_TOKEN_CFG_0_REG + i * 0x90); |
2233 | } | 2233 | } |
2234 | 2234 | ||
2235 | p[359] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_0_0_REG + port * 0x90); | 2235 | p[359] = dsaf_read_dev(ddev, DSAF_XOD_PFS_CFG_0_0_REG + port * 0x90); |