qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v4 20/24] scsi-generic: Handle queue full


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH v4 20/24] scsi-generic: Handle queue full
Date: Mon, 23 May 2011 18:09:05 +0200

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 <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Christoph Hellwig <address@hidden>
---
 hw/scsi-generic.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index 53114e5..30845c5 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -123,6 +123,9 @@ static void scsi_command_complete(void *opaque, int ret)
 
     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));
-- 
1.7.4.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]