<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/scsi_error.c, branch linux-3.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-08-22T05:42:54Z</updated>
<entry>
<title>[SCSI] Fix 'Device not ready' issue on mpt2sas</title>
<updated>2012-08-22T05:42:54Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2012-07-25T19:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=14216561e164671ce147458653b1fea06a4ada1e'/>
<id>urn:sha1:14216561e164671ce147458653b1fea06a4ada1e</id>
<content type='text'>
This is a particularly nasty SCSI ATA Translation Layer (SATL) problem.

SAT-2 says (section 8.12.2)

        if the device is in the stopped state as the result of
        processing a START STOP UNIT command (see 9.11), then the SATL
        shall terminate the TEST UNIT READY command with CHECK CONDITION
        status with the sense key set to NOT READY and the additional
        sense code of LOGICAL UNIT NOT READY, INITIALIZING COMMAND
        REQUIRED;

mpt2sas internal SATL seems to implement this.  The result is very confusing
standby behaviour (using hdparm -y).  If you suspend a drive and then send
another command, usually it wakes up.  However, if the next command is a TEST
UNIT READY, the SATL sees that the drive is suspended and proceeds to follow
the SATL rules for this, returning NOT READY to all subsequent commands.  This
means that the ordering of TEST UNIT READY is crucial: if you send TUR and
then a command, you get a NOT READY to both back.  If you send a command and
then a TUR, you get GOOD status because the preceeding command woke the drive.

This bit us badly because

commit 85ef06d1d252f6a2e73b678591ab71caad4667bb
Author: Tejun Heo &lt;tj@kernel.org&gt;
Date:   Fri Jul 1 16:17:47 2011 +0200

    block: flush MEDIA_CHANGE from drivers on close(2)

Changed our ordering on TEST UNIT READY commands meaning that SATA drives
connected to an mpt2sas now suspend and refuse to wake (because the mpt2sas
SATL sees the suspend *before* the drives get awoken by the next ATA command)
resulting in lots of failed commands.

The standard is completely nuts forcing this inconsistent behaviour, but we
have to work around it.

The fix for this is twofold:

   1. Set the allow_restart flag so we wake the drive when we see it has been
      suspended

   2. Return all TEST UNIT READY status directly to the mid layer without any
      further error handling which prevents us causing error handling which
      may offline the device just because of a media check TUR.

Reported-by: Matthias Prager &lt;linux@matthiasprager.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] cleanup setting task state in scsi_error_handler()</title>
<updated>2012-07-20T07:58:47Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2012-06-22T06:25:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9d5c6b7ef570bea0d22746944d7b58fa7f17b13'/>
<id>urn:sha1:b9d5c6b7ef570bea0d22746944d7b58fa7f17b13</id>
<content type='text'>
A quick reading of scsi_error_handler() one could come away with the
impression that it does its wakeup event check while the task state is
TASK_RUNNING.  In fact it sets TASK_INTERRUPTIBLE at the bottom of the
loop, but that is ~50 lines down.

Just set TASK_INTERRUPTIBLE at the top of loop and be done.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] fix eh wakeup (scsi_schedule_eh vs scsi_restart_operations)</title>
<updated>2012-07-20T07:58:46Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2012-06-22T06:25:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57fc2e335fd3c2f898ee73570dc81426c28dc7b4'/>
<id>urn:sha1:57fc2e335fd3c2f898ee73570dc81426c28dc7b4</id>
<content type='text'>
Rapid ata hotplug on a libsas controller results in cases where libsas
is waiting indefinitely on eh to perform an ata probe.

A race exists between scsi_schedule_eh() and scsi_restart_operations()
in the case when scsi_restart_operations() issues i/o to other devices
in the sas domain.  When this happens the host state transitions from
SHOST_RECOVERY (set by scsi_schedule_eh) back to SHOST_RUNNING and
-&gt;host_busy is non-zero so we put the eh thread to sleep even though
-&gt;host_eh_scheduled is active.

Before putting the error handler to sleep we need to check if the
host_state needs to return to SHOST_RECOVERY for another trip through
eh.  Since i/o that is released by scsi_restart_operations has been
blocked for at least one eh cycle, this implementation allows those
i/o's to run before another eh cycle starts to discourage hung task
timeouts.

Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Tom Jackson &lt;thomas.p.jackson@intel.com&gt;
Tested-by: Tom Jackson &lt;thomas.p.jackson@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2012-05-23T02:22:50Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2012-05-23T02:22:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8650a08232e75274304b812ff04cfce9af9671c'/>
<id>urn:sha1:e8650a08232e75274304b812ff04cfce9af9671c</id>
<content type='text'>
Pull trivial updates from Jiri Kosina:
 "As usual, it's mostly typo fixes, redundant code elimination and some
  documentation updates."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits)
  edac, mips: don't change code that has been removed in edac/mips tree
  xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer
  lib: Change mail address of Oskar Schirmer
  net: Change mail address of Oskar Schirmer
  arm/m68k: Change mail address of Sebastian Hess
  i2c: Change mail address of Oskar Schirmer
  net: Fix tcp_build_and_update_options comment in struct tcp_sock
  atomic64_32.h: fix parameter naming mismatch
  Kconfig: replace "--- help ---" with "---help---"
  c2port: fix bogus Kconfig "default no"
  edac: Fix spelling errors.
  qla1280: Remove redundant NULL check before release_firmware() call
  remoteproc: remove redundant NULL check before release_firmware()
  qla2xxx: Remove redundant NULL check before release_firmware() call.
  aic94xx: Get rid of redundant NULL check before release_firmware() call
  tehuti: delete redundant NULL check before release_firmware()
  qlogic: get rid of a redundant test for NULL before call to release_firmware()
  bna: remove redundant NULL test before release_firmware()
  tg3: remove redundant NULL test before release_firmware() call
  typhoon: get rid of redundant conditional before all to release_firmware()
  ...
</content>
</entry>
<entry>
<title>scsi: fix comment spelling fix recory-&gt;recovery</title>
<updated>2012-04-16T12:35:30Z</updated>
<author>
<name>Santosh Y</name>
</author>
<published>2012-04-08T13:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b729f7647875624dc498b65f3244b2edc9f4a07'/>
<id>urn:sha1:3b729f7647875624dc498b65f3244b2edc9f4a07</id>
<content type='text'>
Signed-off-by: Santosh Y &lt;santoshsy@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>SCSI: Fix error handling when no ULD is attached</title>
<updated>2012-04-15T18:08:53Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2012-04-15T03:01:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=919f797a4c9c22ff5ec059744dba364dc600ece2'/>
<id>urn:sha1:919f797a4c9c22ff5ec059744dba364dc600ece2</id>
<content type='text'>
Commit 18a4d0a22ed6 ("[SCSI] Handle disk devices which can not process
medium access commands") introduced a bug in which we would attempt to
dereference the scsi driver even when the device had no ULD attached.

Ensure that a driver is registered and make the driver accessor function
more resilient to errors during device discovery.

Reported-by: Elric Fu &lt;elricfu1@gmail.com&gt;
Reported-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[SCSI] Handle disk devices which can not process medium access commands</title>
<updated>2012-02-19T16:14:52Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2012-02-09T18:48:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18a4d0a22ed6c54b67af7718c305cd010f09ddf8'/>
<id>urn:sha1:18a4d0a22ed6c54b67af7718c305cd010f09ddf8</id>
<content type='text'>
We have experienced several devices which fail in a fashion we do not
currently handle gracefully in SCSI. After a failure these devices will
respond to the SCSI primary command set (INQUIRY, TEST UNIT READY, etc.)
but any command accessing the storage medium will time out.

The following patch adds an callback that can be used by upper level
drivers to inspect the results of an error handling command. This in
turn has been used to implement additional checking in the SCSI disk
driver.

If a medium access command fails twice but TEST UNIT READY succeeds both
times in the subsequent error handling we will offline the device. The
maximum number of failed commands required to take a device offline can
be tweaked in sysfs.

Also add a new error flag to scsi_debug which allows this scenario to be
easily reproduced.

[jejb: fix up integer parsing to use kstrtouint]
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] scsi_error: classify some ILLEGAL_REQUEST sense as a permanent TARGET_ERROR</title>
<updated>2012-02-19T15:39:59Z</updated>
<author>
<name>Mike Snitzer</name>
</author>
<published>2012-02-13T23:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47ac56db133cb0b6cf3c8b156db854c158fb9dae'/>
<id>urn:sha1:47ac56db133cb0b6cf3c8b156db854c158fb9dae</id>
<content type='text'>
Permanent target failures are non-retryable and should be classified as
TARGET_ERROR; otherwise dm-multipath will retry an IO request that will
always fail at the target.

A SCSI command that fails with ILLEGAL_REQUEST sense and Additional
sense 0x20, 0x21, 0x24 or 0x26 represents a permanent TARGET_ERROR.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] fix the new host byte settings (DID_TARGET_FAILURE and DID_NEXUS_FAILURE)</title>
<updated>2012-02-19T14:08:59Z</updated>
<author>
<name>Moger, Babu</name>
</author>
<published>2012-01-24T20:38:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2082ebc45af9c9c648383b8cde0dc1948eadbf31'/>
<id>urn:sha1:2082ebc45af9c9c648383b8cde0dc1948eadbf31</id>
<content type='text'>
This patch fixes the host byte settings DID_TARGET_FAILURE and
DID_NEXUS_FAILURE.  The function __scsi_error_from_host_byte, tries to reset
the host byte to DID_OK. But that does not happen because of the OR operation.

Here is the flow.

scsi_softirq_done-&gt; scsi_decide_disposition -&gt; __scsi_error_from_host_byte

Let's take an example with DID_NEXUS_FAILURE. In scsi_decide_disposition,
result will be set as DID_NEXUS_FAILURE (=0x11). Then in
__scsi_error_from_host_byte, when we do OR with DID_OK.  Purpose is to reset
it back to DID_OK. But that does not happen.  This patch fixes this issue.

Signed-off-by: Babu Moger &lt;babu.moger@netapp.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] add flag to skip the runtime PM calls on the host</title>
<updated>2012-01-09T00:14:57Z</updated>
<author>
<name>Lin Ming</name>
</author>
<published>2011-12-05T01:20:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae0751ffc77e7f21629970fdab5528c573e637f8'/>
<id>urn:sha1:ae0751ffc77e7f21629970fdab5528c573e637f8</id>
<content type='text'>
With previous change, now the ata port runtime suspend will happen as:

disk suspend --&gt; scsi target suspend --&gt; scsi host suspend --&gt; ata port
suspend

ata port(parent device) suspend need to schedule scsi EH which will resume
scsi host(child device). Then the child device resume will in turn make
parent device resume first. This is kind of recursive.

This patch adds a new flag Scsi_Host::eh_noresume.
ata port will set this flag to skip the runtime PM calls on scsi host.

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Lin Ming &lt;ming.m.lin@intel.com&gt;
Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
</content>
</entry>
</feed>
