<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/scsi_lib.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-03-03T15:50:38Z</updated>
<entry>
<title>scsi: use dma_get_cache_alignment() as minimum DMA alignment</title>
<updated>2018-03-03T15:50:38Z</updated>
<author>
<name>Huacai Chen</name>
</author>
<published>2017-11-21T13:23:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8c8a1a737d61e2e9b152564591f62ea8e62a434'/>
<id>urn:sha1:d8c8a1a737d61e2e9b152564591f62ea8e62a434</id>
<content type='text'>
commit 90addc6b3c9cda0146fbd62a08e234c2b224a80c upstream.

In non-coherent DMA mode, kernel uses cache flushing operations to
maintain I/O coherency, so scsi's block queue should be aligned to the
value returned by dma_get_cache_alignment().  Otherwise, If a DMA buffer
and a kernel structure share a same cache line, and if the kernel
structure has dirty data, cache_invalidate (no writeback) will cause
data corruption.

Signed-off-by: Huacai Chen &lt;chenhc@lemote.com&gt;
[hch: rebased and updated the comment and changelog]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Defer processing of REQ_PREEMPT requests for blocked devices</title>
<updated>2015-05-09T22:16:35Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2015-03-04T09:31:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=13b9af38c8978369bb8da1ea5cc51f17e64a87c3'/>
<id>urn:sha1:13b9af38c8978369bb8da1ea5cc51f17e64a87c3</id>
<content type='text'>
commit bba0bdd7ad4713d82338bcd9b72d57e9335a664b upstream.

SCSI transport drivers and SCSI LLDs block a SCSI device if the
transport layer is not operational. This means that in this state
no requests should be processed, even if the REQ_PREEMPT flag has
been set. This patch avoids that a rescan shortly after a cable
pull sporadically triggers the following kernel oops:

BUG: unable to handle kernel paging request at ffffc9001a6bc084
IP: [&lt;ffffffffa04e08f2&gt;] mlx4_ib_post_send+0xd2/0xb30 [mlx4_ib]
Process rescan-scsi-bus (pid: 9241, threadinfo ffff88053484a000, task ffff880534aae100)
Call Trace:
 [&lt;ffffffffa0718135&gt;] srp_post_send+0x65/0x70 [ib_srp]
 [&lt;ffffffffa071b9df&gt;] srp_queuecommand+0x1cf/0x3e0 [ib_srp]
 [&lt;ffffffffa0001ff1&gt;] scsi_dispatch_cmd+0x101/0x280 [scsi_mod]
 [&lt;ffffffffa0009ad1&gt;] scsi_request_fn+0x411/0x4d0 [scsi_mod]
 [&lt;ffffffff81223b37&gt;] __blk_run_queue+0x27/0x30
 [&lt;ffffffff8122a8d2&gt;] blk_execute_rq_nowait+0x82/0x110
 [&lt;ffffffff8122a9c2&gt;] blk_execute_rq+0x62/0xf0
 [&lt;ffffffffa000b0e8&gt;] scsi_execute+0xe8/0x190 [scsi_mod]
 [&lt;ffffffffa000b2f3&gt;] scsi_execute_req+0xa3/0x130 [scsi_mod]
 [&lt;ffffffffa000c1aa&gt;] scsi_probe_lun+0x17a/0x450 [scsi_mod]
 [&lt;ffffffffa000ce86&gt;] scsi_probe_and_add_lun+0x156/0x480 [scsi_mod]
 [&lt;ffffffffa000dc2f&gt;] __scsi_scan_target+0xdf/0x1f0 [scsi_mod]
 [&lt;ffffffffa000dfa3&gt;] scsi_scan_host_selected+0x183/0x1c0 [scsi_mod]
 [&lt;ffffffffa000edfb&gt;] scsi_scan+0xdb/0xe0 [scsi_mod]
 [&lt;ffffffffa000ee13&gt;] store_scan+0x13/0x20 [scsi_mod]
 [&lt;ffffffff811c8d9b&gt;] sysfs_write_file+0xcb/0x160
 [&lt;ffffffff811589de&gt;] vfs_write+0xce/0x140
 [&lt;ffffffff81158b53&gt;] sys_write+0x53/0xa0
 [&lt;ffffffff81464592&gt;] system_call_fastpath+0x16/0x1b
 [&lt;00007f611c9d9300&gt;] 0x7f611c9d92ff

Reported-by: Max Gurtuvoy &lt;maxg@mellanox.com&gt;
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>scsi: handle flush errors properly</title>
<updated>2014-09-13T22:41:38Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2014-07-03T17:17:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85cf47369ef88ad59ba03a41c5519342a7a079fe'/>
<id>urn:sha1:85cf47369ef88ad59ba03a41c5519342a7a079fe</id>
<content type='text'>
commit 89fb4cd1f717a871ef79fa7debbe840e3225cd54 upstream.

Flush commands don't transfer data and thus need to be special cased
in the I/O completion handler so that we can propagate errors to
the block layer and filesystem.

Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Reported-by: Steven Haber &lt;steven@qumulo.com&gt;
Tested-by: Steven Haber &lt;steven@qumulo.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Stop accepting SCSI requests before removing a device</title>
<updated>2014-07-11T12:33:55Z</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=b5a10549d528827aa331c1d95a6170032718babe'/>
<id>urn:sha1:b5a10549d528827aa331c1d95a6170032718babe</id>
<content type='text'>
commit b485462aca7df4e32bcf7efb6f84a69e8b640243 upstream.

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;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Avoid dangling pointer in scsi_requeue_command()</title>
<updated>2012-08-02T13:37:55Z</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=09411e4280933eb335e1f723dc215a5583c3be8f'/>
<id>urn:sha1:09411e4280933eb335e1f723dc215a5583c3be8f</id>
<content type='text'>
commit 940f5d47e2f2e1fa00443921a0abf4822335b54d upstream.

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;
[jejb: enhance commend and add commit log for stable]
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Fix device removal NULL pointer dereference</title>
<updated>2012-08-02T13:37:54Z</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=9c63d964e3f093b858a6f06875a68bc4206f71ba'/>
<id>urn:sha1:9c63d964e3f093b858a6f06875a68bc4206f71ba</id>
<content type='text'>
commit 67bd94130015c507011af37858989b199c52e1de upstream.

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;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Fix dm-multipath starvation when scsi host is busy</title>
<updated>2012-06-10T13:41:34Z</updated>
<author>
<name>Jun'ichi Nomura</name>
</author>
<published>2012-05-22T09:57:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2302e9e4e1aba6a92d872a1361089689252d044b'/>
<id>urn:sha1:2302e9e4e1aba6a92d872a1361089689252d044b</id>
<content type='text'>
commit b7e94a1686c5daef4f649f7f4f839cc294f07710 upstream.

block congestion control doesn't have any concept of fairness across
multiple queues.  This means that if SCSI reports the host as busy in
the queue congestion control it can result in an unfair starvation
situation in dm-mp if there are multiple multipath devices on the same
host.  For example:
http://www.redhat.com/archives/dm-devel/2012-May/msg00123.html

The fix for this is to report only the sdev busy state (and ignore the
host busy state) in the block congestion control call back.
The host is still congested, but the SCSI subsystem will sort out the
congestion in a fair way because it knows the relation between the
queues and the host.

[jejb: fixed up trailing whitespace]
Reported-by: Bernd Schubert &lt;bernd.schubert@itwm.fraunhofer.de&gt;
Tested-by: Bernd Schubert &lt;bernd.schubert@itwm.fraunhofer.de&gt;
Signed-off-by: Jun'ichi Nomura &lt;j-nomura@ce.jp.nec.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>[SCSI] Silencing 'killing requests for dead queue'</title>
<updated>2011-11-09T18:07:07Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2011-11-09T07:39:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=745718132c3c7cac98a622b610e239dcd5217f71'/>
<id>urn:sha1:745718132c3c7cac98a622b610e239dcd5217f71</id>
<content type='text'>
When we tear down a device we try to flush all outstanding
commands in scsi_free_queue(). However the check in
scsi_request_fn() is imperfect as it only signals that
we _might start_ aborting commands, not that we've actually
aborted some.
So move the printk inside the scsi_kill_request function,
this will also give us a hint about which commands are aborted.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux</title>
<updated>2011-11-07T03:44:47Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2011-11-07T03:44:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=32aaeffbd4a7457bf2f7448b33b5946ff2a960eb'/>
<id>urn:sha1:32aaeffbd4a7457bf2f7448b33b5946ff2a960eb</id>
<content type='text'>
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include &lt;linux/module.h&gt;
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include &lt;linux/module.h&gt;
  net: sch_generic remove redundant use of &lt;linux/module.h&gt;
  net: inet_timewait_sock doesnt need &lt;linux/module.h&gt;
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
</content>
</entry>
<entry>
<title>scsi: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required</title>
<updated>2011-10-31T23:31:23Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2011-05-27T13:37:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09703660edf83b8b6d175440bf745f30580d85ab'/>
<id>urn:sha1:09703660edf83b8b6d175440bf745f30580d85ab</id>
<content type='text'>
For the basic SCSI infrastructure files that are exporting symbols
but not modules themselves, add in the basic export.h header file
to allow the exports.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
</feed>
