<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/scsi, branch v3.10.19</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>aacraid: missing capable() check in compat ioctl</title>
<updated>2013-11-13T03:05:33+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-10-29T19:11:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a33ed3974e7b75af36553589e7810da9d8b22382'/>
<id>a33ed3974e7b75af36553589e7810da9d8b22382</id>
<content type='text'>
commit f856567b930dfcdbc3323261bf77240ccdde01f5 upstream.

In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we
added a check on CAP_SYS_RAWIO to the ioctl.  The compat ioctls need the
check as well.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we
added a check on CAP_SYS_RAWIO to the ioctl.  The compat ioctls need the
check as well.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI: sd: call blk_pm_runtime_init before add_disk</title>
<updated>2013-11-13T03:05:31+00:00</updated>
<author>
<name>Aaron Lu</name>
<email>aaron.lu@intel.com</email>
</author>
<published>2013-10-10T05:22:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=da0d4136d107d926273c227fdeaf805159044f66'/>
<id>da0d4136d107d926273c227fdeaf805159044f66</id>
<content type='text'>
commit 10c580e4239df5c3344ca00322eca86ab2de880b upstream.

Sujit has found a race condition that would make q-&gt;nr_pending
unbalanced, it occurs as Sujit explained:

"
sd_probe_async() -&gt;
	add_disk() -&gt;
		disk_add_event() -&gt;
			schedule(disk_events_workfn)
	sd_revalidate_disk()
	blk_pm_runtime_init()
return;

Let's say the disk_events_workfn() calls sd_check_events() which tries
to send test_unit_ready() and because of sd_revalidate_disk() trying to
send another commands the test_unit_ready() might be re-queued as the
tagged command queuing is disabled.

So the race condition is -

Thread 1 			  |		Thread 2
sd_revalidate_disk()		  |	sd_check_events()
...nr_pending = 0 as q-&gt;dev = NULL|	scsi_queue_insert()
blk_runtime_pm_init()		  | 	blk_pm_requeue_request() -&gt;
				  |	nr_pending = -1 since
				  |	q-&gt;dev != NULL
"

The problem is, the test_unit_ready request doesn't get counted the
first time it is queued, so the later decrement of q-&gt;nr_pending in
blk_pm_requeue_request makes it unbalanced.

Fix this by calling blk_pm_runtime_init before add_disk so that all
requests initiated there will all be counted.

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.com&gt;
Reported-and-tested-by: Sujit Reddy Thumma &lt;sthumma@codeaurora.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

Sujit has found a race condition that would make q-&gt;nr_pending
unbalanced, it occurs as Sujit explained:

"
sd_probe_async() -&gt;
	add_disk() -&gt;
		disk_add_event() -&gt;
			schedule(disk_events_workfn)
	sd_revalidate_disk()
	blk_pm_runtime_init()
return;

Let's say the disk_events_workfn() calls sd_check_events() which tries
to send test_unit_ready() and because of sd_revalidate_disk() trying to
send another commands the test_unit_ready() might be re-queued as the
tagged command queuing is disabled.

So the race condition is -

Thread 1 			  |		Thread 2
sd_revalidate_disk()		  |	sd_check_events()
...nr_pending = 0 as q-&gt;dev = NULL|	scsi_queue_insert()
blk_runtime_pm_init()		  | 	blk_pm_requeue_request() -&gt;
				  |	nr_pending = -1 since
				  |	q-&gt;dev != NULL
"

The problem is, the test_unit_ready request doesn't get counted the
first time it is queued, so the later decrement of q-&gt;nr_pending in
blk_pm_requeue_request makes it unbalanced.

Fix this by calling blk_pm_runtime_init before add_disk so that all
requests initiated there will all be counted.

Signed-off-by: Aaron Lu &lt;aaron.lu@intel.com&gt;
Reported-and-tested-by: Sujit Reddy Thumma &lt;sthumma@codeaurora.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>esp_scsi: Fix tag state corruption when autosensing.</title>
<updated>2013-10-13T23:08:32+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2013-08-02T01:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74e8a9efa9f08394444ef6ea7a4349c35dd3e811'/>
<id>74e8a9efa9f08394444ef6ea7a4349c35dd3e811</id>
<content type='text'>
[ Upstream commit 21af8107f27878813d0364733c0b08813c2c192a ]

Meelis Roos reports a crash in esp_free_lun_tag() in the presense
of a disk which has died.

The issue is that when we issue an autosense command, we do so by
hijacking the original command that caused the check-condition.

When we do so we clear out the ent-&gt;tag[] array when we issue it via
find_and_prep_issuable_command().  This is so that the autosense
command is forced to be issued non-tagged.

That is problematic, because it is the value of ent-&gt;tag[] which
determines whether we issued the original scsi command as tagged
vs. non-tagged (see esp_alloc_lun_tag()).

And that, in turn, is what trips up the sanity checks in
esp_free_lun_tag().  That function needs the original -&gt;tag[] values
in order to free up the tag slot properly.

Fix this by remembering the original command's tag values, and
having esp_alloc_lun_tag() and esp_free_lun_tag() use them.

Reported-by: Meelis Roos &lt;mroos@linux.ee&gt;
Tested-by: Meelis Roos &lt;mroos@linux.ee&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 21af8107f27878813d0364733c0b08813c2c192a ]

Meelis Roos reports a crash in esp_free_lun_tag() in the presense
of a disk which has died.

The issue is that when we issue an autosense command, we do so by
hijacking the original command that caused the check-condition.

When we do so we clear out the ent-&gt;tag[] array when we issue it via
find_and_prep_issuable_command().  This is so that the autosense
command is forced to be issued non-tagged.

That is problematic, because it is the value of ent-&gt;tag[] which
determines whether we issued the original scsi command as tagged
vs. non-tagged (see esp_alloc_lun_tag()).

And that, in turn, is what trips up the sanity checks in
esp_free_lun_tag().  That function needs the original -&gt;tag[] values
in order to free up the tag slot properly.

Fix this by remembering the original command's tag values, and
having esp_alloc_lun_tag() and esp_free_lun_tag() use them.

Reported-by: Meelis Roos &lt;mroos@linux.ee&gt;
Tested-by: Meelis Roos &lt;mroos@linux.ee&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI: sd: Fix potential out-of-bounds access</title>
<updated>2013-09-27T00:18:01+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2013-09-06T15:49:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=13915e203f991e77eb5a52bcd4c61e5f155e3bbc'/>
<id>13915e203f991e77eb5a52bcd4c61e5f155e3bbc</id>
<content type='text'>
commit 984f1733fcee3fbc78d47e26c5096921c5d9946a upstream.

This patch fixes an out-of-bounds error in sd_read_cache_type(), found
by Google's AddressSanitizer tool.  When the loop ends, we know that
"offset" lies beyond the end of the data in the buffer, so no Caching
mode page was found.  In theory it may be present, but the buffer size
is limited to 512 bytes.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

This patch fixes an out-of-bounds error in sd_read_cache_type(), found
by Google's AddressSanitizer tool.  When the loop ends, we know that
"offset" lies beyond the end of the data in the buffer, so no Caching
mode page was found.  In theory it may be present, but the buffer size
is limited to 512 bytes.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI: Allow MPT Fusion SAS 3.0 driver to be built into the kernel</title>
<updated>2013-09-27T00:18:01+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-09-03T22:00:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e62b0f0196a7ea462d04e320cdd727aed51dd60f'/>
<id>e62b0f0196a7ea462d04e320cdd727aed51dd60f</id>
<content type='text'>
commit 9807b4d94911be4e4efb9a08481b24292a9edf8a upstream.

Right now the Makefile for the mpt3sas driver does not even allow the
driver to be built into the kernel.  So fix that up, as there doesn't
seem to be any obvious reason why this shouldn't be done.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Sreekanth Reddy &lt;Sreekanth.Reddy@lsi.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;

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

Right now the Makefile for the mpt3sas driver does not even allow the
driver to be built into the kernel.  So fix that up, as there doesn't
seem to be any obvious reason why this shouldn't be done.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Sreekanth Reddy &lt;Sreekanth.Reddy@lsi.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI: pm80xx: fix Adaptec 71605H hang</title>
<updated>2013-09-08T05:09:58+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2013-07-26T16:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ff2b0a7db98e7ffdfafb667e60c25f07e9959737'/>
<id>ff2b0a7db98e7ffdfafb667e60c25f07e9959737</id>
<content type='text'>
commit 9504a923924d663e1953f872f0a828e6454a6cfc upstream.

The IO command size is 128 bytes for these new controllers as opposed to 64
for the old 8001 controller.

The Adaptec out-of-tree driver did this correctly. After comparing the two
this turned out to be the crucial difference.

So don't hardcode the IO command size, instead use pm8001_ha-&gt;iomb_size as
that is the correct value for both old and new controllers.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Anand Kumar Santhanam &lt;AnandKumar.Santhanam@pmcs.com&gt;
Acked-by: Jack Wang &lt;xjtuwjp@gmail.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

The IO command size is 128 bytes for these new controllers as opposed to 64
for the old 8001 controller.

The Adaptec out-of-tree driver did this correctly. After comparing the two
this turned out to be the crucial difference.

So don't hardcode the IO command size, instead use pm8001_ha-&gt;iomb_size as
that is the correct value for both old and new controllers.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Acked-by: Anand Kumar Santhanam &lt;AnandKumar.Santhanam@pmcs.com&gt;
Acked-by: Jack Wang &lt;xjtuwjp@gmail.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI: lpfc: Don't force CONFIG_GENERIC_CSUM on</title>
<updated>2013-08-29T16:47:39+00:00</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2013-08-08T07:47:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a271397a97869112f0b77ef7e162f64cf3c55113'/>
<id>a271397a97869112f0b77ef7e162f64cf3c55113</id>
<content type='text'>
commit f5944daa0a72316077435c18a6571e73ed338332 upstream.

We want ppc64 to be able to select between optimised assembly
checksum routines in big endian and the generic lib/checksum.c
routines in little endian.

The lpfc driver is forcing CONFIG_GENERIC_CSUM on which means
we are unable to make the decision to enable it in the arch
Kconfig. If the option exists it is always forced on.

This got introduced in 3.10 via commit 6a7252fdb0c3 ([SCSI] lpfc:
fix up Kconfig dependencies). I spoke to Randy about it and
the original issue was with CRC_T10DIF not being defined.

As such, remove the select of CONFIG_GENERIC_CSUM.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

We want ppc64 to be able to select between optimised assembly
checksum routines in big endian and the generic lib/checksum.c
routines in little endian.

The lpfc driver is forcing CONFIG_GENERIC_CSUM on which means
we are unable to make the decision to enable it in the arch
Kconfig. If the option exists it is always forced on.

This got introduced in 3.10 via commit 6a7252fdb0c3 ([SCSI] lpfc:
fix up Kconfig dependencies). I spoke to Randy about it and
the original issue was with CRC_T10DIF not being defined.

As such, remove the select of CONFIG_GENERIC_CSUM.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI: nsp32: use mdelay instead of large udelay constants</title>
<updated>2013-08-15T05:59:10+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2013-03-14T14:21:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c7cf2a7505ba6859fa2f5a2055dee3d98b5b3e41'/>
<id>c7cf2a7505ba6859fa2f5a2055dee3d98b5b3e41</id>
<content type='text'>
commit b497ceb964a80ebada3b9b3cea4261409039e25a upstream.

ARM cannot handle udelay for more than 2 miliseconds, so we
should use mdelay instead for those.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: GOTO Masanori &lt;gotom@debian.or.jp&gt;
Cc: YOKOTA Hiroshi &lt;yokota@netlab.is.tsukuba.ac.jp&gt;
Cc: "James E.J. Bottomley" &lt;JBottomley@parallels.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

ARM cannot handle udelay for more than 2 miliseconds, so we
should use mdelay instead for those.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: GOTO Masanori &lt;gotom@debian.or.jp&gt;
Cc: YOKOTA Hiroshi &lt;yokota@netlab.is.tsukuba.ac.jp&gt;
Cc: "James E.J. Bottomley" &lt;JBottomley@parallels.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>virtio-scsi: Fix virtqueue affinity setup</title>
<updated>2013-08-15T05:59:04+00:00</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-08-01T01:37:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=96e9cd3d0609e76839ae25efe1ea8b75ca81e588'/>
<id>96e9cd3d0609e76839ae25efe1ea8b75ca81e588</id>
<content type='text'>
commit aa52aeea2725839bdd3dcce394486e9a043065e0 upstream.

vscsi-&gt;num_queues counts the number of request virtqueue which does not
include the control and event virtqueue. It is wrong to subtract
VIRTIO_SCSI_VQ_BASE from vscsi-&gt;num_queues.

This patch fixes the following panic.

(qemu) device_del scsi0

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
 IP: [&lt;ffffffff8179b29f&gt;] __virtscsi_set_affinity+0x6f/0x120
 PGD 0
 Oops: 0000 [#1] SMP
 Modules linked in:
 CPU: 0 PID: 659 Comm: kworker/0:1 Not tainted 3.11.0-rc2+ #1172
 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
 Workqueue: kacpi_hotplug _handle_hotplug_event_func
 task: ffff88007bee1cc0 ti: ffff88007bfe4000 task.ti: ffff88007bfe4000
 RIP: 0010:[&lt;ffffffff8179b29f&gt;]  [&lt;ffffffff8179b29f&gt;] __virtscsi_set_affinity+0x6f/0x120
 RSP: 0018:ffff88007bfe5a38  EFLAGS: 00010202
 RAX: 0000000000000010 RBX: ffff880077fd0d28 RCX: 0000000000000050
 RDX: 0000000000000000 RSI: 0000000000000246 RDI: 0000000000000000
 RBP: ffff88007bfe5a58 R08: ffff880077f6ff00 R09: 0000000000000001
 R10: ffffffff8143e673 R11: 0000000000000001 R12: 0000000000000001
 R13: ffff880077fd0800 R14: 0000000000000000 R15: ffff88007bf489b0
 FS:  0000000000000000(0000) GS:ffff88007ea00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 CR2: 0000000000000020 CR3: 0000000079f8b000 CR4: 00000000000006f0
 Stack:
  ffff880077fd0d28 0000000000000000 ffff880077fd0800 0000000000000008
  ffff88007bfe5a78 ffffffff8179b37d ffff88007bccc800 ffff88007bccc800
  ffff88007bfe5a98 ffffffff8179b3b6 ffff88007bccc800 ffff880077fd0d28
 Call Trace:
  [&lt;ffffffff8179b37d&gt;] virtscsi_set_affinity+0x2d/0x40
  [&lt;ffffffff8179b3b6&gt;] virtscsi_remove_vqs+0x26/0x50
  [&lt;ffffffff8179c7d2&gt;] virtscsi_remove+0x82/0xa0
  [&lt;ffffffff814cb6b2&gt;] virtio_dev_remove+0x22/0x70
  [&lt;ffffffff8167ca49&gt;] __device_release_driver+0x69/0xd0
  [&lt;ffffffff8167cb9d&gt;] device_release_driver+0x2d/0x40
  [&lt;ffffffff8167bb96&gt;] bus_remove_device+0x116/0x150
  [&lt;ffffffff81679936&gt;] device_del+0x126/0x1e0
  [&lt;ffffffff81679a06&gt;] device_unregister+0x16/0x30
  [&lt;ffffffff814cb889&gt;] unregister_virtio_device+0x19/0x30
  [&lt;ffffffff814cdad6&gt;] virtio_pci_remove+0x36/0x80
  [&lt;ffffffff81464ae7&gt;] pci_device_remove+0x37/0x70
  [&lt;ffffffff8167ca49&gt;] __device_release_driver+0x69/0xd0
  [&lt;ffffffff8167cb9d&gt;] device_release_driver+0x2d/0x40
  [&lt;ffffffff8167bb96&gt;] bus_remove_device+0x116/0x150
  [&lt;ffffffff81679936&gt;] device_del+0x126/0x1e0
  [&lt;ffffffff8145edfc&gt;] pci_stop_bus_device+0x9c/0xb0
  [&lt;ffffffff8145f036&gt;] pci_stop_and_remove_bus_device+0x16/0x30
  [&lt;ffffffff81474a9e&gt;] acpiphp_disable_slot+0x8e/0x150
  [&lt;ffffffff81474f6a&gt;] hotplug_event_func+0xba/0x1a0
  [&lt;ffffffff814906c8&gt;] ? acpi_os_release_object+0xe/0x12
  [&lt;ffffffff81475911&gt;] _handle_hotplug_event_func+0x31/0x70
  [&lt;ffffffff810b5333&gt;] process_one_work+0x183/0x500
  [&lt;ffffffff810b66e2&gt;] worker_thread+0x122/0x400
  [&lt;ffffffff810b65c0&gt;] ? manage_workers+0x2d0/0x2d0
  [&lt;ffffffff810bc5de&gt;] kthread+0xce/0xe0
  [&lt;ffffffff810bc510&gt;] ? kthread_freezable_should_stop+0x70/0x70
  [&lt;ffffffff81ca045c&gt;] ret_from_fork+0x7c/0xb0
  [&lt;ffffffff810bc510&gt;] ? kthread_freezable_should_stop+0x70/0x70
 Code: 01 00 00 00 74 59 45 31 e4 83 bb c8 01 00 00 02 74 46 66 2e 0f 1f 84 00 00 00 00 00 49 63 c4 48 c1 e0 04 48 8b bc 0
3 10 02 00 00 &lt;48&gt; 8b 47 20 48 8b 80 d0 01 00 00 48 8b 40 50 48 85 c0 74 07 be
 RIP  [&lt;ffffffff8179b29f&gt;] __virtscsi_set_affinity+0x6f/0x120
  RSP &lt;ffff88007bfe5a38&gt;
 CR2: 0000000000000020
 ---[ end trace 99679331a3775f48 ]---

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Reviewed-by: Wanlong Gao &lt;gaowanlong@cn.fujitsu.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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

vscsi-&gt;num_queues counts the number of request virtqueue which does not
include the control and event virtqueue. It is wrong to subtract
VIRTIO_SCSI_VQ_BASE from vscsi-&gt;num_queues.

This patch fixes the following panic.

(qemu) device_del scsi0

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
 IP: [&lt;ffffffff8179b29f&gt;] __virtscsi_set_affinity+0x6f/0x120
 PGD 0
 Oops: 0000 [#1] SMP
 Modules linked in:
 CPU: 0 PID: 659 Comm: kworker/0:1 Not tainted 3.11.0-rc2+ #1172
 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
 Workqueue: kacpi_hotplug _handle_hotplug_event_func
 task: ffff88007bee1cc0 ti: ffff88007bfe4000 task.ti: ffff88007bfe4000
 RIP: 0010:[&lt;ffffffff8179b29f&gt;]  [&lt;ffffffff8179b29f&gt;] __virtscsi_set_affinity+0x6f/0x120
 RSP: 0018:ffff88007bfe5a38  EFLAGS: 00010202
 RAX: 0000000000000010 RBX: ffff880077fd0d28 RCX: 0000000000000050
 RDX: 0000000000000000 RSI: 0000000000000246 RDI: 0000000000000000
 RBP: ffff88007bfe5a58 R08: ffff880077f6ff00 R09: 0000000000000001
 R10: ffffffff8143e673 R11: 0000000000000001 R12: 0000000000000001
 R13: ffff880077fd0800 R14: 0000000000000000 R15: ffff88007bf489b0
 FS:  0000000000000000(0000) GS:ffff88007ea00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 CR2: 0000000000000020 CR3: 0000000079f8b000 CR4: 00000000000006f0
 Stack:
  ffff880077fd0d28 0000000000000000 ffff880077fd0800 0000000000000008
  ffff88007bfe5a78 ffffffff8179b37d ffff88007bccc800 ffff88007bccc800
  ffff88007bfe5a98 ffffffff8179b3b6 ffff88007bccc800 ffff880077fd0d28
 Call Trace:
  [&lt;ffffffff8179b37d&gt;] virtscsi_set_affinity+0x2d/0x40
  [&lt;ffffffff8179b3b6&gt;] virtscsi_remove_vqs+0x26/0x50
  [&lt;ffffffff8179c7d2&gt;] virtscsi_remove+0x82/0xa0
  [&lt;ffffffff814cb6b2&gt;] virtio_dev_remove+0x22/0x70
  [&lt;ffffffff8167ca49&gt;] __device_release_driver+0x69/0xd0
  [&lt;ffffffff8167cb9d&gt;] device_release_driver+0x2d/0x40
  [&lt;ffffffff8167bb96&gt;] bus_remove_device+0x116/0x150
  [&lt;ffffffff81679936&gt;] device_del+0x126/0x1e0
  [&lt;ffffffff81679a06&gt;] device_unregister+0x16/0x30
  [&lt;ffffffff814cb889&gt;] unregister_virtio_device+0x19/0x30
  [&lt;ffffffff814cdad6&gt;] virtio_pci_remove+0x36/0x80
  [&lt;ffffffff81464ae7&gt;] pci_device_remove+0x37/0x70
  [&lt;ffffffff8167ca49&gt;] __device_release_driver+0x69/0xd0
  [&lt;ffffffff8167cb9d&gt;] device_release_driver+0x2d/0x40
  [&lt;ffffffff8167bb96&gt;] bus_remove_device+0x116/0x150
  [&lt;ffffffff81679936&gt;] device_del+0x126/0x1e0
  [&lt;ffffffff8145edfc&gt;] pci_stop_bus_device+0x9c/0xb0
  [&lt;ffffffff8145f036&gt;] pci_stop_and_remove_bus_device+0x16/0x30
  [&lt;ffffffff81474a9e&gt;] acpiphp_disable_slot+0x8e/0x150
  [&lt;ffffffff81474f6a&gt;] hotplug_event_func+0xba/0x1a0
  [&lt;ffffffff814906c8&gt;] ? acpi_os_release_object+0xe/0x12
  [&lt;ffffffff81475911&gt;] _handle_hotplug_event_func+0x31/0x70
  [&lt;ffffffff810b5333&gt;] process_one_work+0x183/0x500
  [&lt;ffffffff810b66e2&gt;] worker_thread+0x122/0x400
  [&lt;ffffffff810b65c0&gt;] ? manage_workers+0x2d0/0x2d0
  [&lt;ffffffff810bc5de&gt;] kthread+0xce/0xe0
  [&lt;ffffffff810bc510&gt;] ? kthread_freezable_should_stop+0x70/0x70
  [&lt;ffffffff81ca045c&gt;] ret_from_fork+0x7c/0xb0
  [&lt;ffffffff810bc510&gt;] ? kthread_freezable_should_stop+0x70/0x70
 Code: 01 00 00 00 74 59 45 31 e4 83 bb c8 01 00 00 02 74 46 66 2e 0f 1f 84 00 00 00 00 00 49 63 c4 48 c1 e0 04 48 8b bc 0
3 10 02 00 00 &lt;48&gt; 8b 47 20 48 8b 80 d0 01 00 00 48 8b 40 50 48 85 c0 74 07 be
 RIP  [&lt;ffffffff8179b29f&gt;] __virtscsi_set_affinity+0x6f/0x120
  RSP &lt;ffff88007bfe5a38&gt;
 CR2: 0000000000000020
 ---[ end trace 99679331a3775f48 ]---

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Reviewed-by: Wanlong Gao &lt;gaowanlong@cn.fujitsu.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI: megaraid_sas: megaraid_sas driver init fails in kdump kernel</title>
<updated>2013-08-15T05:59:04+00:00</updated>
<author>
<name>Sumit.Saxena@lsi.com</name>
<email>Sumit.Saxena@lsi.com</email>
</author>
<published>2013-07-15T20:56:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e842dbeb5777ce9494ed838a4ba0c9af9fa7bd9e'/>
<id>e842dbeb5777ce9494ed838a4ba0c9af9fa7bd9e</id>
<content type='text'>
commit 6431f5d7c6025f8b007af06ea090de308f7e6881 upstream.

Problem: When Hardware IOMMU is on, megaraid_sas driver initialization fails
in kdump kernel with LSI MegaRAID controller(device id-0x73).

Actually this issue needs fix in firmware, but for firmware running in field,
this driver fix is proposed to resolve the issue.  At firmware initialization
time, if firmware does not come to ready state, driver will reset the adapter
and retry for firmware transition to ready state unconditionally(not only
executed for kdump kernel).

Signed-off-by: Sumit Saxena &lt;sumit.saxena@lsi.com&gt;
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@linuxfoundation.org&gt;

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

Problem: When Hardware IOMMU is on, megaraid_sas driver initialization fails
in kdump kernel with LSI MegaRAID controller(device id-0x73).

Actually this issue needs fix in firmware, but for firmware running in field,
this driver fix is proposed to resolve the issue.  At firmware initialization
time, if firmware does not come to ready state, driver will reset the adapter
and retry for firmware transition to ready state unconditionally(not only
executed for kdump kernel).

Signed-off-by: Sumit Saxena &lt;sumit.saxena@lsi.com&gt;
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@linuxfoundation.org&gt;

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