<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/scsi_lib.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:31Z</updated>
<entry>
<title>[SCSI] scsi_lib: fix scsi_io_completion's SG_IO error propagation</title>
<updated>2012-08-22T05:42:31Z</updated>
<author>
<name>Mike Snitzer</name>
</author>
<published>2012-05-31T19:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27c419739b67decced4650440829b8d51bef954b'/>
<id>urn:sha1:27c419739b67decced4650440829b8d51bef954b</id>
<content type='text'>
The following v3.4-rc1 commit unmasked an existing bug in scsi_io_completion's
SG_IO error handling: 47ac56d [SCSI] scsi_error: classify some ILLEGAL_REQUEST
sense as a permanent TARGET_ERROR

Given that certain ILLEGAL_REQUEST are now properly categorized as
TARGET_ERROR the host_byte is being set (before host_byte wasn't ever
set for these ILLEGAL_REQUEST).

In scsi_io_completion, initialize req-&gt;errors with cmd-&gt;result _after_
the SG_IO block that calls __scsi_error_from_host_byte (which may
modify the host_byte).

Before this fix:

    cdb to send: 12 01 01 00 00 00
ioctl(3, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[12, 01, 01, 00, 00, 00],
    mx_sb_len=32, iovec_count=0, dxfer_len=0, timeout=20000, flags=0,
    status=02, masked_status=01, sb[19]=[70, 00, 05, 00, 00, 00, 00, 0b,
    00, 00, 00, 00, 24, 00, 00, 00, 00, 00, 00], host_status=0x10,
    driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
SCSI Status: Check Condition

Sense Information:
sense buffer empty

After:

    cdb to send: 12 01 01 00 00 00
ioctl(3, SG_IO, {'S', SG_DXFER_NONE, cmd[6]=[12, 01, 01, 00, 00, 00],
    mx_sb_len=32, iovec_count=0, dxfer_len=0, timeout=20000, flags=0,
    status=02, masked_status=01, sb[19]=[70, 00, 05, 00, 00, 00, 00, 0b,
    00, 00, 00, 00, 24, 00, 00, 00, 00, 00, 00], host_status=0,
    driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
SCSI Status: Check Condition

Sense Information:
 Fixed format, current;  Sense key: Illegal Request
 Additional sense: Invalid field in cdb
 Raw sense data (in hex):
        70 00 05 00 00 00 00 0b  00 00 00 00 24 00 00 00
        00 00 00

Reported-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Tested-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Reviewed-by: Babu Moger &lt;babu.moger@netapp.com&gt;
Cc: stable@vger.kernel.org # 3.4
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' [vanilla Linus master] into libata-dev.git/upstream</title>
<updated>2012-07-25T19:58:48Z</updated>
<author>
<name>Jeff Garzik</name>
</author>
<published>2012-07-25T19:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8407884dd9164ec18ed2afc00f56b87e36c51fcf'/>
<id>urn:sha1:8407884dd9164ec18ed2afc00f56b87e36c51fcf</id>
<content type='text'>
Two bits were appended to the end of the bitfield
list in struct scsi_device.  Resolve that conflict
by including both bits.

Conflicts:
	include/scsi/scsi_device.h
</content>
</entry>
<entry>
<title>[SCSI] Stop accepting SCSI requests before removing a device</title>
<updated>2012-07-20T07:58:41Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2012-06-29T15:36:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b485462aca7df4e32bcf7efb6f84a69e8b640243'/>
<id>urn:sha1:b485462aca7df4e32bcf7efb6f84a69e8b640243</id>
<content type='text'>
Avoid that the code for requeueing SCSI requests triggers a
crash by making sure that that code isn't scheduled anymore
after a device has been removed.

Also, source code inspection of __scsi_remove_device() revealed
a race condition in this function: no new SCSI requests must be
accepted for a SCSI device after device removal started.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Change return type of scsi_queue_insert() into void</title>
<updated>2012-07-20T07:58:41Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2012-06-29T15:35:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84feb1664e5e6823105414df77740fda70846b99'/>
<id>urn:sha1:84feb1664e5e6823105414df77740fda70846b99</id>
<content type='text'>
The return value of scsi_queue_insert() is ignored by all its
callers, hence change the return type of this function into
void.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Reviewed-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Avoid dangling pointer in scsi_requeue_command()</title>
<updated>2012-07-20T07:58:40Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2012-06-29T15:34:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=940f5d47e2f2e1fa00443921a0abf4822335b54d'/>
<id>urn:sha1:940f5d47e2f2e1fa00443921a0abf4822335b54d</id>
<content type='text'>
When we call scsi_unprep_request() the command associated with the request
gets destroyed and therefore drops its reference on the device.  If this was
the only reference, the device may get released and we end up with a NULL
pointer deref when we call blk_requeue_request.

Reported-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Reviewed-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: &lt;stable@kernel.org&gt;
[jejb: enhance commend and add commit log for stable]
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Fix device removal NULL pointer dereference</title>
<updated>2012-07-20T07:58:40Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2012-06-29T15:33:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=67bd94130015c507011af37858989b199c52e1de'/>
<id>urn:sha1:67bd94130015c507011af37858989b199c52e1de</id>
<content type='text'>
Use blk_queue_dead() to test whether the queue is dead instead
of !sdev. Since scsi_prep_fn() may be invoked concurrently with
__scsi_remove_device(), keep the queuedata (sdev) pointer in
__scsi_remove_device(). This patch fixes a kernel oops that
can be triggered by USB device removal. See also
http://www.spinics.net/lists/linux-scsi/msg56254.html.

Other changes included in this patch:
- Swap the blk_cleanup_queue() and kfree() calls in
  scsi_host_dev_release() to make that code easier to grasp.
- Remove the queue dead check from scsi_run_queue() since the
  queue state can change anyway at any point in that function
  where the queue lock is not held.
- Remove the queue dead check from the start of scsi_request_fn()
  since it is redundant with the scsi_device_online() check.

Reported-by: Jun'ichi Nomura &lt;j-nomura@ce.jp.nec.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Reviewed-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] remove old comment from block/unblock functions</title>
<updated>2012-07-20T07:58:23Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2012-05-18T04:56:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d075498c987623107f7bface4dad72fe9260a0d3'/>
<id>urn:sha1:d075498c987623107f7bface4dad72fe9260a0d3</id>
<content type='text'>
We do not hold the host lock when calling these functions,
so remove comment.

Signed-off-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] core, classes, mpt2sas: have scsi_internal_device_unblock take new state</title>
<updated>2012-07-20T07:58:22Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2012-05-18T04:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d9fb5cc1b88277bb28a2a54e51b34cacaa123c2'/>
<id>urn:sha1:5d9fb5cc1b88277bb28a2a54e51b34cacaa123c2</id>
<content type='text'>
This has scsi_internal_device_unblock/scsi_target_unblock take
the new state to set the devices as an argument instead of
always setting to running. The patch also converts users of these
functions.

This allows the FC and iSCSI class to transition devices from blocked
to transport-offline, so that when fast_io_fail/replacement_timeout
has fired we do not set the devices back to running. Instead, we
set them to SDEV_TRANSPORT_OFFLINE.

Signed-off-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] add new SDEV_TRANSPORT_OFFLINE state</title>
<updated>2012-07-20T07:58:21Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2012-05-18T04:56:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b8d26206134458044b0689f48194af00c96d406'/>
<id>urn:sha1:1b8d26206134458044b0689f48194af00c96d406</id>
<content type='text'>
This patch adds a new state SDEV_TRANSPORT_OFFLINE. It will
be used by transport classes to offline devices for cases like
when the fast_io_fail/recovery_tmo fires. In those cases we
want all IO to fail, and we have not yet escalated to dev_loss_tmo
behavior where we are removing the devices.

Currently to handle this state, transport classes are setting
the scsi_device's state to running, setting their internal
session/port structs state to something that indicates failed,
and then failing IO from some transport check in the queuecommand.

The reason for the new value is so that users can distinguish
between a device failure that is a result of a transport problem
vs the wide range of errors that devices get offlined for
when a scsi command times out and we offline the devices there.
It also fixes the confusion as to why the transport class is
failing IO, but has set the device state from blocked to running.

Signed-off-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] add wrapper to access and set scsi_bus_type in struct acpi_bus_type</title>
<updated>2012-06-29T15:38:09Z</updated>
<author>
<name>Holger Macht</name>
</author>
<published>2012-06-25T08:13:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de50ada55b6b83b54b817911ec42dc590e1c1738'/>
<id>urn:sha1:de50ada55b6b83b54b817911ec42dc590e1c1738</id>
<content type='text'>
For being able to bind ata devices against acpi devices, scsi_bus_type
needs to be set as bus in struct acpi_bus_type. So add wrapper to
scsi_lib to accomplish that.

Signed-off-by: Holger Macht &lt;holger@homac.de&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>
