<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, branch v3.6</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/scsi?h=v3.6</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/scsi?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-09-18T11:29:30Z</updated>
<entry>
<title>[SCSI] hpsa: fix handling of protocol error</title>
<updated>2012-09-18T11:29:30Z</updated>
<author>
<name>Stephen M. Cameron</name>
<email>scameron@beardog.cce.hp.com</email>
</author>
<published>2012-09-14T21:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=256d0eaac87da1e993190846064f339f4c7a63f5'/>
<id>urn:sha1:256d0eaac87da1e993190846064f339f4c7a63f5</id>
<content type='text'>
If a command status of CMD_PROTOCOL_ERR is received, this
information should be conveyed to the SCSI mid layer, not
dropped on the floor.  CMD_PROTOCOL_ERR may be received
from the Smart Array for any commands destined for an external
RAID controller such as a P2000, or commands destined for tape
drives or CD/DVD-ROM drives, if for instance a cable is
disconnected.  This mostly affects multipath configurations, as
disconnecting a cable on a non-multipath configuration is not
going to do anything good regardless of whether CMD_PROTOCOL_ERR
is handled correctly or not.  Not handling CMD_PROTOCOL_ERR
correctly in a multipath configaration involving external RAID
controllers may cause data corruption, so this is quite a serious
bug.  This bug should not normally cause a problem for direct
attached disk storage.

Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] mpt2sas: Fix for issue - Unable to boot from the drive connected to HBA</title>
<updated>2012-09-17T12:49:47Z</updated>
<author>
<name>sreekanth.reddy@lsi.com</name>
<email>sreekanth.reddy@lsi.com</email>
</author>
<published>2012-08-22T11:25:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=10cce6d8b5af0b32bc4254ae4a28423a74c0921c'/>
<id>urn:sha1:10cce6d8b5af0b32bc4254ae4a28423a74c0921c</id>
<content type='text'>
This patch checks whether HBA is SAS2008 B0 controller.
if it is a SAS2008 B0 controller then it use IO-APIC interrupt instead of MSIX,
as SAS2008 B0 controller doesn't support MSIX interrupts.

[jejb: fix whitespace problems]
Signed-off-by: Sreekanth Reddy &lt;sreekanth.reddy@lsi.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] bnx2i: Fixed NULL ptr deference for 1G bnx2 Linux iSCSI offload</title>
<updated>2012-09-17T12:40:32Z</updated>
<author>
<name>Eddie Wai</name>
<email>eddie.wai@broadcom.com</email>
</author>
<published>2012-08-21T17:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d6532207116307eb7ecbfa7b9e02c53230096a50'/>
<id>urn:sha1:d6532207116307eb7ecbfa7b9e02c53230096a50</id>
<content type='text'>
This patch fixes the following kernel panic invoked by uninitialized fields
in the chip initialization for the 1G bnx2 iSCSI offload.

One of the bits in the chip initialization is being used by the latest
firmware to control overflow packets.  When this control bit gets enabled
erroneously, it would ultimately result in a bad packet placement which would
cause the bnx2 driver to dereference a NULL ptr in the placement handler.

This can happen under certain stress I/O environment under the Linux
iSCSI offload operation.

This change only affects Broadcom's 5709 chipset.

Unable to handle kernel NULL pointer dereference at 0000000000000008 RIP:
 [&lt;ffffffff881f0e7d&gt;] :bnx2:bnx2_poll_work+0xd0d/0x13c5
Pid: 0, comm: swapper Tainted: G     ---- 2.6.18-333.el5debug #2
RIP: 0010:[&lt;ffffffff881f0e7d&gt;]  [&lt;ffffffff881f0e7d&gt;] :bnx2:bnx2_poll_work+0xd0d/0x13c5
RSP: 0018:ffff8101b575bd50  EFLAGS: 00010216
RAX: 0000000000000005 RBX: ffff81007c5fb180 RCX: 0000000000000000
RDX: 0000000000000ffc RSI: 00000000817e8000 RDI: 0000000000000220
RBP: ffff81015bbd7ec0 R08: ffff8100817e9000 R09: 0000000000000000
R10: ffff81007c5fb180 R11: 00000000000000c8 R12: 000000007a25a010
R13: 0000000000000000 R14: 0000000000000005 R15: ffff810159f80558
FS:  0000000000000000(0000) GS:ffff8101afebc240(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000008 CR3: 0000000000201000 CR4: 00000000000006a0
Process swapper (pid: 0, threadinfo ffff8101b5754000, task ffff8101afebd820)
Stack:  000000000000000b ffff810159f80000 0000000000000040 ffff810159f80520
 ffff810159f80500 00cf00cf8008e84b ffffc200100939e0 ffff810009035b20
 0000502900000000 000000be00000001 ffff8100817e7810 00d08101b575bea8
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff8008e0d0&gt;] show_schedstat+0x1c2/0x25b
 [&lt;ffffffff881f1886&gt;] :bnx2:bnx2_poll+0xf6/0x231
 [&lt;ffffffff8000c9b9&gt;] net_rx_action+0xac/0x1b1
 [&lt;ffffffff800125a0&gt;] __do_softirq+0x89/0x133
 [&lt;ffffffff8005e30c&gt;] call_softirq+0x1c/0x28
 [&lt;ffffffff8006d5de&gt;] do_softirq+0x2c/0x7d
 [&lt;ffffffff8006d46e&gt;] do_IRQ+0xee/0xf7
 [&lt;ffffffff8005d625&gt;] ret_from_intr+0x0/0xa
 &lt;EOI&gt;  [&lt;ffffffff801a5780&gt;] acpi_processor_idle_simple+0x1c5/0x341
 [&lt;ffffffff801a573d&gt;] acpi_processor_idle_simple+0x182/0x341
 [&lt;ffffffff801a55bb&gt;] acpi_processor_idle_simple+0x0/0x341
 [&lt;ffffffff80049560&gt;] cpu_idle+0x95/0xb8
 [&lt;ffffffff80078b1c&gt;] start_secondary+0x479/0x488

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Cc: stable@vger.kernel.org
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list</title>
<updated>2012-09-14T14:47:01Z</updated>
<author>
<name>Wang Sen</name>
<email>senwang@linux.vnet.ibm.com</email>
</author>
<published>2012-07-30T06:25:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=27e99ade81368e6fdda3212bff9345177cf9e57a'/>
<id>urn:sha1:27e99ade81368e6fdda3212bff9345177cf9e57a</id>
<content type='text'>
When using the commands below to write some data to a virtio-scsi LUN of the
QEMU guest(32-bit) with 1G physical memory(qemu -m 1024), the qemu will crash.

        # sudo mkfs.ext4 /dev/sdb  (/dev/sdb is the virtio-scsi LUN.)
        # sudo mount /dev/sdb /mnt
        # dd if=/dev/zero of=/mnt/file bs=1M count=1024

In current implementation, sg_set_buf is called to add buffers to sg list which
is put into the virtqueue eventually. But if there are some HighMem pages in
table-&gt;sgl you can not get virtual address by sg_virt. So, sg_virt(sg_elem) may
return NULL value. This will cause QEMU exit when virtqueue_map_sg is called
in QEMU because an invalid GPA is passed by virtqueue.

Two solutions are discussed here:
http://lkml.indiana.edu/hypermail/linux/kernel/1207.3/00675.html

Finally, value assignment approach was adopted because:

Value assignment creates a well-formed scatterlist, because the termination
marker in source sg_list has been set in blk_rq_map_sg(). The last entry of the
source sg_list is just copied to the the last entry in destination list.  Note
that, for now, virtio_ring does not care about the form of the scatterlist and
simply processes the first out_num + in_num consecutive elements of the sg[]
array.

I have tested the patch on my workstation. QEMU would not crash any more.

Cc: &lt;stable@vger.kernel.org&gt; # 3.4: 4fe74b1: [SCSI] virtio-scsi: SCSI driver
Signed-off-by: Wang Sen &lt;senwang@linux.vnet.ibm.com&gt;
Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Fix 'Device not ready' issue on mpt2sas</title>
<updated>2012-08-22T05:42:54Z</updated>
<author>
<name>James Bottomley</name>
<email>JBottomley@Parallels.com</email>
</author>
<published>2012-07-25T19:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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] scsi_lib: fix scsi_io_completion's SG_IO error propagation</title>
<updated>2012-08-22T05:42:31Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2012-05-31T19:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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>[SCSI] megaraid_sas: Move poll_aen_lock initializer</title>
<updated>2012-08-22T05:39:25Z</updated>
<author>
<name>Kashyap Desai</name>
<email>Kashyap.Desai@lsi.com</email>
</author>
<published>2012-07-18T01:20:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bd8d6dd43a77bfd2b8fef5b094b9d6095e169dee'/>
<id>urn:sha1:bd8d6dd43a77bfd2b8fef5b094b9d6095e169dee</id>
<content type='text'>
The following patch moves the poll_aen_lock initializer from
megasas_probe_one() to megasas_init().  This prevents a crash when a user
loads the driver and tries to issue a poll() system call on the ioctl
interface with no adapters present.

Signed-off-by: Kashyap Desai &lt;Kashyap.Desai@lsi.com&gt;
Signed-off-by: Adam Radford &lt;aradford@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] mpt2sas: Fix for Driver oops, when loading driver with max_queue_depth command line option to a very small value</title>
<updated>2012-08-22T05:38:49Z</updated>
<author>
<name>sreekanth.reddy@lsi.com</name>
<email>sreekanth.reddy@lsi.com</email>
</author>
<published>2012-07-17T10:27:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=338b131a3269881c7431234855c93c219b0979b6'/>
<id>urn:sha1:338b131a3269881c7431234855c93c219b0979b6</id>
<content type='text'>
If the specified max_queue_depth setting is less than the
expected number of internal commands, then driver will calculate
the queue depth size to a negitive number. This negitive number
is actually a very large number because variable is unsigned
16bit integer. So, the driver will ask for a very large amount of
memory for message frames and resulting into oops as memory
allocation routines will not able to handle such a large request.

So, in order to limit this kind of oops, The driver need to set
the max_queue_depth to a scsi mid layer's can_queue value. Then
the overall message frames required for IO is minimum of either
(max_queue_depth plus internal commands) or the IOC global
credits.

Signed-off-by: Sreekanth Reddy &lt;sreekanth.reddy@lsi.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-3.6/core' of git://git.kernel.dk/linux-block</title>
<updated>2012-08-01T16:02:41Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-08-01T16:02:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8cf1a3fce0b95050b63d451c9d561da0da2aa4d6'/>
<id>urn:sha1:8cf1a3fce0b95050b63d451c9d561da0da2aa4d6</id>
<content type='text'>
Pull core block IO bits from Jens Axboe:
 "The most complicated part if this is the request allocation rework by
  Tejun, which has been queued up for a long time and has been in
  for-next ditto as well.

  There are a few commits from yesterday and today, mostly trivial and
  obvious fixes.  So I'm pretty confident that it is sound.  It's also
  smaller than usual."

* 'for-3.6/core' of git://git.kernel.dk/linux-block:
  block: remove dead func declaration
  block: add partition resize function to blkpg ioctl
  block: uninitialized ioc-&gt;nr_tasks triggers WARN_ON
  block: do not artificially constrain max_sectors for stacking drivers
  blkcg: implement per-blkg request allocation
  block: prepare for multiple request_lists
  block: add q-&gt;nr_rqs[] and move q-&gt;rq.elvpriv to q-&gt;nr_rqs_elvpriv
  blkcg: inline bio_blkcg() and friends
  block: allocate io_context upfront
  block: refactor get_request[_wait]()
  block: drop custom queue draining used by scsi_transport_{iscsi|fc}
  mempool: add @gfp_mask to mempool_create_node()
  blkcg: make root blkcg allocation use %GFP_KERNEL
  blkcg: __blkg_lookup_create() doesn't need radix preload
</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>
<email>jeff@garzik.org</email>
</author>
<published>2012-07-25T19:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/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>
</feed>
