scsi: add scsi-mq helpers and init/exit_command hooks
authorJens Axboe <axboe@fb.com>
Thu, 2 Apr 2015 18:24:02 +0000 (12:24 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 3 Apr 2015 01:35:37 +0000 (19:35 -0600)
commita633aed89c4ce284469be6e1c67ee9f1e9635904
tree70db32ad0ce6fb74463b79d12f31eaacec9bf740
parentd0578da7d5bb9e36538ce0b215cf42ae96420ef1
scsi: add scsi-mq helpers and init/exit_command hooks

If a driver sets ->cmd_size, it might need to initialize the
specific hw commands. Add a host template hook for doing init
off scsi_init_request(), and one for teardown.

Add a scsi_mq_scmd_to_pdu() helper to return the driver private
data for each scsi command. And add a scsi_mq_request_started()
helper.

Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/scsi/scsi_lib.c
include/scsi/scsi_host.h
include/scsi/scsi_tcq.h