diff options
author | Jeff Garzik <jeff@garzik.org> | 2010-11-16 02:10:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-16 16:33:23 -0500 |
commit | f281233d3eba15fb225d21ae2e228fd4553d824a (patch) | |
tree | 51134454ba8acb558735f90be5540f7d756483e3 /drivers/scsi/atari_scsi.c | |
parent | bdbd01ac444bffb3c9aefed3059d12554059b320 (diff) |
SCSI host lock push-down
Move the mid-layer's ->queuecommand() invocation from being locked
with the host lock to being unlocked to facilitate speeding up the
critical path for drivers who don't need this lock taken anyway.
The patch below presents a simple SCSI host lock push-down as an
equivalent transformation. No locking or other behavior should change
with this patch. All existing bugs and locking orders are preserved.
Additionally, add one parameter to queuecommand,
struct Scsi_Host *
and remove one parameter from queuecommand,
void (*done)(struct scsi_cmnd *)
Scsi_Host* is a convenient pointer that most host drivers need anyway,
and 'done' is redundant to struct scsi_cmnd->scsi_done.
Minimal code disturbance was attempted with this change. Most drivers
needed only two one-line modifications for their host lock push-down.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi/atari_scsi.c')
-rw-r--r-- | drivers/scsi/atari_scsi.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index ad7a23aef0ec..3e8658e2f154 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c | |||
@@ -572,23 +572,6 @@ static void falcon_get_lock(void) | |||
572 | } | 572 | } |
573 | 573 | ||
574 | 574 | ||
575 | /* This is the wrapper function for NCR5380_queue_command(). It just | ||
576 | * tries to get the lock on the ST-DMA (see above) and then calls the | ||
577 | * original function. | ||
578 | */ | ||
579 | |||
580 | #if 0 | ||
581 | int atari_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *)) | ||
582 | { | ||
583 | /* falcon_get_lock(); | ||
584 | * ++guenther: moved to NCR5380_queue_command() to prevent | ||
585 | * race condition, see there for an explanation. | ||
586 | */ | ||
587 | return NCR5380_queue_command(cmd, done); | ||
588 | } | ||
589 | #endif | ||
590 | |||
591 | |||
592 | int __init atari_scsi_detect(struct scsi_host_template *host) | 575 | int __init atari_scsi_detect(struct scsi_host_template *host) |
593 | { | 576 | { |
594 | static int called = 0; | 577 | static int called = 0; |