<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/scsi, branch linux-2.6.38.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>Fix Ultrastor asm snippet</title>
<updated>2011-06-03T01:34:04+00:00</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2011-05-18T15:06:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=50d170e2c3707fbe3ca31f42e7c8d69a4a41e29c'/>
<id>50d170e2c3707fbe3ca31f42e7c8d69a4a41e29c</id>
<content type='text'>
commit fad4dab5e44e10acf6b0235e469cb8e773b58e31 upstream.

Commit 1292500b replaced

"=m" (*field) : "1" (*field)

with

"=m" (*field) :

with comment "The following patch fixes it by using the '+' operator on
the (*field) operand, marking it as read-write to gcc."
'+' was actually forgotten.  This really puts it.

Signed-off-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit fad4dab5e44e10acf6b0235e469cb8e773b58e31 upstream.

Commit 1292500b replaced

"=m" (*field) : "1" (*field)

with

"=m" (*field) :

with comment "The following patch fixes it by using the '+' operator on
the (*field) operand, marking it as read-write to gcc."
'+' was actually forgotten.  This really puts it.

Signed-off-by: Samuel Thibault &lt;samuel.thibault@ens-lyon.org&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>bnx2i: Updated the connection shutdown/cleanup timeout</title>
<updated>2011-06-03T01:34:03+00:00</updated>
<author>
<name>Eddie Wai</name>
<email>eddie.wai@broadcom.com</email>
</author>
<published>2011-05-16T18:13:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=75faeb1a62cf83c7661c4fbfb5c56f44d1029091'/>
<id>75faeb1a62cf83c7661c4fbfb5c56f44d1029091</id>
<content type='text'>
commit d5307a078bb0288945c900c6f4a2fd77ba6d0817 upstream.

Modified the 10s wait time for inflight offload connections to
advance to the next state to 2s based on test result.
Modified the 20s shutdown timeout to 30s based on test result.

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d5307a078bb0288945c900c6f4a2fd77ba6d0817 upstream.

Modified the 10s wait time for inflight offload connections to
advance to the next state to 2s based on test result.
Modified the 20s shutdown timeout to 30s based on test result.

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>bnx2i: Fixed packet error created when the sq_size is set to 16</title>
<updated>2011-06-03T01:34:03+00:00</updated>
<author>
<name>Eddie Wai</name>
<email>eddie.wai@broadcom.com</email>
</author>
<published>2011-05-16T18:13:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=88c8999a00d5b407dcd7df8734c345c64564275c'/>
<id>88c8999a00d5b407dcd7df8734c345c64564275c</id>
<content type='text'>
commit 7287c63e986fe1a51a89f4bb1327320274a7a741 upstream.

The number of chip's internal command cell, which is use to generate
SCSI cmd packets to the target, was not initialized correctly by
the driver when the sq_size is changed from the default 128.
This, in turn, will create a problem where the chip's transmit pipe
will erroneously reuse an old command cell that is no longer valid.
The fix is to correctly initialize the chip's command cell upon setup.

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 7287c63e986fe1a51a89f4bb1327320274a7a741 upstream.

The number of chip's internal command cell, which is use to generate
SCSI cmd packets to the target, was not initialized correctly by
the driver when the sq_size is changed from the default 128.
This, in turn, will create a problem where the chip's transmit pipe
will erroneously reuse an old command cell that is no longer valid.
The fix is to correctly initialize the chip's command cell upon setup.

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mpt2sas: move even handling of MPT2SAS_TURN_ON_FAULT_LED into process context</title>
<updated>2011-06-03T01:34:02+00:00</updated>
<author>
<name>Kashyap, Desai</name>
<email>kashyap.desai@lsi.com</email>
</author>
<published>2011-05-04T11:05:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=04a7e30aa079cdc2249dbc091060137bb496c4e6'/>
<id>04a7e30aa079cdc2249dbc091060137bb496c4e6</id>
<content type='text'>
commit 3ace8e052be5293ebb3e00f819effccc64108a38 upstream.

Driver was a sending a SEP request during interrupt context which
required to go to sleep.

The fix is to rearrange the code so a fake event
MPT2SAS_TURN_ON_FAULT_LED is fired from interrupt context, then later
during the kernel worker threads processing, the SEP request is issued
to firmware.

Signed-off-by: Kashyap Desai &lt;kashyap.desai@lsi.com&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3ace8e052be5293ebb3e00f819effccc64108a38 upstream.

Driver was a sending a SEP request during interrupt context which
required to go to sleep.

The fix is to rearrange the code so a fake event
MPT2SAS_TURN_ON_FAULT_LED is fired from interrupt context, then later
during the kernel worker threads processing, the SEP request is issued
to firmware.

Signed-off-by: Kashyap Desai &lt;kashyap.desai@lsi.com&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>block: don't block events on excl write for non-optical devices</title>
<updated>2011-06-03T01:33:43+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-04-21T18:54:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c63356c3ed12f1242ec7fb4b14a6a28b0e0c72a2'/>
<id>c63356c3ed12f1242ec7fb4b14a6a28b0e0c72a2</id>
<content type='text'>
commit d4dc210f69bcb0b4bef5a83b1c323817be89bad1 upstream.

Disk event code automatically blocks events on excl write.  This is
primarily to avoid issuing polling commands while burning is in
progress.  This behavior doesn't fit other types of devices with
removeable media where polling commands don't have adverse side
effects and door locking usually doesn't exist.

This patch introduces new genhd flag which controls the auto-blocking
behavior and uses it to enable auto-blocking only on optical devices.

Note for stable: 2.6.38 and later only

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d4dc210f69bcb0b4bef5a83b1c323817be89bad1 upstream.

Disk event code automatically blocks events on excl write.  This is
primarily to avoid issuing polling commands while burning is in
progress.  This behavior doesn't fit other types of devices with
removeable media where polling commands don't have adverse side
effects and door locking usually doesn't exist.

This patch introduces new genhd flag which controls the auto-blocking
behavior and uses it to enable auto-blocking only on optical devices.

Note for stable: 2.6.38 and later only

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>qla2xxx: Fix vport delete hang when logins are outstanding.</title>
<updated>2011-06-03T01:33:36+00:00</updated>
<author>
<name>Arun Easi</name>
<email>arun.easi@qlogic.com</email>
</author>
<published>2011-05-10T18:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8a72111ee11db1030a9291bf05d87ffc1dd9cff5'/>
<id>8a72111ee11db1030a9291bf05d87ffc1dd9cff5</id>
<content type='text'>
commit 9f40682e2857a3c2ddb80a87b185af3c6a708346 upstream.

Timer is required to flush out entries that may be present in work queues.

Signed-off-by: Arun Easi &lt;arun.easi@qlogic.com&gt;
Signed-off-by: Madhuranath Iyengar &lt;Madhu.Iyengar@qlogic.com&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9f40682e2857a3c2ddb80a87b185af3c6a708346 upstream.

Timer is required to flush out entries that may be present in work queues.

Signed-off-by: Arun Easi &lt;arun.easi@qlogic.com&gt;
Signed-off-by: Madhuranath Iyengar &lt;Madhu.Iyengar@qlogic.com&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>qla2xxx: Fix virtual port failing to login after chip reset.</title>
<updated>2011-06-03T01:33:36+00:00</updated>
<author>
<name>Saurav Kashyap</name>
<email>saurav.kashyap@qlogic.com</email>
</author>
<published>2011-05-10T18:18:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2ce89b71185b877d6ffd8d39aa0e088405719408'/>
<id>2ce89b71185b877d6ffd8d39aa0e088405719408</id>
<content type='text'>
commit cefcaba67ab97fb756b3a6af5139c94d861b660d upstream.

This patch ensures qla82xx_watchdog is not being run for the vport. It also
makes sure that beacon ON is not done for the vport, as it will lead to the
waking up of the dpc thread again and again.

Signed-off-by: Saurav Kashyap &lt;saurav.kashyap@qlogic.com&gt;
Signed-off-by: Madhuranath Iyengar &lt;Madhu.Iyengar@qlogic.com&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit cefcaba67ab97fb756b3a6af5139c94d861b660d upstream.

This patch ensures qla82xx_watchdog is not being run for the vport. It also
makes sure that beacon ON is not done for the vport, as it will lead to the
waking up of the dpc thread again and again.

Signed-off-by: Saurav Kashyap &lt;saurav.kashyap@qlogic.com&gt;
Signed-off-by: Madhuranath Iyengar &lt;Madhu.Iyengar@qlogic.com&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>qla2xxx: Fix hang during driver unload when vport is active.</title>
<updated>2011-06-03T01:33:35+00:00</updated>
<author>
<name>Arun Easi</name>
<email>arun.easi@qlogic.com</email>
</author>
<published>2011-05-10T18:18:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=88d3fa3d42d6758cab35373536ec1fc9be94e597'/>
<id>88d3fa3d42d6758cab35373536ec1fc9be94e597</id>
<content type='text'>
commit 43ebf16d762b082663976b679b813e1b546548d1 upstream.

Bumping ref count during fc_vport_terminate() was the cause. vport
delete would wait for ref count to drop to zero and that would never
happen.

Signed-off-by: Arun Easi &lt;arun.easi@qlogic.com&gt;
Signed-off-by: Madhuranath Iyengar &lt;Madhu.Iyengar@qlogic.com&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 43ebf16d762b082663976b679b813e1b546548d1 upstream.

Bumping ref count during fc_vport_terminate() was the cause. vport
delete would wait for ref count to drop to zero and that would never
happen.

Signed-off-by: Arun Easi &lt;arun.easi@qlogic.com&gt;
Signed-off-by: Madhuranath Iyengar &lt;Madhu.Iyengar@qlogic.com&gt;
Signed-off-by: James Bottomley &lt;jbottomley@parallels.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[SCSI] Retrieve the Caching mode page"</title>
<updated>2011-05-21T22:13:34+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@suse.de</email>
</author>
<published>2011-03-23T14:58:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3ea80459be84832670d6888ca06b3aaffe32e6a4'/>
<id>3ea80459be84832670d6888ca06b3aaffe32e6a4</id>
<content type='text'>
commit 3dea642afd9187728d119fce5c82a7ed9faa9b6a upstream.

This reverts commit 24d720b726c1a85f1962831ac30ad4d2ef8276b1.

Previously we thought there was little possibility that devices would
crash with this, but some have been found.

Reported-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Luben Tuikov &lt;ltuikov@yahoo.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 3dea642afd9187728d119fce5c82a7ed9faa9b6a upstream.

This reverts commit 24d720b726c1a85f1962831ac30ad4d2ef8276b1.

Previously we thought there was little possibility that devices would
crash with this, but some have been found.

Reported-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Luben Tuikov &lt;ltuikov@yahoo.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>megaraid_sas: Sanity check user supplied length before passing it to dma_alloc_coherent()</title>
<updated>2011-05-21T22:13:33+00:00</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2011-01-19T09:01:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b106c56573f9656e3cf863781dd5c0895d0f120d'/>
<id>b106c56573f9656e3cf863781dd5c0895d0f120d</id>
<content type='text'>
commit 98cb7e4413d189cd2b54daf993a4667d9788c0bb upstream.

The ioc-&gt;sgl[i].iov_len value is supplied by the ioctl caller, and can be
zero in some cases.  Assume that's valid and continue without error.

Fixes (multiple individual reports of the same problem for quite a while):

http://marc.info/?l=linux-ide&amp;m=128941801715301
http://bugs.debian.org/604627
http://www.mail-archive.com/linux-poweredge@dell.com/msg02575.html

megasas: Failed to alloc kernel SGL buffer for IOCTL

and

[   69.162538] ------------[ cut here ]------------
[   69.162806] kernel BUG at /build/buildd/linux-2.6.32/lib/swiotlb.c:368!
[   69.163134] invalid opcode: 0000 [#1] SMP
[   69.163570] last sysfs file: /sys/devices/system/cpu/cpu3/cache/index2/shared_cpu_map
[   69.163975] CPU 0
[   69.164227] Modules linked in: fbcon tileblit font bitblit softcursor vga16fb vgastate ioatdma radeon ttm drm_kms_helper shpchp drm i2c_algo_bit lp parport floppy pata_jmicron megaraid_sas igb dca
[   69.167419] Pid: 1206, comm: smartctl Tainted: G        W  2.6.32-25-server #45-Ubuntu X8DTN
[   69.167843] RIP: 0010:[&lt;ffffffff812c4dc5&gt;]  [&lt;ffffffff812c4dc5&gt;] map_single+0x255/0x260
[   69.168370] RSP: 0018:ffff88081c0ebc58  EFLAGS: 00010246
[   69.168655] RAX: 000000000003bffc RBX: 00000000ffffffff RCX: 0000000000000002
[   69.169000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88001dffe000
[   69.169346] RBP: ffff88081c0ebcb8 R08: 0000000000000000 R09: ffff880000030840
[   69.169691] R10: 0000000000100000 R11: 0000000000000000 R12: 0000000000000000
[   69.170036] R13: 00000000ffffffff R14: 0000000000000001 R15: 0000000000200000
[   69.170382] FS:  00007fb8de189720(0000) GS:ffff88001de00000(0000) knlGS:0000000000000000
[   69.170794] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   69.171094] CR2: 00007fb8dd59237c CR3: 000000081a790000 CR4: 00000000000006f0
[   69.171439] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   69.171784] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   69.172130] Process smartctl (pid: 1206, threadinfo ffff88081c0ea000, task ffff88081a760000)
[   69.194513] Stack:
[   69.205788]  0000000000000034 00000002817e3390 0000000000000000 ffff88081c0ebe00
[   69.217739] &lt;0&gt; 0000000000000000 000000000003bffc 0000000000000000 0000000000000000
[   69.241250] &lt;0&gt; 0000000000000000 00000000ffffffff ffff88081c5b4080 ffff88081c0ebe00
[   69.277310] Call Trace:
[   69.289278]  [&lt;ffffffff812c52ac&gt;] swiotlb_alloc_coherent+0xec/0x130
[   69.301118]  [&lt;ffffffff81038b31&gt;] x86_swiotlb_alloc_coherent+0x61/0x70
[   69.313045]  [&lt;ffffffffa002d0ce&gt;] megasas_mgmt_fw_ioctl+0x1ae/0x690 [megaraid_sas]
[   69.336399]  [&lt;ffffffffa002d748&gt;] megasas_mgmt_ioctl_fw+0x198/0x240 [megaraid_sas]
[   69.359346]  [&lt;ffffffffa002f695&gt;] megasas_mgmt_ioctl+0x35/0x50 [megaraid_sas]
[   69.370902]  [&lt;ffffffff81153b12&gt;] vfs_ioctl+0x22/0xa0
[   69.382322]  [&lt;ffffffff8115da2a&gt;] ? alloc_fd+0x10a/0x150
[   69.393622]  [&lt;ffffffff81153cb1&gt;] do_vfs_ioctl+0x81/0x410
[   69.404696]  [&lt;ffffffff8155cc13&gt;] ? do_page_fault+0x153/0x3b0
[   69.415761]  [&lt;ffffffff811540c1&gt;] sys_ioctl+0x81/0xa0
[   69.426640]  [&lt;ffffffff810121b2&gt;] system_call_fastpath+0x16/0x1b
[   69.437491] Code: fe ff ff 48 8b 3d 74 38 76 00 41 bf 00 00 20 00 e8 51 f5 d7 ff 83 e0 ff 48 05 ff 07 00 00 48 c1 e8 0b 48 89 45 c8 e9 13 fe ff ff &lt;0f&gt; 0b eb fe 0f 1f 80 00 00 00 00 55 48 89 e5 48 83 ec 20 4c 89
[   69.478216] RIP  [&lt;ffffffff812c4dc5&gt;] map_single+0x255/0x260
[   69.489668]  RSP &lt;ffff88081c0ebc58&gt;
[   69.500975] ---[ end trace 6a2181b634e2abc7 ]---

Reported-by: Bokhan Artem &lt;aptem@ngs.ru&gt;
Reported by: Marc-Christian Petersen &lt;m.c.p@gmx.de&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Cc: Michael Benz &lt;Michael.Benz@lsi.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 98cb7e4413d189cd2b54daf993a4667d9788c0bb upstream.

The ioc-&gt;sgl[i].iov_len value is supplied by the ioctl caller, and can be
zero in some cases.  Assume that's valid and continue without error.

Fixes (multiple individual reports of the same problem for quite a while):

http://marc.info/?l=linux-ide&amp;m=128941801715301
http://bugs.debian.org/604627
http://www.mail-archive.com/linux-poweredge@dell.com/msg02575.html

megasas: Failed to alloc kernel SGL buffer for IOCTL

and

[   69.162538] ------------[ cut here ]------------
[   69.162806] kernel BUG at /build/buildd/linux-2.6.32/lib/swiotlb.c:368!
[   69.163134] invalid opcode: 0000 [#1] SMP
[   69.163570] last sysfs file: /sys/devices/system/cpu/cpu3/cache/index2/shared_cpu_map
[   69.163975] CPU 0
[   69.164227] Modules linked in: fbcon tileblit font bitblit softcursor vga16fb vgastate ioatdma radeon ttm drm_kms_helper shpchp drm i2c_algo_bit lp parport floppy pata_jmicron megaraid_sas igb dca
[   69.167419] Pid: 1206, comm: smartctl Tainted: G        W  2.6.32-25-server #45-Ubuntu X8DTN
[   69.167843] RIP: 0010:[&lt;ffffffff812c4dc5&gt;]  [&lt;ffffffff812c4dc5&gt;] map_single+0x255/0x260
[   69.168370] RSP: 0018:ffff88081c0ebc58  EFLAGS: 00010246
[   69.168655] RAX: 000000000003bffc RBX: 00000000ffffffff RCX: 0000000000000002
[   69.169000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88001dffe000
[   69.169346] RBP: ffff88081c0ebcb8 R08: 0000000000000000 R09: ffff880000030840
[   69.169691] R10: 0000000000100000 R11: 0000000000000000 R12: 0000000000000000
[   69.170036] R13: 00000000ffffffff R14: 0000000000000001 R15: 0000000000200000
[   69.170382] FS:  00007fb8de189720(0000) GS:ffff88001de00000(0000) knlGS:0000000000000000
[   69.170794] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   69.171094] CR2: 00007fb8dd59237c CR3: 000000081a790000 CR4: 00000000000006f0
[   69.171439] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   69.171784] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[   69.172130] Process smartctl (pid: 1206, threadinfo ffff88081c0ea000, task ffff88081a760000)
[   69.194513] Stack:
[   69.205788]  0000000000000034 00000002817e3390 0000000000000000 ffff88081c0ebe00
[   69.217739] &lt;0&gt; 0000000000000000 000000000003bffc 0000000000000000 0000000000000000
[   69.241250] &lt;0&gt; 0000000000000000 00000000ffffffff ffff88081c5b4080 ffff88081c0ebe00
[   69.277310] Call Trace:
[   69.289278]  [&lt;ffffffff812c52ac&gt;] swiotlb_alloc_coherent+0xec/0x130
[   69.301118]  [&lt;ffffffff81038b31&gt;] x86_swiotlb_alloc_coherent+0x61/0x70
[   69.313045]  [&lt;ffffffffa002d0ce&gt;] megasas_mgmt_fw_ioctl+0x1ae/0x690 [megaraid_sas]
[   69.336399]  [&lt;ffffffffa002d748&gt;] megasas_mgmt_ioctl_fw+0x198/0x240 [megaraid_sas]
[   69.359346]  [&lt;ffffffffa002f695&gt;] megasas_mgmt_ioctl+0x35/0x50 [megaraid_sas]
[   69.370902]  [&lt;ffffffff81153b12&gt;] vfs_ioctl+0x22/0xa0
[   69.382322]  [&lt;ffffffff8115da2a&gt;] ? alloc_fd+0x10a/0x150
[   69.393622]  [&lt;ffffffff81153cb1&gt;] do_vfs_ioctl+0x81/0x410
[   69.404696]  [&lt;ffffffff8155cc13&gt;] ? do_page_fault+0x153/0x3b0
[   69.415761]  [&lt;ffffffff811540c1&gt;] sys_ioctl+0x81/0xa0
[   69.426640]  [&lt;ffffffff810121b2&gt;] system_call_fastpath+0x16/0x1b
[   69.437491] Code: fe ff ff 48 8b 3d 74 38 76 00 41 bf 00 00 20 00 e8 51 f5 d7 ff 83 e0 ff 48 05 ff 07 00 00 48 c1 e8 0b 48 89 45 c8 e9 13 fe ff ff &lt;0f&gt; 0b eb fe 0f 1f 80 00 00 00 00 55 48 89 e5 48 83 ec 20 4c 89
[   69.478216] RIP  [&lt;ffffffff812c4dc5&gt;] map_single+0x255/0x260
[   69.489668]  RSP &lt;ffff88081c0ebc58&gt;
[   69.500975] ---[ end trace 6a2181b634e2abc7 ]---

Reported-by: Bokhan Artem &lt;aptem@ngs.ru&gt;
Reported by: Marc-Christian Petersen &lt;m.c.p@gmx.de&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Cc: Michael Benz &lt;Michael.Benz@lsi.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
