<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/scsi, branch v3.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-07-08T08:49:14Z</updated>
<entry>
<title>[SCSI] libsas: fix taskfile corruption in sas_ata_qc_fill_rtf</title>
<updated>2012-07-08T08:49:14Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2012-06-22T17:52:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ef1b512f4e6f936d89aa20be3d97a7ec7c290ac'/>
<id>urn:sha1:6ef1b512f4e6f936d89aa20be3d97a7ec7c290ac</id>
<content type='text'>
fill_result_tf() grabs the taskfile flags from the originating qc which
sas_ata_qc_fill_rtf() promptly overwrites.  The presence of an
ata_taskfile in the sata_device makes it tempting to just copy the full
contents in sas_ata_qc_fill_rtf().  However, libata really only wants
the fis contents and expects the other portions of the taskfile to not
be touched by -&gt;qc_fill_rtf.  To that end store a fis buffer in the
sata_device and use ata_tf_from_fis() like every other -&gt;qc_fill_rtf()
implementation.

Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Praveen Murali &lt;pmurali@logicube.com&gt;
Tested-by: Praveen Murali &lt;pmurali@logicube.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.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://git.shady.money/linux/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>
<entry>
<title>SCSI &amp; usb-storage: add try_rc_10_first flag</title>
<updated>2012-06-23T05:05:31Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-06-20T20:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a0bdffa0073857870a4ed1b4489762146359eb4'/>
<id>urn:sha1:6a0bdffa0073857870a4ed1b4489762146359eb4</id>
<content type='text'>
Several bug reports have been received recently for USB mass-storage
devices that don't handle READ CAPACITY(16) commands properly.  They
report bogus sizes, in some cases becoming unusable as a result.

The bugs were triggered by commit
09b6b51b0b6c1b9bb61815baf205e4d74c89ff04 (SCSI &amp; usb-storage: add
flags for VPD pages and REPORT LUNS), which caused usb-storage to stop
overriding the SCSI level reported by devices.  By default, the sd
driver will try READ CAPACITY(16) first for any device whose level is
above SCSI_SPC_2.

It seems likely that any device large enough to require the use of
READ CAPACITY(16) (i.e., 2 TB or more) would be able to handle READ
CAPACITY(10) commands properly.  Indeed, I don't know of any devices
that don't handle READ CAPACITY(10) properly.

Therefore this patch (as1559) adds a new flag telling the sd driver
to try READ CAPACITY(10) before READ CAPACITY(16), and sets this flag
for every USB mass-storage device.  If a device really is larger than
2 TB, sd will fall back to READ CAPACITY(16) just as it used to.

This fixes Bugzilla #43391.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
CC: "James E.J. Bottomley" &lt;JBottomley@parallels.com&gt;
CC: Matthew Dharm &lt;mdharm-usb@one-eyed-alien.net&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>[SCSI] fcoe, bnx2fc, libfcoe: SW FCoE and bnx2fc use FCoE Syfs</title>
<updated>2012-05-23T08:43:13Z</updated>
<author>
<name>Robert Love</name>
<email>robert.w.love@intel.com</email>
</author>
<published>2012-05-23T02:06:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d55e507d24c6db7eb012c379c62912e642eb75e'/>
<id>urn:sha1:8d55e507d24c6db7eb012c379c62912e642eb75e</id>
<content type='text'>
This patch has the SW FCoE driver and the bnx2fc
driver make use of the new fcoe_sysfs API added
earlier in this patch series.

After this patch a fcoe_ctlr_device is allocated with
private data in this order.

+------------------+   +------------------+
| fcoe_ctlr_device |   | fcoe_ctlr_device |
+------------------+   +------------------+
| fcoe_ctlr        |   | fcoe_ctlr        |
+------------------+   +------------------+
| fcoe_interface   |   | bnx2fc_interface |
+------------------+   +------------------+

libfcoe also takes part in this new model since it
discovers and manages fcoe_fcf instances. The memory
allocation is different for FCFs. I didn't want to
impact libfcoe's fcoe_fcf processing, so this patch
creates fcoe_fcf_device instances for each discovered
fcoe_fcf. The two are paired using a (void * priv)
member of the fcoe_ctlr_device. This allows libfcoe
to continue maintaining its list of fcoe_fcf instances
and simply attaches and detaches them from existing
or new fcoe_fcf_device instances.

Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] libfcoe: Add fcoe_sysfs</title>
<updated>2012-05-23T08:40:09Z</updated>
<author>
<name>Robert Love</name>
<email>robert.w.love@intel.com</email>
</author>
<published>2012-05-23T02:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a74e884ee71dbf3d0967b0321d7b4529a04826c'/>
<id>urn:sha1:9a74e884ee71dbf3d0967b0321d7b4529a04826c</id>
<content type='text'>
This patch adds a 'fcoe bus' infrastructure to the kernel
that is driven by changes to libfcoe which allow LLDs to
present FIP (FCoE Initialization Protocol) discovered
entities and their attributes to user space via sysfs.

This patch adds the following APIs-

fcoe_ctlr_device_add
fcoe_ctlr_device_delete
fcoe_fcf_device_add
fcoe_fcf_device_delete

They allow the LLD to expose the FCoE ENode Controller
and any discovered FCFs (Fibre Channel Forwarders, e.g.
FCoE switches) to the user. Each of these new devices
has their own bus_type so that they are grouped together
for easy lookup from a user space application. Each
new class has an attribute_group to expose attributes
for any created instances. The attributes are-

fcoe_ctlr_device
* fcf_dev_loss_tmo
* lesb_link_fail
* lesb_vlink_fail
* lesb_miss_fka
* lesb_symb_err
* lesb_err_block
* lesb_fcs_error

fcoe_fcf_device
* fabric_name
* switch_name
* priority
* selected
* fc_map
* vfid
* mac
* fka_peroid
* fabric_state
* dev_loss_tmo

A device loss infrastructre similar to the FC Transport's
is also added by this patch. It is nice to have so that a
link flapping adapter doesn't continually advance the count
used to identify the discovered FCF. FCFs will exist in a
"Disconnected" state until either the timer expires or the
FCF is rediscovered and becomes "Connected."

This patch generates a few checkpatch.pl WARNINGS that
I'm not sure what to do about. They're macros modeled
around the FC Transport attribute building macros, which
have the same 'feature' where the caller can ommit a cast
in the argument list and no cast occurs in the code. I'm
not sure how to keep the code condensed while keeping the
macros. Any advice would be appreciated.

Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] fcoe: Allocate fcoe_ctlr with fcoe_interface, not as a member</title>
<updated>2012-05-23T08:36:27Z</updated>
<author>
<name>Robert Love</name>
<email>robert.w.love@intel.com</email>
</author>
<published>2012-05-23T02:06:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=619fe4bed415e5d8a4749937f42b6a8a9031d4aa'/>
<id>urn:sha1:619fe4bed415e5d8a4749937f42b6a8a9031d4aa</id>
<content type='text'>
Currently the fcoe_ctlr associated with an interface is allocated
as a member of struct fcoe_interface. This causes problems when
attempting to use the new fcoe_sysfs APIs which allow us to allocate
the fcoe_interface as private data to the fcoe_ctlr_device instance.
The problem is that libfcoe wants to be able use pointer math to find a
fcoe_ctlr's fcoe_ctlr_device as well as finding a fcoe_ctlr_device's
assocated fcoe_ctlr. To do this we need to allocate the
fcoe_ctlr_device, with private data for the LLD. The private data
contains the fcoe_ctlr and its private data is the fcoe_interface.
This patch only allocates the fcoe_interface with the fcoe_ctlr, the
fcoe_ctlr_device will be added in a later patch, which will complete
the below diagram-

+------------------+
| fcoe_ctlr_device |
+------------------+
| fcoe_ctlr        |
+------------------+
| fcoe_interface   |
+------------------+

This prep work will allow us to go from a fcoe_ctlr_device instance
to its fcoe_ctlr as well as from a fcoe_ctlr to its fcoe_ctlr_device
once the fcoe_sysfs API is in use (later patches in this series).

Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'isci-for-3.5' into misc</title>
<updated>2012-05-21T11:17:30Z</updated>
<author>
<name>James Bottomley</name>
<email>JBottomley@Parallels.com</email>
</author>
<published>2012-05-21T11:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e34693336564f02b3e2cc09d8b872aef22a154e9'/>
<id>urn:sha1:e34693336564f02b3e2cc09d8b872aef22a154e9</id>
<content type='text'>
isci update for 3.5

1/ Rework remote-node-context (RNC) handling for proper management of
   the silicon state machine in error handling and hot-plug conditions.
   Further details below, suffice to say if the RNC is mismanaged the
   silicon state machines may lock up.

2/ Refactor the initialization code to be reused for suspend/resume support

3/ Miscellaneous bug fixes to address discovery issues and hardware
   compatibility.

RNC rework details from Jeff Skirvin:

In the controller, devices as they appear on a SAS domain (or
direct-attached SATA devices) are represented by memory structures known
as "Remote Node Contexts" (RNCs).  These structures are transferred from
main memory to the controller using a set of register commands; these
commands include setting up the context ("posting"), removing the
context ("invalidating"), and commands to control the scheduling of
commands and connections to that remote device ("suspensions" and
"resumptions").  There is a similar path to control RNC scheduling from
the protocol engine, which interprets the results of command and data
transmission and reception.

In general, the controller chooses among non-suspended RNCs to find one
that has work requiring scheduling the transmission of command and data
frames to a target.  Likewise, when a target tries to return data back
to the initiator, the state of the RNC is used by the controller to
determine how to treat the incoming request. As an example, if the RNC
is in the state "TX/RX Suspended", incoming SSP connection requests from
the target will be rejected by the controller hardware.  When an RNC is
"TX Suspended", it will not be selected by the controller hardware to
start outgoing command or data operations (with certain priority-based
exceptions).

As mentioned above, there are two sources for management of the RNC
states: commands from driver software, and the result of transmission
and reception conditions of commands and data signaled by the controller
hardware.  As an example of the latter, if an outgoing SSP command ends
with a OPEN_REJECT(BAD_DESTINATION) status, the RNC state will
transition to the "TX Suspended" state, and this is signaled by the
controller hardware in the status to the completion of the pending
command as well as signaled in a controller hardware event.  Examples of
the former are included in the patch changelogs.

Driver software is required to suspend the RNC in a "TX/RX Suspended"
condition before any outstanding commands can be terminated.  Failure to
guarantee this can lead to a complete hardware hang condition.  Earlier
versions of the driver software did not guarantee that an RNC was
correctly managed before I/O termination, and so operated in an unsafe
way.

Further, the driver performed unnecessary contortions to preserve the
remote device command state and so was more complicated than it needed
to be.  A simplifying driver assumption is that once an I/O has entered
the error handler path without having completed in the target, the
requirement on the driver is that all use of the sas_task must end.
Beyond that, recovery of operation is dependent on libsas and other
components to reset, rediscover and reconfigure the device before normal
operation can restart.  In the driver, this simplifying assumption meant
that the RNC management could be reduced to entry into the suspended
state, terminating the targeted I/O request, and resuming the RNC as
needed for device-specific management such as an SSP Abort Task or LUN
Reset Management request.
</content>
</entry>
<entry>
<title>isci: kill sci_phy_protocol and sci_request_protocol</title>
<updated>2012-05-17T19:27:11Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2012-02-01T08:44:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c79dd80d73017a88a2c2ae46e7d5303cba6a32e0'/>
<id>urn:sha1:c79dd80d73017a88a2c2ae46e7d5303cba6a32e0</id>
<content type='text'>
Holdovers from the initial driver cleanup, replace with enum sas_protocol.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] be2iscsi: Get Initiator Name for the iSCSI_Host</title>
<updated>2012-04-25T08:29:35Z</updated>
<author>
<name>John Soni Jose</name>
<email>sony.john-n@emulex.com</email>
</author>
<published>2012-04-04T04:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2177199d5150cf61bf26badcb6901176cc13787b'/>
<id>urn:sha1:2177199d5150cf61bf26badcb6901176cc13787b</id>
<content type='text'>
Implement the ISCSI_HOST_PARAM_INITIATOR_NAME for .get_host_param

Signed-off-by: John Soni Jose &lt;sony.john-n@emulex.com&gt;
Signed-off-by: Jayamohan Kallickal &lt;jayamohan.kallickal@emulex.com&gt;
Signed-off-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] libsas, libata: fix start of life for a sas ata_port</title>
<updated>2012-04-23T11:11:47Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2012-03-22T04:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2024459252a9d2d312ee562f86f332a1498f412'/>
<id>urn:sha1:b2024459252a9d2d312ee562f86f332a1498f412</id>
<content type='text'>
This changes the ordering of initialization and probing events from:
  1/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
  2/ allocate ata_port and schedule port probe in DISCE_PROBE
...to:
  1/ allocate ata_port in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
  2/ allocate rphy in PORTE_BYTES_DMAED, DISCE_REVALIDATE_DOMAIN
  3/ schedule port probe in DISCE_PROBE

This ordering prevents PHYE_SIGNAL_LOSS_EVENTS from sneaking in to
destrory ata devices before they have been fully initialized:

  BUG: unable to handle kernel paging request at 0000000000003b10
  IP: [&lt;ffffffffa0053d7e&gt;] sas_ata_end_eh+0x12/0x5e [libsas]
  ...
  [&lt;ffffffffa004d1af&gt;] sas_unregister_common_dev+0x78/0xc9 [libsas]
  [&lt;ffffffffa004d4d4&gt;] sas_unregister_dev+0x4f/0xad [libsas]
  [&lt;ffffffffa004d5b1&gt;] sas_unregister_domain_devices+0x7f/0xbf [libsas]
  [&lt;ffffffffa004c487&gt;] sas_deform_port+0x61/0x1b8 [libsas]
  [&lt;ffffffffa004bed0&gt;] sas_phye_loss_of_signal+0x29/0x2b [libsas]

...and kills the awkward "sata domain_device briefly existing in the
domain without an ata_port" state.

Reported-by: Michal Kosciowski &lt;michal.kosciowski@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Acked-by: Jeff Garzik &lt;jgarzik@redhat.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
</feed>
