* [PATCH] NIU: fix incorrect error return, missed in previous revert
[not found] ` <20210723134154.1252732-1-paul@jakma.org>
@ 2021-07-23 13:41 ` Paul Jakma
0 siblings, 0 replies; 3+ messages in thread
From: Paul Jakma @ 2021-07-23 13:41 UTC (permalink / raw)
To: linux-netdev
Cc: Paul Jakma, Kangjie Lu, Shannon Nelson, David S . Miller,
Greg Kroah-Hartman, stable
Commit 7930742d6, reverting 26fd962, missed out on reverting an incorrect
change to a return value. The niu_pci_vpd_scan_props(..) == 1 case appears
to be a normal path - treating it as an error and return -EINVAL was
breaking VPD_SCAN and causing the driver to fail to load.
Fix, so my Neptune card works again.
Cc: Kangjie Lu <kjlu@umn.edu>
Cc: Shannon Nelson <shannon.lee.nelson@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org>
Fixes: 7930742d ('Revert "niu: fix missing checks of niu_pci_eeprom_read"')
Signed-off-by: Paul Jakma <paul@jakma.org>
---
drivers/net/ethernet/sun/niu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 74e748662ec0..860644d182ab 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -8191,8 +8191,9 @@ static int niu_pci_vpd_fetch(struct niu *np, u32 start)
err = niu_pci_vpd_scan_props(np, here, end);
if (err < 0)
return err;
+ /* ret == 1 is not an error */
if (err == 1)
- return -EINVAL;
+ return 0;
}
return 0;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] NIU: fix incorrect error return, missed in previous revert
[not found] <20210721.084759.550228860951288308.davem () davemloft ! net>
[not found] ` <20210723134154.1252732-1-paul@jakma.org>
@ 2021-07-23 15:13 ` Paul Jakma
2021-07-23 16:50 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 3+ messages in thread
From: Paul Jakma @ 2021-07-23 15:13 UTC (permalink / raw)
To: netdev
Cc: Paul Jakma, Kangjie Lu, Shannon Nelson, David S . Miller,
Greg Kroah-Hartman, stable
Commit 7930742d6, reverting 26fd962, missed out on reverting an incorrect
change to a return value. The niu_pci_vpd_scan_props(..) == 1 case appears
to be a normal path - treating it as an error and return -EINVAL was
breaking VPD_SCAN and causing the driver to fail to load.
Fix, so my Neptune card works again.
Cc: Kangjie Lu <kjlu@umn.edu>
Cc: Shannon Nelson <shannon.lee.nelson@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org>
Fixes: 7930742d ('Revert "niu: fix missing checks of niu_pci_eeprom_read"')
Signed-off-by: Paul Jakma <paul@jakma.org>
---
drivers/net/ethernet/sun/niu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 74e748662ec0..860644d182ab 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -8191,8 +8191,9 @@ static int niu_pci_vpd_fetch(struct niu *np, u32 start)
err = niu_pci_vpd_scan_props(np, here, end);
if (err < 0)
return err;
+ /* ret == 1 is not an error */
if (err == 1)
- return -EINVAL;
+ return 0;
}
return 0;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] NIU: fix incorrect error return, missed in previous revert
2021-07-23 15:13 ` Paul Jakma
@ 2021-07-23 16:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-23 16:50 UTC (permalink / raw)
To: Paul Jakma; +Cc: netdev, kjlu, shannon.lee.nelson, davem, gregkh, stable
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Fri, 23 Jul 2021 16:13:04 +0100 you wrote:
> Commit 7930742d6, reverting 26fd962, missed out on reverting an incorrect
> change to a return value. The niu_pci_vpd_scan_props(..) == 1 case appears
> to be a normal path - treating it as an error and return -EINVAL was
> breaking VPD_SCAN and causing the driver to fail to load.
>
> Fix, so my Neptune card works again.
>
> [...]
Here is the summary with links:
- NIU: fix incorrect error return, missed in previous revert
https://git.kernel.org/netdev/net/c/15bbf8bb4d4a
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] 3+ messages in thread
end of thread, other threads:[~2021-07-23 16:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210721.084759.550228860951288308.davem () davemloft ! net>
[not found] ` <20210723134154.1252732-1-paul@jakma.org>
2021-07-23 13:41 ` [PATCH] NIU: fix incorrect error return, missed in previous revert Paul Jakma
2021-07-23 15:13 ` Paul Jakma
2021-07-23 16:50 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.