History log of /drivers/scsi/isci/port.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
05b080fc933bb068b32fa119db00e8efcc10e3bd 04-Jan-2012 Marcin Tomczak <marcin.tomczak@intel.com> [SCSI] isci: fix, prevent port from getting stuck in the 'configuring' state

When expander connected in x2 or x4 mode and with IO runnning, if
a cable from wideport is plugged out from the phy, IO's start failing
on all the targets.

Observed that when cable is pulled with IO running, cominit is
happening on all the links and IO's start dropping to 0 and eventually
the whole IO fails. Second observation, target is trying to open and
SCU is responding with "Open reject no destination".

A cause of the problem is when the port went from the "ready
configuring substate" back to "ready configuring substate" as a result
of phy being pulled off, scic suspended the port task scheduler
register. As a result no IO was allowed and in the "substate
configuring enter" routine the IO never goes back to 0. As a result
the port never comes out of "ready substate configuring".

The patch adds a mechanism of activate and deactivate phy when a port
link up, which fixes the problem.

Signed-off-by: Bartek Nowakowski <bartek.nowakowski@intel.com>
Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Marcin Tomczak <marcin.tomczak@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
/drivers/scsi/isci/port.h
7e629841b8f8f7bc84d74de994d748b0a3282225 04-Jan-2012 Bartek Nowakowski <bartek.nowakowski@intel.com> [SCSI] isci: enable wide port targets

Arrange for task_contexts prepared for the wide targets to account for
all the attached phys in the port.

Signed-off-by: Bartek Nowakowski <bartek.nowakowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
/drivers/scsi/isci/port.h
52d74634335dfc0984ed955ed3c6ad6488495f96 28-Oct-2011 Dan Williams <dan.j.williams@intel.com> [SCSI] isci: revert bcn filtering

The initial bcn filtering implementation was validated on a kernel
baseline that predated the switch to new libata error handling. Also,
prior to that conversion we borrowed the mvsas MVS_DEV_EH approach to
prevent the unwanted extra ap->ops->phy_reset(ap) that occurred in the
ata_bus_probe() path.

After the conversion to new libata eh resets at discovery are more
frequent and get filtered prematurely by IDEV_EH. The result is that
our bcn filtering has been blocked from running and at discovery and it
appears to stall discovery completion to the point of triggering hung
task timeouts. So, revert the implementation for now. When it returns
it will go into libsas proper.

The domain rediscovery that takes place due to ->lldd_I_T_nexus_reset()
events should now be properly waited for by the ata_port_wait_eh() call
in ata_port_probe(). So the hard coded delay in the isci
->lldd_I_T_nexus_reset() and other libsas drivers should help debounce
the libsas thread from seeing temporary device removals.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
/drivers/scsi/isci/port.h
8e35a1398c5db981cd1a2d7635de9c15dd648527 28-Oct-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com> [SCSI] isci: Fix hard reset timeout conditions.

A hard reset can timeout before or after the last phy in the
port goes away. If after, then notify the OS that the last
phy has failed.

The recovery for the failed hard reset has been removed.
This recovery code was unecessary in that the link would
recover from the failure normally by a new link reset sequence
or hotplug of the remote device.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
/drivers/scsi/isci/port.h
34a991587a5cc9f78960c2c9beea217866458c41 01-Jul-2011 Dan Williams <dan.j.williams@intel.com> isci: kill 'get/set' macros

Most of these simple dereference macros are longer than their open coded
equivalent. Deleting enum sci_controller_mode is thrown in for good
measure.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
89a7301f21fb00e753089671eb9e4132aab8ea08 01-Jul-2011 Dan Williams <dan.j.williams@intel.com> isci: retire scic_sds_ and scic_ prefixes

The distinction between scic_sds_ scic_ and sci_ are no longer relevant
so just unify the prefixes on sci_. The distinction between isci_ and
sci_ is historically significant, and useful for comparing the old
'core' to the current Linux driver. 'sci_' represents the former core as
well as the routines that are closer to the hardware and protocol than
their 'isci_' brethren. sci == sas controller interface.

Also unwind the 'sds1' out of the parameter structs.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
d9dcb4ba791de2a06b19ac47cd61601cf3d4e208 01-Jul-2011 Dan Williams <dan.j.williams@intel.com> isci: unify isci_host and scic_sds_controller

Remove the distinction between these two implementations and unify on
isci_host (local instances named ihost). Hmmm, we had two
'oem_parameters' instances, one was unused... nice.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
78a6f06e0e82125787d7aa308fe28c2c8381540c 01-Jul-2011 Dan Williams <dan.j.williams@intel.com> isci: unify isci_remote_device and scic_sds_remote_device

Remove the distinction between these two implementations and unify on
isci_remote_device (local instances named idev).

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
ffe191c92ff195d73f9130b1490045ca2dd4c5e0 29-Jun-2011 Dan Williams <dan.j.williams@intel.com> isci: unify isci_port and scic_sds_port

Remove the distinction between these two implementations and unify on
isci_port (local instances named iport). The duplicate '->owning_port' and
'->isci_port' in both isci_phy and isci_remote_device will be fixed in a later
patch... this is just the straightforward rename/unification.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
852809559e4680ba4768262a6c3d21454fcd460e 29-Jun-2011 Dan Williams <dan.j.williams@intel.com> isci: unify isci_phy and scic_sds_phy

They are one in the same object so remove the distinction. The near
duplicate fields (owning_port, and isci_port) will be cleaned up
after the scic_sds_port isci_port unification.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
5076a1a97e2fa61c847a5fdd4b1991faf7716da6 27-Jun-2011 Dan Williams <dan.j.williams@intel.com> isci: unify isci_request and scic_sds_request

They are one in the same object so remove the distinction. The near
duplicate fields (owning_controller, and isci_host) will be cleaned up
after the scic_sds_contoller isci_host unification.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
312e0c2455c18716cf640d4336dcb1e9e5053818 28-Jun-2011 Dan Williams <dan.j.williams@intel.com> isci: unify can_queue tracking on the tci_pool, uplevel tag assignment

The tci_pool tracks our outstanding command slots which are also the 'index'
portion of our tags. Grabbing the tag early in ->lldd_execute_task let's us
drop the isci_host_can_queue() and ->was_tag_assigned_by_user infrastructure.
->was_tag_assigned_by_user required the task context to be duplicated in
request-local buffer. With the tci established early we can build the
task_context directly into its final location and skip a memcpy.

With the task context buffer at a known address at request construction we
have the opportunity/obligation to also fix sgl handling. This rework feels
like it belongs in another patch but the sgl handling and task_context are too
intertwined.
1/ fix the 'ab' pair embedded in the task context to point to the 'cd' pair in
the task context (previously we were prematurely linking to the staging
buffer).
2/ fix the broken iteration of pio sgls that assumes all sgls are relative to
the request, and does a dangerous looking reverse lookup of physical
address to virtual address.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
61aaff49e20fdb700f1300a49962bc76effc77fc 21-Jun-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com> isci: filter broadcast change notifications during SMP phy resets

When resetting a sata device in the domain we have seen occasions where
libsas prematurely marks a device gone in the time it takes for the
device to re-establish the link. This plays badly with software raid
arrays. Other libsas drivers have non-uniform delays in their reset
handlers to try to cover this condition, but not sufficient to close the
hole. Given that a sata device can take many seconds to recover we
filter bcns and poll for the device reattach state before notifying
libsas that the port needs the domain to be rediscovered. Once this has
been proven out at the lldd level we can think about uplevelling this
feature to a common implementation in libsas.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
[ use kzalloc instead of kmem_cache ]
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
[ use eventq and time macros ]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
e301370ac553a9a0ac0d1d25e769b86cf60395b3 02-Jun-2011 Edmund Nadolski <edmund.nadolski@intel.com> isci: state machine cleanup

This cleans up several areas of the state machine mechanism:

o Rename sci_base_state_machine_change_state to sci_change_state
o Remove sci_base_state_machine_get_state function
o Rename 'state_machine' struct member to 'sm' in client structs
o Shorten the name of request states
o Shorten state machine state names as follows:
SCI_BASE_CONTROLLER_STATE_xxx to SCIC_xxx
SCI_BASE_PHY_STATE_xxx to SCI_PHY_xxx
SCIC_SDS_PHY_STARTING_SUBSTATE_xxx to SCI_PHY_SUB_xxx
SCI_BASE_PORT_STATE_xxx to SCI_PORT_xxx and
SCIC_SDS_PORT_READY_SUBSTATE_xxx to SCI_PORT_SUB_xxx
SCI_BASE_REMOTE_DEVICE_STATE_xxx to SCI_DEV_xxx
SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_xxx to SCI_STP_DEV_xxx
SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_xxx to SCI_SMP_DEV_xxx
SCIC_SDS_REMOTE_NODE_CONTEXT_xxx_STATE to SCI_RNC_xxx

Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
5553ba2be0f3e3741e1a885a33d2b89921f9fd48 19-May-2011 Edmund Nadolski <edmund.nadolski@intel.com> isci: replace isci_timer list with proper embedded timers

Rather than preallocating a list of timers and doling them out at runtime,
embed a struct timerlist in each object that needs one. A struct sci_timer
interface is introduced to manage the timer cancellation semantics which
currently need to guarantee the timer is cancelled while holding
spin_lock(ihost->scic_lock). Since the timeout functions also need to acquire
the lock it currently prevents the driver from using del_timer_sync() for
runtime cancellations.

del_timer_sync() is used however before the objects go out of scope.

Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
6813820c7b892e1a5c2306808a5ccc8a27b7946d 12-May-2011 Dan Williams <dan.j.williams@intel.com> isci: unify port start_io and complete_io handlers

Unify the handlers and kill the state handler infrastructure.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
051266caaeb15719553c5316e3d43b533d3cd5a0 12-May-2011 Piotr Sawicki <piotr.sawicki@intel.com> isci: unify port link_up and link_down handlers

Unify the handlers and kill the state handler implementations.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
13721e186fd31cd8475e635a89383853871fdbf1 12-May-2011 Piotr Sawicki <piotr.sawicki@intel.com> isci: remove port frame and event handlers

Unused infrastructure.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
bd6713b416bbfc7d7180114f7cc543b152cc1725 12-May-2011 Piotr Sawicki <piotr.sawicki@intel.com> isci: unify port reset, add_phy, and remove_phy handlers

Unify the implementations and remove the state handlers.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
e6ec5afde9794f50e60788bd10760fcd0d609252 12-May-2011 Piotr Sawicki <piotr.sawicki@intel.com> isci: remove port destruct handler

The handler was never used.

Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
8bc80d303063d9540493be623df1c9a8dee9ccb8 12-May-2011 Piotr Sawicki <piotr.sawicki@intel.com> isci: unify port stop handlers

Implement the stop handlers directly in scic_sds_port_stop()

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
d76f71d988ef48384593ad97ebc762d9257d96a8 12-May-2011 Piotr Sawicki <piotr.sawicki@intel.com> isci: remove port start handler

remove the handler from the port state handler table and implement the
logic directly in scic_sds_port_start().

Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com>
[remove a level of indirection]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
e91f41ef809a2d1b8cdba52ac380aecd706c93dd 12-May-2011 Piotr Sawicki <piotr.sawicki@intel.com> isci: merge port ready substates into primary state machine

This conversion was complicated by the fact that the ready state exit routine
took unconditional action beyond just stopping the substate machine (like in
previous conversions). In order to ensure identical behaviour every state
transition needs to be instrumented to catch ready-->!ready transitions and
execute scic_sds_port_invalidate_dummy_remote_node()

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com>
[fix ready state exit handling]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
e2f8db509fdd354bb7a68c86515e9d2d8909ccc9 10-May-2011 Dan Williams <dan.j.williams@intel.com> isci: uplevel port infrastructure

* Move port configuration agent implementation
* Merge core/scic_sds_port.[ch] into port.[ch]

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
ce2b3261b6765c3b80fda95426c73e8d3bb1b035 09-May-2011 Dan Williams <dan.j.williams@intel.com> isci: unify constants

cross driver constants are spread out over multiple header files, consolidate
them into isci.h, and push some includes out to the source files that need
them.

TODO: remove SCI_MODE_SIZE infrastructure.
TODO: task.h is full of inlines that are too large

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
e531381e2f8a68b8737c63c7bb890ad80b2470bd 07-May-2011 Dan Williams <dan.j.williams@intel.com> isci: unify port data structures

Make scic_sds_port a member of isci_port and merge their lifetimes which
means removing the port table from scic_sds_controller in favor of the
one at the isci_host level. Merge ihost->sas_ports into ihost->ports.
_
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
cc3dbd0a9178865d4444f8e28b51715808e9ac85 04-May-2011 Artur Wojcik <artur.wojcik@intel.com> isci: unify isci_host data structures

Make it explicit that isci_host and scic_sds_controller are one in the same
object.

Signed-off-by: Artur Wojcik <artur.wojcik@intel.com>
[removed ->ihost back pointer]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
88f3b62ac131e2549b6c262cacbd47e8cca42d6e 23-Apr-2011 Dan Williams <dan.j.williams@intel.com> isci: move remote_device handling out of the core

Now that the core/lldd remote_device data structures are nominally unified
merge the corresponding sources into the top-level directory. Also move the
remote_node_context infrastructure which has no analog at the lldd level.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
4393aa4e6b9517a666f0ef6b774fd421a9dc4c68 31-Mar-2011 Dan Williams <dan.j.williams@intel.com> isci: fix fragile/conditional isci_host lookups

A domain_device can always reference back to ->lldd_ha unlike local lldd
structures. Fix up cases where the driver uses local objects to look up the
isci_host. This also changes the calling conventions of some routines to
expect a valid isci_host parameter rather than re-lookup the pointer on entry.

Incidentally cleans up some macros that are longer to type than the open-coded
equivalent:
isci_host_from_sas_ha
isci_dev_from_domain_dev

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
09d7da135b34bc74a7996b5db373521557ddf3d4 27-Mar-2011 Dave Jiang <dave.jiang@intel.com> isci: Remove event_* calls as they are just wrappers

Removed isci_event_* calls and call those functions directly.

Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
1a38045ba88ed3bee6c57444670fb639c8b61be7 04-Mar-2011 Dan Williams <dan.j.williams@intel.com> isci: replace remote_device_lock with scic_lock

The remote_device_lock is currently used to protect a controller global
resource (RNCs), but the remote_device_lock is per-port.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
8acaec1593526f922ff46812d99abf9aab5c8b43 07-Mar-2011 Dan Williams <dan.j.williams@intel.com> isci: kill "host quiesce" mechanism

The midlayer is already throttling i/o in the places where host_quiesce
was trying to prevent further i/o to the device. It's also problematic
in that it holds a lock over GFP_KERNEL allocations.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h
6f231dda68080759f1aed3769896e94c73099f0f 03-Jul-2011 Dan Williams <dan.j.williams@intel.com> isci: Intel(R) C600 Series Chipset Storage Control Unit Driver

Support for the up to 2x4-port 6Gb/s SAS controllers embedded in the
chipset.

This is a snapshot of the first publicly available version of the driver,
commit 4c1db2d0 in the 'historical' branch.

git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci.git historical

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
/drivers/scsi/isci/port.h