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 <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
if (ret != 0) {
switch (ret) {
+ case -EDOM:
+ r->req.status = TASK_SET_FULL;
+ break;
case -EINVAL:
r->req.status = CHECK_CONDITION;
scsi_set_sense(s, SENSE_CODE(INVALID_FIELD));