Skip to contentSkip to conversation

esp: fix eh locking

PATCH In review Christoph Hellwig 2 participants 2 messages Feb 22, 2006 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 esp: fix eh locking

esp_reset didn't get fixed when the EH locking changed. ->eh_bus_reset_handler is now called without the host lock held.

drivers/scsi/esp.c +1 -3
Index: xfs-2.6.x/drivers/scsi/esp.c
===================================================================
@@ -2068,14 +2068,12 @@
 {
 	struct esp *esp = (struct esp *) SCptr->device->host->hostdata;
 
+	spin_lock_irq(esp->ehost->host_lock);
 	(void) esp_do_resetbus(esp);
-
 	spin_unlock_irq(esp->ehost->host_lock);
 
 	wait_event(esp->reset_queue, (esp->resetting_bus == 0));
 
-	spin_lock_irq(esp->ehost->host_lock);
-
 	return SUCCESS;
 }