<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/scsi/scsi_cmnd.h, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-3.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2014-07-17T20:07:45Z</updated>
<entry>
<title>scsi: remove various exports that were only used by scsi_tgt</title>
<updated>2014-07-17T20:07:45Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2014-04-15T10:26:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f1bea55d5afa371c311b61946c58b2cd4e78fb2d'/>
<id>urn:sha1:f1bea55d5afa371c311b61946c58b2cd4e78fb2d</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] use the scsi data buffer length to extract transfer size</title>
<updated>2014-07-03T17:50:31Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2014-06-24T14:59:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5616b0a46ed82eb9a093f752fc4d7bd3cc688583'/>
<id>urn:sha1:5616b0a46ed82eb9a093f752fc4d7bd3cc688583</id>
<content type='text'>
Commit 8846bab180fa introduced a helper that can be used to query the
wire transfer size for a SCSI command taking protection information into
account.

However, some commands do not have a 1:1 mapping between the block range
they work on and the payload size (discard, write same). After the
scatterlist has been set up these requests use __data_len to store the
number of bytes to report completion on. This means that callers of
scsi_transfer_length() would get the wrong byte count for these types of
requests.

To overcome this we make scsi_transfer_length() use the scatterlist
length in the scsi_data_buffer as basis for the wire transfer
calculation instead of __data_len.

Reported-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Debugged-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Fixes: d77e65350f2d82dfa0557707d505711f5a43c8fd
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2014-06-13T05:38:32Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-13T05:38:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ed9ea4ed3a44e8f8e8c7e8a12a05fd73f9ae1fb4'/>
<id>urn:sha1:ed9ea4ed3a44e8f8e8c7e8a12a05fd73f9ae1fb4</id>
<content type='text'>
Pull SCSI target updates from Nicholas Bellinger:
 "The highlights this round include:

   - Add support for T10 PI pass-through between vhost-scsi +
     virtio-scsi (MST + Paolo + MKP + nab)
   - Add support for T10 PI in qla2xxx target mode (Quinn + MKP + hch +
     nab, merged through scsi.git)
   - Add support for percpu-ida pre-allocation in qla2xxx target code
     (Quinn + nab)
   - A number of iser-target fixes related to hardening the network
     portal shutdown path (Sagi + Slava)
   - Fix response length residual handling for a number of control CDBs
     (Roland + Christophe V.)
   - Various iscsi RFC conformance fixes in the CHAP authentication path
     (Tejas and Calsoft folks + nab)
   - Return TASK_SET_FULL status for tcm_fc(FCoE) DataIn + Response
     failures (Vasu + Jun + nab)
   - Fix long-standing ABORT_TASK + session reset hang (nab)
   - Convert iser-initiator + iser-target to include T10 bytes into EDTL
     (Sagi + Or + MKP + Mike Christie)
   - Fix NULL pointer dereference regression related to XCOPY introduced
     in v3.15 + CC'ed to v3.12.y (nab)"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (34 commits)
  target: Fix NULL pointer dereference for XCOPY in target_put_sess_cmd
  vhost-scsi: Include prot_bytes into expected data transfer length
  TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire
  libiscsi, iser: Adjust data_length to include protection information
  scsi_cmnd: Introduce scsi_transfer_length helper
  target: Report correct response length for some commands
  target/sbc: Check that the LBA and number of blocks are correct in VERIFY
  target/sbc: Remove sbc_check_valid_sectors()
  Target/iscsi: Fix sendtargets response pdu for iser transport
  Target/iser: Fix a wrong dereference in case discovery session is over iser
  iscsi-target: Fix ABORT_TASK + connection reset iscsi_queue_req memory leak
  target: Use complete_all for se_cmd-&gt;t_transport_stop_comp
  target: Set CMD_T_ACTIVE bit for Task Management Requests
  target: cleanup some boolean tests
  target/spc: Simplify INQUIRY EVPD=0x80
  tcm_fc: Generate TASK_SET_FULL status for response failures
  tcm_fc: Generate TASK_SET_FULL status for DataIN failures
  iscsi-target: Reject mutual authentication with reflected CHAP_C
  iscsi-target: Remove no-op from iscsit_tpg_del_portal_group
  iscsi-target: Fix CHAP_A parameter list handling
  ...
</content>
</entry>
<entry>
<title>scsi_cmnd: Introduce scsi_transfer_length helper</title>
<updated>2014-06-11T20:06:42Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2014-06-11T09:09:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8846bab180fa2bcfe02d4ba5288fbaba12c8f4f3'/>
<id>urn:sha1:8846bab180fa2bcfe02d4ba5288fbaba12c8f4f3</id>
<content type='text'>
In case protection information exists on the wire
scsi transports should include it in the transfer
byte count (even if protection information does not
exist in the host memory space). This helper will
compute the total transfer length from the scsi
command data length and protection attributes.

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: stable@vger.kernel.org # 3.15+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>virtio_scsi: use cmd_size</title>
<updated>2014-05-19T17:57:23Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2014-05-01T14:51:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b54197c43db88f4436717f554d623189cddce29e'/>
<id>urn:sha1:b54197c43db88f4436717f554d623189cddce29e</id>
<content type='text'>
Taken almost entirely from Nicholas Bellinger's scsi-mq conversion.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>[SCSI] megaraid: simplify internal command handling</title>
<updated>2014-03-27T15:26:31Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2014-02-20T22:20:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0f2bb84d2a68448c29d46f9f77a78bb4ed0218db'/>
<id>urn:sha1:0f2bb84d2a68448c29d46f9f77a78bb4ed0218db</id>
<content type='text'>
We don't use the passed in scsi command for anything, so just add a adapter-
wide internal status to go along with the internal scb that is used unter
int_mtx to pass back the return value and get rid of all the complexities
and abuse of the scsi_cmnd structure.

This gets rid of the only user of scsi_allocate_command/scsi_free_command,
which can now be removed.

[jejb: checkpatch fixes]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Adam Radford &lt;aradford@gmail.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] do not manipulate device reference counts in scsi_get/put_command</title>
<updated>2014-03-15T17:19:24Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2014-02-20T22:20:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0479633686d370303e3430256ace4bd5f7f138dc'/>
<id>urn:sha1:0479633686d370303e3430256ace4bd5f7f138dc</id>
<content type='text'>
Many callers won't need this and we can optimize them away.  In addition
the handling in the __-prefixed variants was inconsistant to start with.

Based on an earlier patch from Bart Van Assche.

[jejb: fix kerneldoc probelm picked up by Fengguang Wu]
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] improved eh timeout handler</title>
<updated>2013-12-19T15:39:02Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2013-11-11T12:44:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e494f6a728394ab0df194342549ee20e6f0752df'/>
<id>urn:sha1:e494f6a728394ab0df194342549ee20e6f0752df</id>
<content type='text'>
When a command runs into a timeout we need to send an 'ABORT TASK'
TMF. This is typically done by the 'eh_abort_handler' LLDD callback.

Conceptually, however, this function is a normal SCSI command, so
there is no need to enter the error handler.

This patch implements a new scsi_abort_command() function which
invokes an asynchronous function scsi_eh_abort_handler() to
abort the commands via the usual 'eh_abort_handler'.

If abort succeeds the command is either retried or terminated,
depending on the number of allowed retries. However, 'eh_eflags'
records the abort, so if the retry would fail again the
command is pushed onto the error handler without trying to
abort it (again); it'll be cleared up from SCSI EH.

[hare: smatch detected stray switch fixed]
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Shorten the path length of scsi_cmd_to_driver()</title>
<updated>2012-10-09T11:04:42Z</updated>
<author>
<name>Li Zhong</name>
<email>zhong@linux.vnet.ibm.com</email>
</author>
<published>2012-09-29T04:23:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=329a402cb052b233bc92aa34c4caf2f7dfb2d76e'/>
<id>urn:sha1:329a402cb052b233bc92aa34c4caf2f7dfb2d76e</id>
<content type='text'>
This patch tries to shorten the path length of scsi_cmd_to_driver(). As only
REQ_TYPE_BLOCK_PC commands can be submitted without a driver, so we could
avoid the related NULL checking, as long as we make sure we don't use it for
REQ_TYPE_BLOCK_PC type commands. Plus, this fixes a bug where you get
different behaviors from REQ_TYPE_BLOCK_PC commands when a driver is and isn't
attached.

Signed-off-by: Li Zhong &lt;zhong@linux.vnet.ibm.com&gt;
Reviewed-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] Fix NULL dereferences in scsi_cmd_to_driver</title>
<updated>2012-07-08T08:40:51Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-06-21T19:23:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=222a806af830fda34ad1f6bc991cd226916de060'/>
<id>urn:sha1:222a806af830fda34ad1f6bc991cd226916de060</id>
<content type='text'>
Avoid crashing if the private_data pointer happens to be NULL. This has
been seen sometimes when a host reset happens, notably when there are
many LUNs:

host3: Assigned Port ID 0c1601
scsi host3: libfc: Host reset succeeded on port (0c1601)
BUG: unable to handle kernel NULL pointer dereference at 0000000000000350
IP: [&lt;ffffffff81352bb8&gt;] scsi_send_eh_cmnd+0x58/0x3a0
&lt;snip&gt;
Process scsi_eh_3 (pid: 4144, threadinfo ffff88030920c000, task ffff880326b160c0)
Stack:
 000000010372e6ba 0000000000000282 000027100920dca0 ffffffffa0038ee0
 0000000000000000 0000000000030003 ffff88030920dc80 ffff88030920dc80
 00000002000e0000 0000000a00004000 ffff8803242f7760 ffff88031326ed80
Call Trace:
 [&lt;ffffffff8105b590&gt;] ? lock_timer_base+0x70/0x70
 [&lt;ffffffff81352fbe&gt;] scsi_eh_tur+0x3e/0xc0
 [&lt;ffffffff81353a36&gt;] scsi_eh_test_devices+0x76/0x170
 [&lt;ffffffff81354125&gt;] scsi_eh_host_reset+0x85/0x160
 [&lt;ffffffff81354291&gt;] scsi_eh_ready_devs+0x91/0x110
 [&lt;ffffffff813543fd&gt;] scsi_unjam_host+0xed/0x1f0
 [&lt;ffffffff813546a8&gt;] scsi_error_handler+0x1a8/0x200
 [&lt;ffffffff81354500&gt;] ? scsi_unjam_host+0x1f0/0x1f0
 [&lt;ffffffff8106ec3e&gt;] kthread+0x9e/0xb0
 [&lt;ffffffff81509264&gt;] kernel_thread_helper+0x4/0x10
 [&lt;ffffffff8106eba0&gt;] ? kthread_freezable_should_stop+0x70/0x70
 [&lt;ffffffff81509260&gt;] ? gs_change+0x13/0x13
Code: 25 28 00 00 00 48 89 45 c8 31 c0 48 8b 87 80 00 00 00 48 8d b5 60 ff ff ff 89 d1 48 89 fb 41 89 d6 4c 89 fa 48 8b 80 b8 00 00 00
 &lt;48&gt; 8b 80 50 03 00 00 48 8b 00 48 89 85 38 ff ff ff 48 8b 07 4c
RIP  [&lt;ffffffff81352bb8&gt;] scsi_send_eh_cmnd+0x58/0x3a0
 RSP &lt;ffff88030920dc50&gt;
CR2: 0000000000000350


Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Tested-by: Marcus Dennis &lt;marcusx.e.dennis@intel.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
</feed>
