* [PATCH net] net: txgbe: fix eeprom calculation error
@ 2023-07-11 6:34 Jiawen Wu
2023-07-13 0:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jiawen Wu @ 2023-07-11 6:34 UTC (permalink / raw)
To: netdev; +Cc: mengyuanlou, Jiawen Wu
For some device types like TXGBE_ID_XAUI, *checksum computed in
txgbe_calc_eeprom_checksum() is larger than TXGBE_EEPROM_SUM. Remove the
limit on the size of *checksum.
Fixes: 049fe5365324 ("net: txgbe: Add operations to interact with firmware")
Fixes: 5e2ea7801fac ("net: txgbe: Fix unsigned comparison to zero in txgbe_calc_eeprom_checksum()")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c
index 12405d71c5ee..0772eb14eabf 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_hw.c
@@ -186,9 +186,6 @@ static int txgbe_calc_eeprom_checksum(struct wx *wx, u16 *checksum)
if (eeprom_ptrs)
kvfree(eeprom_ptrs);
- if (*checksum > TXGBE_EEPROM_SUM)
- return -EINVAL;
-
*checksum = TXGBE_EEPROM_SUM - *checksum;
return 0;
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: txgbe: fix eeprom calculation error
2023-07-11 6:34 [PATCH net] net: txgbe: fix eeprom calculation error Jiawen Wu
@ 2023-07-13 0:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-13 0:10 UTC (permalink / raw)
To: Jiawen Wu; +Cc: netdev, mengyuanlou
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 11 Jul 2023 14:34:14 +0800 you wrote:
> For some device types like TXGBE_ID_XAUI, *checksum computed in
> txgbe_calc_eeprom_checksum() is larger than TXGBE_EEPROM_SUM. Remove the
> limit on the size of *checksum.
>
> Fixes: 049fe5365324 ("net: txgbe: Add operations to interact with firmware")
> Fixes: 5e2ea7801fac ("net: txgbe: Fix unsigned comparison to zero in txgbe_calc_eeprom_checksum()")
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
>
> [...]
Here is the summary with links:
- [net] net: txgbe: fix eeprom calculation error
https://git.kernel.org/netdev/net/c/aa846677a9fb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-13 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-11 6:34 [PATCH net] net: txgbe: fix eeprom calculation error Jiawen Wu
2023-07-13 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).