<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.2.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.2.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-26T00:13:50Z</updated>
<entry>
<title>target: Set additional sense length field in sense data</title>
<updated>2012-01-26T00:13:50Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-12-13T22:55:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8967b2b814f94a752b65e672e79c065887fe005f'/>
<id>urn:sha1:8967b2b814f94a752b65e672e79c065887fe005f</id>
<content type='text'>
commit 895f3022523361e9b383cf48f51feb1f7d5e7e53 upstream.

The target code was not setting the additional sense length field in the
sense data it returned, which meant that at least the Linux stack
ignored the ASC/ASCQ fields.  For example, without this patch, on a
tcm_loop device:

    # sg_raw -v /dev/sda 2 0 0 0 0 0

gives

        cdb to send: 02 00 00 00 00 00
    SCSI Status: Check Condition

    Sense Information:
     Fixed format, current;  Sense key: Illegal Request
      Raw sense data (in hex):
            70 00 05 00 00 00 00 00

while after the patch we correctly get the following (which matches what
a regular disk returns):

        cdb to send: 02 00 00 00 00 00
    SCSI Status: Check Condition

    Sense Information:
     Fixed format, current;  Sense key: Illegal Request
     Additional sense: Invalid command operation code
     Raw sense data (in hex):
            70 00 05 00 00 00 00 0a  00 00 00 00 20 00 00 00
            00 00

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>target: Set response format in INQUIRY response</title>
<updated>2012-01-26T00:13:49Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-12-06T18:02:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ce1ae0acda051d7378c5726d5e63a45dc88beb6'/>
<id>urn:sha1:9ce1ae0acda051d7378c5726d5e63a45dc88beb6</id>
<content type='text'>
commit ce136176fea522fc8f4c16dcae7e8ed1d890ca39 upstream.

Current SCSI specs say that the "response format" field in the standard
INQUIRY response should be set to 2, and all the real SCSI devices I
have do put 2 here.  So let's do that too.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>iscsi-target: Fix hex2bin warn_unused compile message</title>
<updated>2011-12-06T06:00:59Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-12-06T05:24:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ddca8f3ed36c5d25363dab6762829868af09cb02'/>
<id>urn:sha1:ddca8f3ed36c5d25363dab6762829868af09cb02</id>
<content type='text'>
Fix the following compile warning with hex2bin() usage:

drivers/target/iscsi/iscsi_target_auth.c: In function ‘chap_string_to_hex’:
drivers/target/iscsi/iscsi_target_auth.c:35: warning: ignoring return value of ‘hex2bin’, declared with attribute warn_unused_result

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Don't return an error if disabling unsupported features</title>
<updated>2011-12-06T06:00:58Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2011-11-30T20:11:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c638830d040696ff2bae07785fd4277e7e3fe7c4'/>
<id>urn:sha1:c638830d040696ff2bae07785fd4277e7e3fe7c4</id>
<content type='text'>
If an attribute is present (but not yet supported) it should be OK
to write 0 (a no-op) to the attribute.

This is an issue because userspace should be able to save and restore all
set attribute values without error.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/rd: fix or rewrite the copy routine</title>
<updated>2011-12-06T06:00:58Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2011-11-30T09:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=65b0c78d5a0ca2cb82b7b9f54f855896e0d7fc10'/>
<id>urn:sha1:65b0c78d5a0ca2cb82b7b9f54f855896e0d7fc10</id>
<content type='text'>
So the code assumes that the sg list is only a array while in reality
loopback SGL memory via scsi_cmnd into target-core may be already
chained.  This patch converts ramdisk code to use sg_miter logic from
scatterlist.h in order to properly support passthrough SGL usage with
transport_generic_map_mem_to_cmd() via loopback.

With this patch the bug goes away. However after umount/mount of the
device my files are gone. So something is still not right. After looking
at it for a while I decided to rewrite the that part of the code and now
things do work for me.

For reference:
- http://article.gmane.org/gmane.linux.scsi.target.devel/595
  the sg_next() conversion
- http://article.gmane.org/gmane.linux.scsi.target.devel/602
  the rewrite of the copy code

(nab: Fix compile warning in rd_MEMCPY)

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/rd: simplify the page/offset computation</title>
<updated>2011-12-06T06:00:57Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2011-11-25T21:18:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5bff9e8584fbcdb361dada5a0425724b9e31e608'/>
<id>urn:sha1:5bff9e8584fbcdb361dada5a0425724b9e31e608</id>
<content type='text'>
Breakout rd_MEMCPY_do_task() usage of do_div() to tmp value during
rd_request-&gt;rd_page assignment.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: remove the unused se_dev_list</title>
<updated>2011-12-06T06:00:57Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-11-29T08:29:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6f21475576dde397cd2580262209d4080fbd5458'/>
<id>urn:sha1:6f21475576dde397cd2580262209d4080fbd5458</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/file: walk properly over sg list</title>
<updated>2011-12-06T06:00:57Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2011-11-28T11:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9649fa1b8764f64c8cc4293e197e14cd46fe7205'/>
<id>urn:sha1:9649fa1b8764f64c8cc4293e197e14cd46fe7205</id>
<content type='text'>
This patch changes fileio to use for_each_sg() when walking se_task-&gt;task_sg
memory passed into from loopback LLD struct scsi_cmnd scatterlist memory.

This addresses an issue where FILEIO backends with loopback where hitting the
following OOPs with mkfs.ext2:

|kernel BUG at include/linux/scatterlist.h:97!
|invalid opcode: 0000 [#1] PREEMPT SMP
|Modules linked in: sd_mod tcm_loop target_core_stgt scsi_tgt target_core_pscsi target_core_file target_core_iblock target_core_mod configfs scsi_mod
|
|Pid: 671, comm: LIO_fileio Not tainted 3.1.0-rc10+ #139 Bochs Bochs
|EIP: 0060:[&lt;e0afd746&gt;] EFLAGS: 00010202 CPU: 0
|EIP is at fd_do_task+0x396/0x420 [target_core_file]
| [&lt;e0aa7884&gt;] __transport_execute_tasks+0xd4/0x190 [target_core_mod]
| [&lt;e0aa797c&gt;] transport_execute_tasks+0x3c/0xf0 [target_core_mod]
|EIP: [&lt;e0afd746&gt;] fd_do_task+0x396/0x420 [target_core_file] SS:ESP 0068:dea47e90

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: remove unused struct fields</title>
<updated>2011-12-06T06:00:56Z</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2011-11-24T01:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5c73b678f729ea087ef57b59a5d7b5dd3a97042b'/>
<id>urn:sha1:5c73b678f729ea087ef57b59a5d7b5dd3a97042b</id>
<content type='text'>
Some are never used, some are set but never read, dev_hoq_count is
incremented and decremented, but never read.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix page length in emulated INQUIRY VPD page 86h</title>
<updated>2011-12-06T06:00:56Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-11-22T21:51:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1289a0571c037b4757f60597d646aedb70361ec3'/>
<id>urn:sha1:1289a0571c037b4757f60597d646aedb70361ec3</id>
<content type='text'>
The LSB of the page length is at offset 3, not 2.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
