<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/scsi/scsi_lib.c, branch v4.7</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_lib: correctly retry failed zero length REQ_TYPE_FS commands</title>
<updated>2016-05-22T18:52:45+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-05-13T19:04:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a621bac3044ed6f7ec5fa0326491b2d4838bfa93'/>
<id>a621bac3044ed6f7ec5fa0326491b2d4838bfa93</id>
<content type='text'>
When SCSI was written, all commands coming from the filesystem
(REQ_TYPE_FS commands) had data.  This meant that our signal for needing
to complete the command was the number of bytes completed being equal to
the number of bytes in the request.  Unfortunately, with the advent of
flush barriers, we can now get zero length REQ_TYPE_FS commands, which
confuse this logic because they satisfy the condition every time.  This
means they never get retried even for retryable conditions, like UNIT
ATTENTION because we complete them early assuming they're done.  Fix
this by special casing the early completion condition to recognise zero
length commands with errors and let them drop through to the retry code.

Cc: stable@vger.kernel.org
Reported-by: Sebastian Parschauer &lt;s.parschauer@gmx.de&gt;
Signed-off-by: James E.J. Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Tested-by: Jack Wang &lt;jinpu.wang@profitbricks.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When SCSI was written, all commands coming from the filesystem
(REQ_TYPE_FS commands) had data.  This meant that our signal for needing
to complete the command was the number of bytes completed being equal to
the number of bytes in the request.  Unfortunately, with the advent of
flush barriers, we can now get zero length REQ_TYPE_FS commands, which
confuse this logic because they satisfy the condition every time.  This
means they never get retried even for retryable conditions, like UNIT
ATTENTION because we complete them early assuming they're done.  Fix
this by special casing the early completion condition to recognise zero
length commands with errors and let them drop through to the retry code.

Cc: stable@vger.kernel.org
Reported-by: Sebastian Parschauer &lt;s.parschauer@gmx.de&gt;
Signed-off-by: James E.J. Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Tested-by: Jack Wang &lt;jinpu.wang@profitbricks.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_lib: Decode T10 vendor IDs</title>
<updated>2016-05-11T01:34:16+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-05-09T07:14:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d230823a1c4c3e97afd4c934b86b3975d5e20249'/>
<id>d230823a1c4c3e97afd4c934b86b3975d5e20249</id>
<content type='text'>
Some arrays / HBAs will only present T10 vendor IDs, so we should be
decoding them, too.

[mkp: Fixed T10 spelling]

Suggested-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some arrays / HBAs will only present T10 vendor IDs, so we should be
decoding them, too.

[mkp: Fixed T10 spelling]

Suggested-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: scatterlist: move SG pool code from SCSI driver to lib/sg_pool.c</title>
<updated>2016-04-15T20:53:14+00:00</updated>
<author>
<name>Ming Lin</name>
<email>ming.l@ssi.samsung.com</email>
</author>
<published>2016-04-04T21:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9b1d6c8950021ab007608d455fc9c398ecd25476'/>
<id>9b1d6c8950021ab007608d455fc9c398ecd25476</id>
<content type='text'>
Now it's ready to move the mempool based SG chained allocator code from
SCSI driver to lib/sg_pool.c, which will be compiled only based on a Kconfig
symbol CONFIG_SG_POOL.

SCSI selects CONFIG_SG_POOL.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now it's ready to move the mempool based SG chained allocator code from
SCSI driver to lib/sg_pool.c, which will be compiled only based on a Kconfig
symbol CONFIG_SG_POOL.

SCSI selects CONFIG_SG_POOL.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTS</title>
<updated>2016-04-15T20:53:14+00:00</updated>
<author>
<name>Ming Lin</name>
<email>ming.l@ssi.samsung.com</email>
</author>
<published>2016-04-04T21:48:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=65e8617fba17732b4c68d3369a621725838b6f28'/>
<id>65e8617fba17732b4c68d3369a621725838b6f28</id>
<content type='text'>
Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount
we fit into a single scatterlist chunk.

Rename SCSI_MAX_SG_CHAIN_SEGMENTS to SG_MAX_SEGMENTS.

Will move these 2 generic definitions to scatterlist.h later.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt; (for ib_srp changes)
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount
we fit into a single scatterlist chunk.

Rename SCSI_MAX_SG_CHAIN_SEGMENTS to SG_MAX_SEGMENTS.

Will move these 2 generic definitions to scatterlist.h later.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt; (for ib_srp changes)
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: rename SG related struct and functions</title>
<updated>2016-04-15T20:53:13+00:00</updated>
<author>
<name>Ming Lin</name>
<email>ming.l@ssi.samsung.com</email>
</author>
<published>2016-04-04T21:48:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=001d63be61c3b5a0413a46bacafbfc60c353951a'/>
<id>001d63be61c3b5a0413a46bacafbfc60c353951a</id>
<content type='text'>
Rename SCSI specific struct and functions to more genenic names.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Reviewed-by: Sagi Grimberg &lt;sgi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename SCSI specific struct and functions to more genenic names.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Reviewed-by: Sagi Grimberg &lt;sgi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: replace "mq" with "first_chunk" in SG functions</title>
<updated>2016-04-15T20:53:13+00:00</updated>
<author>
<name>Ming Lin</name>
<email>ming.l@ssi.samsung.com</email>
</author>
<published>2016-04-04T21:48:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=22cc3d4c6f4c529f4bf17445c60893b13e7611fb'/>
<id>22cc3d4c6f4c529f4bf17445c60893b13e7611fb</id>
<content type='text'>
Parameter "bool mq" is block driver specific.
Change it to "first_chunk" to make it more generic.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Parameter "bool mq" is block driver specific.
Change it to "first_chunk" to make it more generic.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: replace "scsi_data_buffer" with "sg_table" in SG functions</title>
<updated>2016-04-15T20:53:12+00:00</updated>
<author>
<name>Ming Lin</name>
<email>ming.l@ssi.samsung.com</email>
</author>
<published>2016-04-04T21:48:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=91dbc08d64fba7c1426a32be4c57ebb63c4be124'/>
<id>91dbc08d64fba7c1426a32be4c57ebb63c4be124</id>
<content type='text'>
Replace parameter "struct scsi_data_buffer" with "struct sg_table" in
SG alloc/free functions to make them generic.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace parameter "struct scsi_data_buffer" with "struct sg_table" in
SG alloc/free functions to make them generic.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ming Lin &lt;ming.l@ssi.samsung.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fixes' into misc</title>
<updated>2016-03-15T22:24:44+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-03-15T22:24:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a7dee8f45fa2948b74d8e84ba24e435c87fd0acf'/>
<id>a7dee8f45fa2948b74d8e84ba24e435c87fd0acf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>SCSI: Free resources when we return BLKPREP_INVALID</title>
<updated>2016-02-26T22:25:32+00:00</updated>
<author>
<name>jiangyiwen</name>
<email>jiangyiwen@huawei.com</email>
</author>
<published>2016-02-16T12:14:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e1cd3911170eda37fd9501e81ee1c2eb63803fd0'/>
<id>e1cd3911170eda37fd9501e81ee1c2eb63803fd0</id>
<content type='text'>
When called scsi_prep_fn return BLKPREP_INVALID, we should use the same
code with BLKPREP_KILL in scsi_prep_return.

Signed-off-by: Yiwen Jiang &lt;jiangyiwen@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When called scsi_prep_fn return BLKPREP_INVALID, we should use the same
code with BLKPREP_KILL in scsi_prep_return.

Signed-off-by: Yiwen Jiang &lt;jiangyiwen@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_dh: add 'rescan' callback</title>
<updated>2016-02-24T02:27:02+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-02-19T08:17:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d3d328919f278eda489a482541583f79987ad0e2'/>
<id>d3d328919f278eda489a482541583f79987ad0e2</id>
<content type='text'>
If a device needs to be rescanned the device_handler might need
to be rechecked, too.
So add a 'rescan' callback to the device handler and call it
upon scsi_rescan_device(). The rescan callback will be invoked
from the Unit Attention handling of ASC/ASCQ 3F 03
(INQUIRY DATA HAS CHANGED).

Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a device needs to be rescanned the device_handler might need
to be rechecked, too.
So add a 'rescan' callback to the device handler and call it
upon scsi_rescan_device(). The rescan callback will be invoked
from the Unit Attention handling of ASC/ASCQ 3F 03
(INQUIRY DATA HAS CHANGED).

Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
