mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Acked-by: David S. Miller <[email protected]> Cc: James Bottomley <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
794e64d5e9
commit
522939d45c
3 changed files with 34 additions and 4 deletions
|
|
@ -242,6 +242,9 @@ extern struct scsi_device *__scsi_device_lookup_by_target(struct scsi_target *,
|
|||
uint);
|
||||
extern void starget_for_each_device(struct scsi_target *, void *,
|
||||
void (*fn)(struct scsi_device *, void *));
|
||||
extern void __starget_for_each_device(struct scsi_target *, void *,
|
||||
void (*fn)(struct scsi_device *,
|
||||
void *));
|
||||
|
||||
/* only exposed to implement shost_for_each_device */
|
||||
extern struct scsi_device *__scsi_iterate_devices(struct Scsi_Host *,
|
||||
|
|
|
|||
Loading…
Reference in a new issue