<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/scsi/scsi.c, branch v3.11</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>[SCSI] Don't attempt to send extended INQUIRY command if skip_vpd_pages is set</title>
<updated>2013-08-02T20:20:21+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2013-07-31T02:58:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7562523e84ddc742fe1f9db8bd76b01acca89f6b'/>
<id>7562523e84ddc742fe1f9db8bd76b01acca89f6b</id>
<content type='text'>
If a device has the skip_vpd_pages flag set we should simply fail the
scsi_get_vpd_page() call.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Stuart Foster &lt;smf.linux@ntlworld.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a device has the skip_vpd_pages flag set we should simply fail the
scsi_get_vpd_page() call.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Stuart Foster &lt;smf.linux@ntlworld.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sd: Update WRITE SAME heuristics</title>
<updated>2013-06-27T00:56:18+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2013-06-07T02:15:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=66c28f97120e8a621afd5aa7a31c4b85c547d33d'/>
<id>66c28f97120e8a621afd5aa7a31c4b85c547d33d</id>
<content type='text'>
SATA drives located behind a SAS controller would incorrectly receive
WRITE SAME commands. Tweak the heuristics so that:

 - If REPORT SUPPORTED OPERATION CODES is provided we will use that to
   choose between WRITE SAME(16), WRITE SAME(10) and disabled. This also
   fixes an issue with the old code which would issue WRITE SAME(10)
   despite the command not being whitelisted in REPORT SUPPORTED
   OPERATION CODES.

 - If REPORT SUPPORTED OPERATION CODES is not provided we will fall back
   to WRITE SAME(10) unless the device has an ATA Information VPD page.
   The assumption is that a SATL which is smart enough to implement
   WRITE SAME would also provide REPORT SUPPORTED OPERATION CODES.

To facilitate the new heuristics scsi_report_opcode() has been modified
to so we can distinguish between "operation not supported" and "RSOC not
supported".

Reported-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Tested-by: Bernd Schubert &lt;bernd.schubert@itwm.fraunhofer.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SATA drives located behind a SAS controller would incorrectly receive
WRITE SAME commands. Tweak the heuristics so that:

 - If REPORT SUPPORTED OPERATION CODES is provided we will use that to
   choose between WRITE SAME(16), WRITE SAME(10) and disabled. This also
   fixes an issue with the old code which would issue WRITE SAME(10)
   despite the command not being whitelisted in REPORT SUPPORTED
   OPERATION CODES.

 - If REPORT SUPPORTED OPERATION CODES is not provided we will fall back
   to WRITE SAME(10) unless the device has an ATA Information VPD page.
   The assumption is that a SATL which is smart enough to implement
   WRITE SAME would also provide REPORT SUPPORTED OPERATION CODES.

To facilitate the new heuristics scsi_report_opcode() has been modified
to so we can distinguish between "operation not supported" and "RSOC not
supported".

Reported-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
Tested-by: Bernd Schubert &lt;bernd.schubert@itwm.fraunhofer.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] Add a report opcode helper</title>
<updated>2012-11-14T05:11:31+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2012-09-18T16:19:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c6bdaeab4fda6c9fdd5f3f5c610dea97bddf7d6'/>
<id>3c6bdaeab4fda6c9fdd5f3f5c610dea97bddf7d6</id>
<content type='text'>
The REPORT SUPPORTED OPERATION CODES command can be used to query
whether a given opcode is supported by a device. Add a helper function
that allows us to look up commands.

We only issue RSOC if the device reports compliance with SPC-3 or
later. But to err on the side of caution we disable the command for ATA,
FireWire and USB.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.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>
The REPORT SUPPORTED OPERATION CODES command can be used to query
whether a given opcode is supported by a device. Add a helper function
that allows us to look up commands.

We only issue RSOC if the device reports compliance with SPC-3 or
later. But to err on the side of caution we disable the command for ATA,
FireWire and USB.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] async: make async_synchronize_full() flush all work regardless of domain</title>
<updated>2012-07-20T08:07:37+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2012-07-10T02:33:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a4683487f90bfe3049686fc5c566bdc1ad03ace6'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] async: introduce 'async_domain' type</title>
<updated>2012-07-20T08:05:54+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2012-07-10T02:33:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2955b47d2c1983998a8c5915cb96884e67f7cb53'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] Fix sd_probe_domain config problem</title>
<updated>2012-06-07T01:16:20+00:00</updated>
<author>
<name>James Bottomley</name>
<email>JBottomley@Parallels.com</email>
</author>
<published>2012-06-06T05:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ea80dadec7a06889562b478cf0b87afbe62b7ac8'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sd: limit the scope of the async probe domain</title>
<updated>2012-05-17T08:10:46+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2012-03-23T00:05:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a7a20d103994fd760766e6c9d494daa569cbfe06'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] Handle disk devices which can not process medium access commands</title>
<updated>2012-02-19T16:14:52+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2012-02-09T18:48:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=18a4d0a22ed6c54b67af7718c305cd010f09ddf8'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI host lock push-down</title>
<updated>2010-11-16T21:33:23+00:00</updated>
<author>
<name>Jeff Garzik</name>
<email>jeff@garzik.org</email>
</author>
<published>2010-11-16T07:10:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f281233d3eba15fb225d21ae2e228fd4553d824a'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] Fix VPD inquiry page wrapper</title>
<updated>2010-09-16T15:48:48+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2010-09-10T05:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=16d3ea26f82271fef9b1c4523b5e1ea31fa39eec'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
</feed>
