Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3622

kernel-2.6.18-194.11.1.el5.src.rpm

From: Jesse Larrew <jlarrew@redhat.com>
Date: Thu, 14 May 2009 00:59:55 -0400
Subject: [scsi] retry IO on unit attention
Message-id: 20090514045704.10947.26705.sendpatchset@squad5-lp1.lab.bos.redhat.com
O-Subject: [PATCH RHEL5.4 4/10 BZ489582] Retry IO on unit attention
Bugzilla: 489582
RH-Acked-by: Mike Christie <mchristi@redhat.com>

RHBZ#:
======
https://bugzilla.redhat.com/show_bug.cgi?id=489582

Description:
===========
This is a bug fix for all archs.

During device discovery, read capacity fails with 0x068b02 and sets the
device size to 0. Thus any I/O submitted to this path gets killed at
sd_prep_fn with BLKPREP_KILL.

This patch implements retry logic for the 0x068b02 case.

RHEL Version Found:
================
RHEL 5.3

kABI Status:
============
No symbols were harmed.

Brew:
=====
Built on all platforms.
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1794596

Upstream Status:
================
commit: ea41e41588c248ee8b8162869c1e1c0565a4b3f6

Test Status:
============
This patch has been tested by Chandra Seetharaman at IBM
(sekharan@us.ibm.com).

===============================================================

Jesse Larrew
IBM Onsite Partner
978-392-3183
jlarrew@redhat.com

Proposed Patch:
===============
This patch is based on 2.6.18-136.el5.

diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index 5d4ad1d..f4ae03f 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -594,6 +594,11 @@ static int rdac_check_sense(struct scsi_device *sdev,
 			 * Power On, Reset, or Bus Device Reset, just retry.
 			 */
 			return SCSI_MLQUEUE_IMM_RETRY;
+		if (sense_hdr->asc == 0x8b && sense_hdr->ascq == 0x02)
+			/*
+			 * Quiescence in progress , just retry.
+			 */
+			return SCSI_MLQUEUE_IMM_RETRY;
 		break;
 	}
 	/* success just means we do not care what scsi-ml does */