kernel-fxtec-pro1x/drivers/scsi/isci
Dan Williams 209fae14fa isci: atomic device lookup and reference counting
We have unsafe references to remote devices that are notified to
disappear at lldd_dev_gone.  In order to clean this up we need a single
canonical source for device lookups and stable references once a lookup
succeeds.  Towards that end guarantee that domain_device.lldd_dev is
NULL as soon as we start the process of stopping a device.  Any code
path that wants to safely lookup a remote device must do so through
task->dev->lldd_dev (isci_lookup_device()).

For in-flight references outside of scic_lock we need reference counting
to ensure that the device is not recycled before we are done with it.
Simplify device back references to just scic_sds_request.target_device
which is now the only permissible internal reference that is maintained
relative to the reference count.

There were two occasions where we wanted new i/o's to be treated as
SAS_TASK_UNDELIVERED but where the domain_dev->lldd_dev link is still
intact.  Introduce a 'gone' flag to prevent i/o while waiting for libsas
to take action on the port down event.

One 'core' leftover is that we currently call
scic_remote_device_destruct() from isci_remote_device_deconstruct()
which is called when the 'core' says the device is stopped.  It would be
more natural for the final put to trigger
isci_remote_device_deconstruct() but this implementation is deferred as
it requires other changes.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2011-07-03 04:04:51 -07:00
..
firmware isci: Added support for C0 to SCU Driver 2011-07-03 04:04:50 -07:00
host.c isci: atomic device lookup and reference counting 2011-07-03 04:04:51 -07:00
host.h isci: cleanup/optimize queue increment macros 2011-07-03 04:04:51 -07:00
init.c isci: Added support for C0 to SCU Driver 2011-07-03 04:04:50 -07:00
isci.h isci: cleanup/optimize queue increment macros 2011-07-03 04:04:51 -07:00
Makefile isci: additional state machine cleanup 2011-07-03 04:04:50 -07:00
phy.c isci: Disable link layer hang detection 2011-07-03 04:04:50 -07:00
phy.h isci: additional state machine cleanup 2011-07-03 04:04:50 -07:00
port.c isci: atomic device lookup and reference counting 2011-07-03 04:04:51 -07:00
port.h isci: filter broadcast change notifications during SMP phy resets 2011-07-03 04:04:50 -07:00
port_config.c isci: state machine cleanup 2011-07-03 04:04:50 -07:00
probe_roms.c isci: Added support for C0 to SCU Driver 2011-07-03 04:04:50 -07:00
probe_roms.h isci: Retrieve the EFI variable for OEM parameter 2011-07-03 04:04:50 -07:00
registers.h isci: uplevel register hardware data structures and unsolicited frame handling 2011-07-03 04:04:47 -07:00
remote_device.c isci: atomic device lookup and reference counting 2011-07-03 04:04:51 -07:00
remote_device.h isci: atomic device lookup and reference counting 2011-07-03 04:04:51 -07:00
remote_node_context.c isci: Explicitly decode remote node ready and suspended states 2011-07-03 04:04:50 -07:00
remote_node_context.h isci: additional state machine cleanup 2011-07-03 04:04:50 -07:00
remote_node_table.c isci: uplevel request infrastructure 2011-07-03 04:04:47 -07:00
remote_node_table.h isci: unify constants 2011-07-03 04:04:47 -07:00
request.c isci: atomic device lookup and reference counting 2011-07-03 04:04:51 -07:00
request.h isci: atomic device lookup and reference counting 2011-07-03 04:04:51 -07:00
sas.h isci: removing intel_*.h headers 2011-07-03 04:04:46 -07:00
sata.c isci: atomic device lookup and reference counting 2011-07-03 04:04:51 -07:00
sata.h isci: Convert ATA defines to Linux native defines 2011-07-03 04:04:46 -07:00
scu_completion_codes.h isci: uplevel register hardware data structures and unsolicited frame handling 2011-07-03 04:04:47 -07:00
scu_event_codes.h isci: uplevel register hardware data structures and unsolicited frame handling 2011-07-03 04:04:47 -07:00
scu_remote_node_context.h isci: move remote_device handling out of the core 2011-07-03 04:00:38 -07:00
scu_task_context.h isci: uplevel register hardware data structures and unsolicited frame handling 2011-07-03 04:04:47 -07:00
scu_unsolicited_frame.h isci: uplevel register hardware data structures and unsolicited frame handling 2011-07-03 04:04:47 -07:00
task.c isci: atomic device lookup and reference counting 2011-07-03 04:04:51 -07:00
task.h isci: atomic device lookup and reference counting 2011-07-03 04:04:51 -07:00
unsolicited_frame_control.c isci: cleanup/optimize queue increment macros 2011-07-03 04:04:51 -07:00
unsolicited_frame_control.h isci: remove 'min memory' infrastructure 2011-07-03 04:04:50 -07:00