scsi-bus: introduce parse_cdb in SCSIDeviceClass and SCSIBusInfo
commitff34c32ccc29fc23c11f0ef6c86257e23f9e3266
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 16 Jul 2014 08:39:05 +0000 (16 10:39 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 29 Jul 2014 15:36:25 +0000 (29 17:36 +0200)
tree60023eae3693f494576d6d96dd1716d956888926
parent769998a1dbf338a0cdeab2acf8ef605bcf635e01
scsi-bus: introduce parse_cdb in SCSIDeviceClass and SCSIBusInfo

These callbacks will let devices do their own request parsing, or
defer it to the bus.  If the bus does not provide an implementation,
in turn, fall back to the default parsing routine.

Swap the first two arguments to scsi_req_parse, and rename it to
scsi_req_parse_cdb, for consistency.

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-bus.c
include/hw/scsi/scsi.h