<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/scsi.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-07-20T08:07:37Z</updated>
<entry>
<title>[SCSI] async: make async_synchronize_full() flush all work regardless of domain</title>
<updated>2012-07-20T08:07:37Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2012-07-10T02:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4683487f90bfe3049686fc5c566bdc1ad03ace6'/>
<id>urn:sha1:a4683487f90bfe3049686fc5c566bdc1ad03ace6</id>
<content type='text'>
In response to an async related regression James noted:

  "My theory is that this is an init problem: The assumption in a lot of
   our code is that async_synchronize_full() waits for everything ... even
   the domain specific async schedules, which isn't true."

...so make this assumption true.

Each domain, including the default one, registers itself on a global domain
list when work is scheduled.  Once all entries complete it exits that
list.  Waiting for the list to be empty syncs all in-flight work across
all domains.

Domains can opt-out of global syncing if they are declared as exclusive
ASYNC_DOMAIN_EXCLUSIVE().  All stack-based domains have been declared
exclusive since the domain may go out of scope as soon as the last work
item completes.

Statically declared domains are mostly ok, but async_unregister_domain()
is there to close any theoretical races with pending
async_synchronize_full waiters at module removal time.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Reported-by: Meelis Roos &lt;mroos@linux.ee&gt;
Reported-by: Eldad Zack &lt;eldadzack@gmail.com&gt;
Tested-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] async: introduce 'async_domain' type</title>
<updated>2012-07-20T08:05:54Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2012-07-10T02:33:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2955b47d2c1983998a8c5915cb96884e67f7cb53'/>
<id>urn:sha1:2955b47d2c1983998a8c5915cb96884e67f7cb53</id>
<content type='text'>
This is in preparation for teaching async_synchronize_full() to sync all
pending async work, and not just on the async_running domain.  This
conversion is functionally equivalent, just embedding the existing list
in a new async_domain type.

The .registered attribute is used in a later patch to distinguish
between domains that want to be flushed by async_synchronize_full()
versus those that only expect async_synchronize_{full|cookie}_domain to
be used for flushing.

[jejb: add async.h to scsi_priv.h for struct async_domain]
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Acked-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Acked-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Tested-by: Eldad Zack &lt;eldad@fogrefinery.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Fix sd_probe_domain config problem</title>
<updated>2012-06-07T01:16:20Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2012-06-06T05:54:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea80dadec7a06889562b478cf0b87afbe62b7ac8'/>
<id>urn:sha1:ea80dadec7a06889562b478cf0b87afbe62b7ac8</id>
<content type='text'>
With CONFIG_BLK_DEV_SD = n and CONFIG_PM = n, you get this compile failure:

(.text+0x4f6c77): undefined reference to `scsi_sd_probe_domain'

This was introduced by

commit a7a20d103994fd760766e6c9d494daa569cbfe06
Author: Dan Williams &lt;dan.j.williams@intel.com&gt;
Date:   Thu Mar 22 17:05:11 2012 -0700

    [SCSI] sd: limit the scope of the async probe domain

And happens because scsi_sd_probe_domain is conditionally defined but
unconditionally used.  Fix this by making the symbol unconditionally defined.

Reported-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Tested-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] sd: limit the scope of the async probe domain</title>
<updated>2012-05-17T08:10:46Z</updated>
<author>
<name>Dan Williams</name>
</author>
<published>2012-03-23T00:05:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7a20d103994fd760766e6c9d494daa569cbfe06'/>
<id>urn:sha1:a7a20d103994fd760766e6c9d494daa569cbfe06</id>
<content type='text'>
sd injects and synchronizes probe work on the global kernel-wide domain.
This runs into conflict with PM that wants to perform resume actions in
async context:

[  494.237079] INFO: task kworker/u:3:554 blocked for more than 120 seconds.
[  494.294396] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  494.360809] kworker/u:3     D 0000000000000000     0   554      2 0x00000000
[  494.420739]  ffff88012e4d3af0 0000000000000046 ffff88013200c160 ffff88012e4d3fd8
[  494.484392]  ffff88012e4d3fd8 0000000000012500 ffff8801394ea0b0 ffff88013200c160
[  494.548038]  ffff88012e4d3ae0 00000000000001e3 ffffffff81a249e0 ffff8801321c5398
[  494.611685] Call Trace:
[  494.632649]  [&lt;ffffffff8149dd25&gt;] schedule+0x5a/0x5c
[  494.674687]  [&lt;ffffffff8104b968&gt;] async_synchronize_cookie_domain+0xb6/0x112
[  494.734177]  [&lt;ffffffff810461ff&gt;] ? __init_waitqueue_head+0x50/0x50
[  494.787134]  [&lt;ffffffff8131a224&gt;] ? scsi_remove_target+0x48/0x48
[  494.837900]  [&lt;ffffffff8104b9d9&gt;] async_synchronize_cookie+0x15/0x17
[  494.891567]  [&lt;ffffffff8104ba49&gt;] async_synchronize_full+0x54/0x70  &lt;-- here we wait for async contexts to complete
[  494.943783]  [&lt;ffffffff8104b9f5&gt;] ? async_synchronize_full_domain+0x1a/0x1a
[  495.002547]  [&lt;ffffffffa00114b1&gt;] sd_remove+0x2c/0xa2 [sd_mod]
[  495.051861]  [&lt;ffffffff812fe94f&gt;] __device_release_driver+0x86/0xcf
[  495.104807]  [&lt;ffffffff812fe9bd&gt;] device_release_driver+0x25/0x32  &lt;-- here we take device_lock()

[  853.511341] INFO: task kworker/u:4:549 blocked for more than 120 seconds.
[  853.568693] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  853.635119] kworker/u:4     D ffff88013097b5d0     0   549      2 0x00000000
[  853.695129]  ffff880132773c40 0000000000000046 ffff880130790000 ffff880132773fd8
[  853.758990]  ffff880132773fd8 0000000000012500 ffff88013288a0b0 ffff880130790000
[  853.822796]  0000000000000246 0000000000000040 ffff88013097b5c8 ffff880130790000
[  853.886633] Call Trace:
[  853.907631]  [&lt;ffffffff8149dd25&gt;] schedule+0x5a/0x5c
[  853.949670]  [&lt;ffffffff8149cc44&gt;] __mutex_lock_common+0x220/0x351
[  854.001225]  [&lt;ffffffff81304bd7&gt;] ? device_resume+0x58/0x1c4
[  854.049082]  [&lt;ffffffff81304bd7&gt;] ? device_resume+0x58/0x1c4
[  854.097011]  [&lt;ffffffff8149ce48&gt;] mutex_lock_nested+0x2f/0x36   &lt;-- here we wait for device_lock()
[  854.145591]  [&lt;ffffffff81304bd7&gt;] device_resume+0x58/0x1c4
[  854.192066]  [&lt;ffffffff81304d61&gt;] async_resume+0x1e/0x45
[  854.237019]  [&lt;ffffffff8104bc93&gt;] async_run_entry_fn+0xc6/0x173  &lt;-- ...while running in async context

Provide a 'scsi_sd_probe_domain' so that async probe actions actions can
be flushed without regard for the state of PM, and allow for the resume
path to handle devices that have transitioned from SDEV_QUIESCE to
SDEV_DEL prior to resume.

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
[alan: uplevel scsi_sd_probe_domain, clarify scsi_device_resume]
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
[jejb: remove unneeded config guards in include file]
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Handle disk devices which can not process medium access commands</title>
<updated>2012-02-19T16:14:52Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2012-02-09T18:48:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18a4d0a22ed6c54b67af7718c305cd010f09ddf8'/>
<id>urn:sha1:18a4d0a22ed6c54b67af7718c305cd010f09ddf8</id>
<content type='text'>
We have experienced several devices which fail in a fashion we do not
currently handle gracefully in SCSI. After a failure these devices will
respond to the SCSI primary command set (INQUIRY, TEST UNIT READY, etc.)
but any command accessing the storage medium will time out.

The following patch adds an callback that can be used by upper level
drivers to inspect the results of an error handling command. This in
turn has been used to implement additional checking in the SCSI disk
driver.

If a medium access command fails twice but TEST UNIT READY succeeds both
times in the subsequent error handling we will offline the device. The
maximum number of failed commands required to take a device offline can
be tweaked in sysfs.

Also add a new error flag to scsi_debug which allows this scenario to be
easily reproduced.

[jejb: fix up integer parsing to use kstrtouint]
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>SCSI host lock push-down</title>
<updated>2010-11-16T21:33:23Z</updated>
<author>
<name>Jeff Garzik</name>
</author>
<published>2010-11-16T07:10:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f281233d3eba15fb225d21ae2e228fd4553d824a'/>
<id>urn:sha1:f281233d3eba15fb225d21ae2e228fd4553d824a</id>
<content type='text'>
Move the mid-layer's -&gt;queuecommand() invocation from being locked
with the host lock to being unlocked to facilitate speeding up the
critical path for drivers who don't need this lock taken anyway.

The patch below presents a simple SCSI host lock push-down as an
equivalent transformation.  No locking or other behavior should change
with this patch.  All existing bugs and locking orders are preserved.

Additionally, add one parameter to queuecommand,
	struct Scsi_Host *
and remove one parameter from queuecommand,
	void (*done)(struct scsi_cmnd *)

Scsi_Host* is a convenient pointer that most host drivers need anyway,
and 'done' is redundant to struct scsi_cmnd-&gt;scsi_done.

Minimal code disturbance was attempted with this change.  Most drivers
needed only two one-line modifications for their host lock push-down.

Signed-off-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Acked-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[SCSI] Fix VPD inquiry page wrapper</title>
<updated>2010-09-16T15:48:48Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2010-09-10T05:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16d3ea26f82271fef9b1c4523b5e1ea31fa39eec'/>
<id>urn:sha1:16d3ea26f82271fef9b1c4523b5e1ea31fa39eec</id>
<content type='text'>
Fix two bugs in the VPD page wrapper:

    - Don't return failure if the user asked for page 0

    - The end of buffer check failed to account for the page header size
      and consequently didn't work

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Stable Tree &lt;stable@kernel.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] add scsi trace core functions and put trace points</title>
<updated>2010-04-30T17:51:10Z</updated>
<author>
<name>Kei Tokunaga</name>
</author>
<published>2010-04-01T11:41:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf81623542332bc2cedf3db49cbb2edb724780d2'/>
<id>urn:sha1:bf81623542332bc2cedf3db49cbb2edb724780d2</id>
<content type='text'>
Signed-off-by: Xiao Guangrong &lt;xiaoguangrong@cn.fujitsu.com&gt;
Signed-off-by: Tomohiro Kusumi &lt;kusumi.tomohiro@jp.fujitsu.com&gt;
Signed-off-by: Kei Tokunaga &lt;tokunaga.keiich@jp.fujitsu.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>scsi.c: add missing kernel-doc notation for new VPD parameters</title>
<updated>2010-03-01T16:11:54Z</updated>
<author>
<name>Randy Dunlap</name>
</author>
<published>2010-03-01T01:32:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=786f8ba2e9449a7f01ec6bc35838d0a335921061'/>
<id>urn:sha1:786f8ba2e9449a7f01ec6bc35838d0a335921061</id>
<content type='text'>
Add missing kernel-doc notation for new function parameters:

Warning(drivers/scsi/scsi.c:1031): No description found for parameter 'buf'
Warning(drivers/scsi/scsi.c:1031): No description found for parameter 'buf_len'

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[SCSI] eliminate potential kmalloc failure in scsi_get_vpd_page()</title>
<updated>2010-01-18T16:48:05Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2009-11-03T18:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3deec090558d5cb5ffdc574e5560f3ed9723394'/>
<id>urn:sha1:e3deec090558d5cb5ffdc574e5560f3ed9723394</id>
<content type='text'>
The best way to fix this is to eliminate the intenal kmalloc() and
make the caller allocate the required amount of storage.

Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
</feed>
