scsi: make write_data return void
The return value is unused anyway.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Christoph Hellwig <hch@lst.de>
scsi-generic: Handle queue full
The sg driver currently has a hardcoded limit of commands itcan handle simultaneously. When this limit is reached thedriver will return -EDOM. So we need to capture this toenable proper return values here.
Signed-off-by: Hannes Reinecke <hare@suse.de>...
esp: rename sense to status
This mirrors the LSI patch that was recently committed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Cc: Christoph Hellwig <hch@lst.de>
scsi: Update sense code handling
The SCSI spec has a quite detailed list of sense codes available.It even mandates the use of specific ones for some failure cases.The current implementation just has one type of generic errorwhich is actually a violation of the spec in certain cases....
scsi: do not call send_command directly
Move the common part of scsi-disk.c and scsi-generic.c to the SCSI layer.
scsi: introduce scsi_req_new
scsi: introduce scsi_req_continue
scsi: introduce scsi_req_get_buf
... and remove some SCSIDevice variables or fields that now become unused.
scsi: Implement 'get_sense' callback
The get_sense callback copies existing sense information intothe provided buffer. This is required if sense informationshould be transferred together with the command response.
scsi-disk: add data direction checking
scsi_req_parse() already provides for a data direction setting,so we should be using it to check for correct direction.And we should return the sense code 'INVALID FIELD IN CDB'in these cases.
View revisions
Also available in: Atom