[v2] net/e1000: fix write NVM srwr alwayes return success
Checks
Commit Message
From: Chengwen Feng <fengchengwen@huawei.com>
This patch fixes e1000_write_nvm_srwr() alwayes return success.
Fixes: 5a32a257f957 ("e1000: more NICs in base driver")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
v2:
* change 'E1000_ERR_NVM' to '-E1000_ERR_NVM'.
---
drivers/net/e1000/base/e1000_i210.c | 2 ++
1 file changed, 2 insertions(+)
Comments
> -----Original Message-----
> From: Min Hu (Connor) <humin29@huawei.com>
> Sent: Wednesday, April 21, 2021 15:12
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Guo, Jia <jia.guo@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>
> Subject: [PATCH v2] net/e1000: fix write NVM srwr alwayes return success
>
> From: Chengwen Feng <fengchengwen@huawei.com>
>
> This patch fixes e1000_write_nvm_srwr() alwayes return success.
Please see v1's comment about the commit message. ;-)
> 2.7.4
在 2021/4/21 15:18, Wang, Haiyue 写道:
>> -----Original Message-----
>> From: Min Hu (Connor) <humin29@huawei.com>
>> Sent: Wednesday, April 21, 2021 15:12
>> To: dev@dpdk.org
>> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Guo, Jia <jia.guo@intel.com>; Wang, Haiyue
>> <haiyue.wang@intel.com>
>> Subject: [PATCH v2] net/e1000: fix write NVM srwr alwayes return success
>>
>> From: Chengwen Feng <fengchengwen@huawei.com>
>>
>> This patch fixes e1000_write_nvm_srwr() alwayes return success.
>
>
> Please see v1's comment about the commit message. ;-)
>
Hi, Haiyue,
sorry for that.
First v2 is wrong, I send v2 twice, please check it out, thanks.
>> 2.7.4
>
> .
>
> -----Original Message-----
> From: Min Hu (Connor) <humin29@huawei.com>
> Sent: Wednesday, April 21, 2021 15:12
> To: dev@dpdk.org
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Guo, Jia <jia.guo@intel.com>; Wang, Haiyue
> <haiyue.wang@intel.com>
> Subject: [PATCH v2] net/e1000: fix write NVM srwr alwayes return success
>
> From: Chengwen Feng <fengchengwen@huawei.com>
>
> This patch fixes e1000_write_nvm_srwr() alwayes return success.
>
As I said in v1:
"This commit message seems not so correct, it should be like:
This fixes the timed out for shadow RAM write EEWR can't be detected."
What do you think ?
> Fixes: 5a32a257f957 ("e1000: more NICs in base driver")
> Cc: stable@dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> ---
> v2:
> * change 'E1000_ERR_NVM' to '-E1000_ERR_NVM'.
> ---
> --
> 2.7.4
Hi,
在 2021/4/21 15:34, Wang, Haiyue 写道:
>> -----Original Message-----
>> From: Min Hu (Connor) <humin29@huawei.com>
>> Sent: Wednesday, April 21, 2021 15:12
>> To: dev@dpdk.org
>> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; Guo, Jia <jia.guo@intel.com>; Wang, Haiyue
>> <haiyue.wang@intel.com>
>> Subject: [PATCH v2] net/e1000: fix write NVM srwr alwayes return success
>>
>> From: Chengwen Feng <fengchengwen@huawei.com>
>>
>> This patch fixes e1000_write_nvm_srwr() alwayes return success.
>>
>
> As I said in v1:
>
> "This commit message seems not so correct, it should be like:
>
> This fixes the timed out for shadow RAM write EEWR can't be detected."
>
> What do you think ?
Fixed in v3, thanks.
>
>> Fixes: 5a32a257f957 ("e1000: more NICs in base driver")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>> Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
>> ---
>> v2:
>> * change 'E1000_ERR_NVM' to '-E1000_ERR_NVM'.
>> ---
>
>
>
>> --
>> 2.7.4
>
> .
>
@@ -310,6 +310,8 @@ STATIC s32 e1000_write_nvm_srwr(struct e1000_hw *hw, u16 offset, u16 words,
}
for (i = 0; i < words; i++) {
+ ret_val = -E1000_ERR_NVM;
+
eewr = ((offset + i) << E1000_NVM_RW_ADDR_SHIFT) |
(data[i] << E1000_NVM_RW_REG_DATA) |
E1000_NVM_RW_REG_START;