scsi-generic: Handle queue full
The sg driver currently has a hardcoded limit of commands it can handle simultaneously. When this limit is reached the driver will return -EDOM. So we need to capture this to enable proper return values here. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
42741212eb
commit
2e7cc4d604
@ -124,6 +124,9 @@ static void scsi_command_complete(void *opaque, int ret)
|
|||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
|
case -EDOM:
|
||||||
|
r->req.status = TASK_SET_FULL;
|
||||||
|
break;
|
||||||
case -EINVAL:
|
case -EINVAL:
|
||||||
r->req.status = CHECK_CONDITION;
|
r->req.status = CHECK_CONDITION;
|
||||||
scsi_set_sense(s, SENSE_CODE(INVALID_FIELD));
|
scsi_set_sense(s, SENSE_CODE(INVALID_FIELD));
|
||||||
|
Loading…
Reference in New Issue
Block a user