diff mbox series

[net,3/4] ibmvnic: don't spin in tasklet

Message ID 20220122025921.199446-3-sukadev@linux.ibm.com (mailing list archive)
State Accepted
Commit 48079e7fdd0269d66b1d7d66ae88bd03162464ad
Delegated to: Netdev Maintainers
Headers show
Series [net,1/4] ibmvnic: Allow extra failures before disabling | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter warning Series does not have a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 2 blamed authors not CCed: davem@davemloft.net tlfalcon@linux.ibm.com; 7 maintainers not CCed: paulus@samba.org kuba@kernel.org benh@kernel.crashing.org mpe@ellerman.id.au linuxppc-dev@lists.ozlabs.org davem@davemloft.net tlfalcon@linux.ibm.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 12 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Sukadev Bhattiprolu Jan. 22, 2022, 2:59 a.m. UTC
ibmvnic_tasklet() continuously spins waiting for responses to all
capability requests. It does this to avoid encountering an error
during initialization of the vnic. However if there is a bug in the
VIOS and we do not receive a response to one or more queries the
tasklet ends up spinning continuously leading to hard lock ups.

If we fail to receive a message from the VIOS it is reasonable to
timeout the login attempt rather than spin indefinitely in the tasklet.

Fixes: 249168ad07cd ("ibmvnic: Make CRQ interrupt tasklet wait for all capabilities crqs")
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Dany Madden Jan. 23, 2022, 12:32 a.m. UTC | #1
On 2022-01-21 18:59, Sukadev Bhattiprolu wrote:
> ibmvnic_tasklet() continuously spins waiting for responses to all
> capability requests. It does this to avoid encountering an error
> during initialization of the vnic. However if there is a bug in the
> VIOS and we do not receive a response to one or more queries the
> tasklet ends up spinning continuously leading to hard lock ups.
> 
> If we fail to receive a message from the VIOS it is reasonable to
> timeout the login attempt rather than spin indefinitely in the tasklet.
> 
> Fixes: 249168ad07cd ("ibmvnic: Make CRQ interrupt tasklet wait for all
> capabilities crqs")
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Reviewed-by: Dany Madden <drt@linux.ibm.com>

> ---
>  drivers/net/ethernet/ibm/ibmvnic.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
> b/drivers/net/ethernet/ibm/ibmvnic.c
> index acd488310bbc..682a440151a8 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -5491,12 +5491,6 @@ static void ibmvnic_tasklet(struct 
> tasklet_struct *t)
>  			ibmvnic_handle_crq(crq, adapter);
>  			crq->generic.first = 0;
>  		}
> -
> -		/* remain in tasklet until all
> -		 * capabilities responses are received
> -		 */
> -		if (!adapter->wait_capability)
> -			done = true;
>  	}
>  	/* if capabilities CRQ's were sent in this tasklet, the following
>  	 * tasklet must wait until all responses are received
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index acd488310bbc..682a440151a8 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -5491,12 +5491,6 @@  static void ibmvnic_tasklet(struct tasklet_struct *t)
 			ibmvnic_handle_crq(crq, adapter);
 			crq->generic.first = 0;
 		}
-
-		/* remain in tasklet until all
-		 * capabilities responses are received
-		 */
-		if (!adapter->wait_capability)
-			done = true;
 	}
 	/* if capabilities CRQ's were sent in this tasklet, the following
 	 * tasklet must wait until all responses are received