Re: [PATCH net] ibmvnic: device remove has higher precedence over reset

2021-01-21 Thread Dany Madden
On 2021-01-20 22:20, Lijun Pan wrote: Returning -EBUSY in ibmvnic_remove() does not actually hold the removal procedure since driver core doesn't care for the return value (see __device_release_driver() in drivers/base/dd.c calling dev->bus->remove()) though vio_bus_remove (in

Re: ibmvnic: Race condition in remove callback

2021-01-19 Thread Dany Madden
On 2021-01-17 02:12, Uwe Kleine-K├Ânig wrote: Hello, while working on some cleanup I stumbled over a problem in the ibmvnic's remove callback. Since commit 7d7195a026ba ("ibmvnic: Do not process device remove during device reset") there is the following code in the remove callback:

[PATCH net v3 1/9] ibmvnic: handle inconsistent login with reset

2020-11-25 Thread Dany Madden
Inconsistent login with the vnicserver is causing the device to be removed. This does not give the device a chance to recover from error state. This patch schedules a FATAL reset instead to bring the adapter up. Fixes: 032c5e82847a2 ("Driver for IBM System i/p VNIC protocol") Signed-of

[PATCH net v3 9/9] ibmvnic: reduce wait for completion time

2020-11-25 Thread Dany Madden
ine for setting adapter link state") Signed-off-by: Dany Madden --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index a17856be2828..d6b2686aed0f 1006

[PATCH net v3 7/9] ibmvnic: send_login should check for crq errors

2020-11-25 Thread Dany Madden
is if we get a PARITALSUCCESS response from the partner. Fixes: 032c5e82847a2 ("Driver for IBM System i/p VNIC protocol") Signed-off-by: Dany Madden Signed-off-by: Sukadev Bhattiprolu --- drivers/net/ethernet/ibm/ibmvnic.c | 18 -- 1 file changed, 12 insertions(+), 6 deletion

[PATCH net v3 8/9] ibmvnic: no reset timeout for 5 seconds after reset

2020-11-25 Thread Dany Madden
Reset timeout is going off right after adapter reset. This patch ensures that timeout is scheduled if it has been 5 seconds since the last reset. 5 seconds is the default watchdog timeout. Fixes: ed651a10875f1 ("ibmvnic: Updated reset handling") Signed-off-by: Dany Madden --- d

[PATCH net v3 6/9] ibmvnic: track pending login

2020-11-25 Thread Dany Madden
From: Sukadev Bhattiprolu If after ibmvnic sends a LOGIN it gets a FAILOVER, it is possible that the worker thread will start reset process and free the login response buffer before it gets a (now stale) LOGIN_RSP. The ibmvnic tasklet will then try to access the login response buffer and crash.

[PATCH net v3 2/9] ibmvnic: stop free_all_rwi on failed reset

2020-11-25 Thread Dany Madden
free_all_rwi(). Fixes: ed651a10875f1 ("ibmvnic: Updated reset handling") Signed-off-by: Dany Madden --- drivers/net/ethernet/ibm/ibmvnic.c | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/et

[PATCH net v3 3/9] ibmvnic: avoid memset null scrq msgs

2020-11-25 Thread Dany Madden
scrq->msgs could be NULL during device reset, causing Linux to crash. So, check before memset scrq->msgs. Fixes: c8b2ad0a4a901 ("ibmvnic: Sanitize entire SCRQ buffer on reset") Signed-off-by: Dany Madden Signed-off-by: Lijun Pan --- drivers/net/ethernet/ib

[PATCH net v3 5/9] ibmvnic: delay next reset if hard reset fails

2020-11-25 Thread Dany Madden
From: Sukadev Bhattiprolu If auto-priority failover is enabled, the backing device needs time to settle if hard resetting fails for any reason. Add a delay of 60 seconds before retrying the hard-reset. Fixes: 2770a7984db5 ("ibmvnic: Introduce hard reset recovery") Signed-off-by: Sukadev

[PATCH net v3 4/9] ibmvnic: restore adapter state on failed reset

2020-11-25 Thread Dany Madden
et so linkwatch_event can run") Fixes: 2770a7984db58 ("ibmvnic: Introduce hard reset recovery") Signed-off-by: Dany Madden --- drivers/net/ethernet/ibm/ibmvnic.c | 67 -- 1 file changed, 36 insertions(+), 31 deletions(-) diff --git a/drivers/net/ether

[PATCH net v3 0/9] ibmvnic: assorted bug fixes

2020-11-25 Thread Dany Madden
"ibmvnic: remove free_all_rwi function" into ibmvnic: stop free_all_rwi on failed reset. Dany Madden (7): ibmvnic: handle inconsistent login with reset ibmvnic: stop free_all_rwi on failed reset ibmvnic: avoid memset null scrq msgs ibmvnic: restore adapter state on failed reset

[PATCH net-next] Revert ibmvnic merge do_change_param_reset into do_reset

2020-11-06 Thread Dany Madden
This reverts commit 16b5f5ce351f8709a6b518cc3cbf240c378305bf where it restructures do_reset. There are patches being tested that would require major rework if this is committed first. We will resend this after the other patches have been applied. Signed-off-by: Dany Madden --- drivers/net

[PATCH net] ibmvnic: update MAINTAINERS

2020-09-14 Thread Dany Madden
Update supporters for IBM Power SRIOV Virtual NIC Device Driver. Thomas Falcon is moving on to other works. Dany Madden, Lijun Pan and Sukadev Bhattiprolu are the current supporters. Signed-off-by: Dany Madden --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH net v3] ibmvnic fix NULL tx_pools and rx_tools issue at do_reset

2020-08-25 Thread Dany Madden
to safe handle NULL pointer case. Signed-off-by: Mingming Cao Signed-off-by: Dany Madden --- drivers/net/ethernet/ibm/ibmvnic.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index

[PATCH net v2] ibmvnic fix NULL tx_pools and rx_tools issue at do_reset

2020-08-25 Thread Dany Madden
to safe handle NULL pointer case. Signed-off-by: Mingming Cao Signed-off-by: Dany Madden --- drivers/net/ethernet/ibm/ibmvnic.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index

[PATCH net] ibmvnic fix NULL tx_pools and rx_tools issue at do_reset

2020-08-24 Thread Dany Madden
and reset_rx_pools to safe handle NULL pointer case. Signed-off-by: Mingming Cao Signed-off-by: Dany Madden --- drivers/net/ethernet/ibm/ibmvnic.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index

[PATCH net] ibmvnic: continue to init in CRQ reset returns H_CLOSED

2020-06-18 Thread Dany Madden
Continue the reset path when partner adapter is not ready or H_CLOSED is returned from reset crq. This patch allows the CRQ init to proceed to establish a valid CRQ for traffic to flow after reset. Signed-off-by: Dany Madden --- drivers/net/ethernet/ibm/ibmvnic.c | 9 +++-- 1 file changed