From: mchristi@redhat.com <mchristi@redhat.com> Date: Thu, 2 Oct 2008 13:58:00 -0500 Subject: [scsi] fix QUEUE_FULL retry handling Message-id: 1222973881-4441-1-git-send-email-mchristi@redhat.com O-Subject: [PATCH 1/2] fix QUEUE_FULL retry handling Bugzilla: 463709 RH-Acked-by: Tomas Henzl <thenzl@redhat.com> From: Mike Christie <mchristi@redhat.com> This is for BZ 463709. When I changed the failfast code I added new error codes like SCSI_MLQUEUE_DEVICE_BUSY2 which were to be used by new code and internally where there were not LLD entry points that could return the old values like SCSI_MLQUEUE_DEVICE_BUSY. When I added that compat patch I goofed in another place (it looks like this is the last place I could screw up on at least). We were using the older return values internally in scsi_error.c but the caller only expected the new values, so errors like QUEUE_FULL were getting finished instead of retried. Patch was tested here by forcing devices to return QUEUE_FULLs, then making sure it was retried. This is not upstream since it was a workaround for our KABI. diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index e6bc2de..918ec68 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1236,7 +1236,7 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) case DID_IMM_RETRY: return SCSI_MLQUEUE_IMM_RETRY; case DID_REQUEUE: - return SCSI_MLQUEUE_DEVICE_BUSY; + return SCSI_MLQUEUE_DEVICE_BUSY2; case DID_TRANSPORT_DISRUPTED: /* * LLD/transport was disrupted during processing of the IO. @@ -1305,7 +1305,7 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd) * the empty queue handling to trigger a stall in the * device. */ - return SCSI_MLQUEUE_DEVICE_BUSY; + return SCSI_MLQUEUE_DEVICE_BUSY2; case GOOD: case COMMAND_TERMINATED: case TASK_ABORTED: