]>
Commit | Line | Data |
---|---|---|
b9b8764a GKH |
1 | From e709acbd84fb6ef32736331b0147f027a3ef4c20 Mon Sep 17 00:00:00 2001 |
2 | From: Su Hui <suhui@nfschina.com> | |
3 | Date: Thu, 28 Mar 2024 10:06:21 +0800 | |
4 | Subject: octeontx2-pf: check negative error code in otx2_open() | |
5 | ||
6 | From: Su Hui <suhui@nfschina.com> | |
7 | ||
8 | commit e709acbd84fb6ef32736331b0147f027a3ef4c20 upstream. | |
9 | ||
10 | otx2_rxtx_enable() return negative error code such as -EIO, | |
11 | check -EIO rather than EIO to fix this problem. | |
12 | ||
13 | Fixes: c926252205c4 ("octeontx2-pf: Disable packet I/O for graceful exit") | |
14 | Signed-off-by: Su Hui <suhui@nfschina.com> | |
15 | Reviewed-by: Subbaraya Sundeep <sbhatta@marvell.com> | |
16 | Reviewed-by: Simon Horman <horms@kernel.org> | |
17 | Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> | |
18 | Link: https://lore.kernel.org/r/20240328020620.4054692-1-suhui@nfschina.com | |
19 | Signed-off-by: Jakub Kicinski <kuba@kernel.org> | |
20 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
21 | --- | |
22 | drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- | |
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
24 | ||
25 | --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | |
26 | +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | |
27 | @@ -1598,7 +1598,7 @@ int otx2_open(struct net_device *netdev) | |
28 | * mcam entries are enabled to receive the packets. Hence disable the | |
29 | * packet I/O. | |
30 | */ | |
31 | - if (err == EIO) | |
32 | + if (err == -EIO) | |
33 | goto err_disable_rxtx; | |
34 | else if (err) | |
35 | goto err_tx_stop_queues; |