summaryrefslogtreecommitdiff
path: root/drivers/scsi/esp_scsi.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2007-12-10 15:49:31 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-12-10 19:43:55 -0800
commit522939d45c293388e6a360210905f9230298df16 (patch)
tree38c37c6688a5095ab49c8fd42425e2bf3fb61ae9 /drivers/scsi/esp_scsi.c
parent794e64d5e9c7f088378e093a48eb36a30091d82d (diff)
esp_scsi: fix reset cleanup spinlock recursion
The esp_reset_cleanup() function is called with the host lock held and invokes starget_for_each_device() which wants to take it too. Here is a fix along the lines of shost_for_each_device()/__shost_for_each_device() adding a __starget_for_each_device() counterpart which assumes the lock has already been taken. Eventually, I think the driver should get modified so that more work is done as a softirq rather than in the interrupt context, but for now it fixes a bug that causes the spinlock debugger to fire. While at it, it fixes a small number of cosmetic problems with starget_for_each_device() too. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Acked-by: David S. Miller <davem@davemloft.net> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/esp_scsi.c')
-rw-r--r--drivers/scsi/esp_scsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 4ed3a5297066..bfdee5968892 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -2026,8 +2026,8 @@ static void esp_reset_cleanup(struct esp *esp)
tp->flags |= ESP_TGT_CHECK_NEGO;
if (tp->starget)
- starget_for_each_device(tp->starget, NULL,
- esp_clear_hold);
+ __starget_for_each_device(tp->starget, NULL,
+ esp_clear_hold);
}
esp->flags &= ~ESP_FLAG_RESETTING;
}