diff options
Diffstat (limited to 'include/scsi/scsi_host.h')
-rw-r--r-- | include/scsi/scsi_host.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index d0a6a845f204..e7e385842a38 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -127,8 +127,7 @@ struct scsi_host_template { | |||
127 | * | 127 | * |
128 | * STATUS: REQUIRED | 128 | * STATUS: REQUIRED |
129 | */ | 129 | */ |
130 | int (* queuecommand)(struct scsi_cmnd *, | 130 | int (* queuecommand)(struct Scsi_Host *, struct scsi_cmnd *); |
131 | void (*done)(struct scsi_cmnd *)); | ||
132 | 131 | ||
133 | /* | 132 | /* |
134 | * The transfer functions are used to queue a scsi command to | 133 | * The transfer functions are used to queue a scsi command to |
@@ -505,6 +504,25 @@ struct scsi_host_template { | |||
505 | }; | 504 | }; |
506 | 505 | ||
507 | /* | 506 | /* |
507 | * Temporary #define for host lock push down. Can be removed when all | ||
508 | * drivers have been updated to take advantage of unlocked | ||
509 | * queuecommand. | ||
510 | * | ||
511 | */ | ||
512 | #define DEF_SCSI_QCMD(func_name) \ | ||
513 | int func_name(struct Scsi_Host *shost, struct scsi_cmnd *cmd) \ | ||
514 | { \ | ||
515 | unsigned long irq_flags; \ | ||
516 | int rc; \ | ||
517 | spin_lock_irqsave(shost->host_lock, irq_flags); \ | ||
518 | scsi_cmd_get_serial(shost, cmd); \ | ||
519 | rc = func_name##_lck (cmd, cmd->scsi_done); \ | ||
520 | spin_unlock_irqrestore(shost->host_lock, irq_flags); \ | ||
521 | return rc; \ | ||
522 | } | ||
523 | |||
524 | |||
525 | /* | ||
508 | * shost state: If you alter this, you also need to alter scsi_sysfs.c | 526 | * shost state: If you alter this, you also need to alter scsi_sysfs.c |
509 | * (for the ascii descriptions) and the state model enforcer: | 527 | * (for the ascii descriptions) and the state model enforcer: |
510 | * scsi_host_set_state() | 528 | * scsi_host_set_state() |
@@ -752,6 +770,7 @@ extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *); | |||
752 | extern void scsi_host_put(struct Scsi_Host *t); | 770 | extern void scsi_host_put(struct Scsi_Host *t); |
753 | extern struct Scsi_Host *scsi_host_lookup(unsigned short); | 771 | extern struct Scsi_Host *scsi_host_lookup(unsigned short); |
754 | extern const char *scsi_host_state_name(enum scsi_host_state); | 772 | extern const char *scsi_host_state_name(enum scsi_host_state); |
773 | extern void scsi_cmd_get_serial(struct Scsi_Host *, struct scsi_cmnd *); | ||
755 | 774 | ||
756 | extern u64 scsi_calculate_bounce_limit(struct Scsi_Host *); | 775 | extern u64 scsi_calculate_bounce_limit(struct Scsi_Host *); |
757 | 776 | ||