diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-07-16 12:22:26 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-07-29 17:36:33 +0200 |
commit | 3e7e180ab3f970a4e5b64b5fafd57c48c98ee560 (patch) | |
tree | 5b41b83e0bc2c2f4264c7071af3993c44559d81b /hw/scsi/scsi-bus.c | |
parent | 592c3b289f77ee77d5bff25cb19326cc7f22a532 (diff) | |
download | qemu-3e7e180ab3f970a4e5b64b5fafd57c48c98ee560.zip qemu-3e7e180ab3f970a4e5b64b5fafd57c48c98ee560.tar.gz qemu-3e7e180ab3f970a4e5b64b5fafd57c48c98ee560.tar.bz2 |
scsi-block, scsi-generic: implement parse_cdb
The callback lets the bus provide the direction and transfer count
for passthrough commands, enabling passthrough of vendor-specific
commands.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/scsi-bus.c')
-rw-r--r-- | hw/scsi/scsi-bus.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index d97d18a..6f4462b 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -9,7 +9,6 @@ static char *scsibus_get_dev_path(DeviceState *dev); static char *scsibus_get_fw_dev_path(DeviceState *dev); -static int scsi_req_parse_cdb(SCSIDevice *dev, SCSICommand *cmd, uint8_t *buf); static void scsi_req_dequeue(SCSIRequest *req); static uint8_t *scsi_target_alloc_buf(SCSIRequest *req, size_t len); static void scsi_target_free_buf(SCSIRequest *req); @@ -1210,7 +1209,7 @@ static uint64_t scsi_cmd_lba(SCSICommand *cmd) return lba; } -static int scsi_req_parse_cdb(SCSIDevice *dev, SCSICommand *cmd, uint8_t *buf) +int scsi_req_parse_cdb(SCSIDevice *dev, SCSICommand *cmd, uint8_t *buf) { int rc; |