linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] megaraid_sas: fix EH locking
@ 2005-10-31 18:51 Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2005-10-31 18:51 UTC (permalink / raw)
  To: jejb, Sreenivas.Bagalkote; +Cc: linux-scsi

recent kernels call the eh_ methods without the host lock held.
megaraid_sas doesn't need it but drops it before calling a sleeping
routine and reqcquires it afterwards.  Just remove the
spin_unlock/spin_lock calls.


Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/drivers/scsi/megaraid/megaraid_sas.c
===================================================================
--- linux-2.6.orig/drivers/scsi/megaraid/megaraid_sas.c	2005-10-11 19:53:19.000000000 +0200
+++ linux-2.6/drivers/scsi/megaraid/megaraid_sas.c	2005-10-31 11:01:39.000000000 +0100
@@ -768,17 +764,12 @@
 		return FAILED;
 	}
 
-	spin_unlock(scmd->device->host->host_lock);
-
 	ret_val = megasas_wait_for_outstanding(instance);
-
 	if (ret_val == SUCCESS)
 		printk(KERN_NOTICE "megasas: reset successful \n");
 	else
 		printk(KERN_ERR "megasas: failed to do reset\n");
 
-	spin_lock(scmd->device->host->host_lock);
-
 	return ret_val;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] megaraid_sas: fix EH locking
@ 2005-10-31 18:52 Bagalkote, Sreenivas
  0 siblings, 0 replies; 2+ messages in thread
From: Bagalkote, Sreenivas @ 2005-10-31 18:52 UTC (permalink / raw)
  To: 'Christoph Hellwig', jejb; +Cc: linux-scsi

>Subject: [PATCH] megaraid_sas: fix EH locking
>
>recent kernels call the eh_ methods without the host lock held.
>megaraid_sas doesn't need it but drops it before calling a sleeping
>routine and reqcquires it afterwards.  Just remove the
>spin_unlock/spin_lock calls.
>

Thank you.

>
>Signed-off-by: Christoph Hellwig <hch@lst.de>
>
>Index: linux-2.6/drivers/scsi/megaraid/megaraid_sas.c
>===================================================================
>--- linux-2.6.orig/drivers/scsi/megaraid/megaraid_sas.c	
>2005-10-11 19:53:19.000000000 +0200
>+++ linux-2.6/drivers/scsi/megaraid/megaraid_sas.c	
>2005-10-31 11:01:39.000000000 +0100
>@@ -768,17 +764,12 @@
> 		return FAILED;
> 	}
> 
>-	spin_unlock(scmd->device->host->host_lock);
>-
> 	ret_val = megasas_wait_for_outstanding(instance);
>-
> 	if (ret_val == SUCCESS)
> 		printk(KERN_NOTICE "megasas: reset successful \n");
> 	else
> 		printk(KERN_ERR "megasas: failed to do reset\n");
> 
>-	spin_lock(scmd->device->host->host_lock);
>-
> 	return ret_val;
> }
> 
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-10-31 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-31 18:51 [PATCH] megaraid_sas: fix EH locking Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2005-10-31 18:52 Bagalkote, Sreenivas

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).