History log of /linux-master/drivers/scsi/isci/task.h
Revision Date Author Comments
# 25882c82 17-Feb-2022 John Garry <john.garry@huawei.com>

scsi: libsas: Delete lldd_clear_aca callback

This callback is never called, so remove support.

Link: https://lore.kernel.org/r/1645112566-115804-4-git-send-email-john.garry@huawei.com
Tested-by: Yihang Li <liyihang6@hisilicon.com>
Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 814818fd 07-Oct-2021 Bart Van Assche <bvanassche@acm.org>

scsi: isci: Remove a declaration

There is no function with the name isci_queuecommand(). Hence remove the
declaration for isci_queuecommand().

Link: https://lore.kernel.org/r/20211007204618.2196847-12-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>


# 79855d17 05-Nov-2014 Christoph Hellwig <hch@lst.de>

libsas: remove task_collector mode

The task_collector mode (or "latency_injector", (C) Dan Willians) is an
optional I/O path in libsas that queues up scsi commands instead of
directly sending it to the hardware. It generall increases latencies
to in the optiomal case slightly reduce mmio traffic to the hardware.

Only the obsolete aic94xx driver and the mvsas driver allowed to use
it without recompiling the kernel, and most drivers didn't support it
at all.

Remove the giant blob of code to allow better optimizations for scsi-mq
in the future.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Dan Williams <dan.j.williams@intel.com>


# 14aaa9f0 08-Mar-2012 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

isci: Redesign device suspension, abort, cleanup.

This commit changes the means by which outstanding I/Os are handled
for cleanup.
The likelihood is that this commit will be broken into smaller pieces,
however that will be a later revision. Among the changes:

- All completion structures have been removed from the tmf and
abort paths.
- Now using one completed I/O list, with the I/O completed in host bit being
used to select error or normal callback paths.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# 6a719391 08-Dec-2011 Dan Williams <dan.j.williams@intel.com>

[SCSI] isci: remove bus and reset handlers

Remove ->eh_device_reset_handler() and ->eh_bus_reset_handler() for the
same reason they are not implemented for libata hosts, they cannot be
implemented reliably with ata-eh. ATA error recovery wants to divert
all resets to the eh thread and wait for completion, these handlers may
be invoked from a non-blocking ioctl.

The other path they are called from is libsas-eh, and if we escalate
past I_T_nexus reset we have larger problems i.e. tear down all
in-flight commands in the domain potentially without notification to the
lldd if it has chosen not to implement ->lldd_clear_nexus_port() /
->lldd_clear_nexus_ha().

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 43a5ab15 09-Dec-2011 Dan Williams <dan.j.williams@intel.com>

[SCSI] isci: stop interpreting ->lldd_lu_reset() as an ata soft-reset

Driving resets from libsas-eh is pre-mature as libata will make a
decision about performing a softreset. Currently libata determines
whether to perform a softreset based on ata_eh_followup_srst_needed(),
and none of those conditions apply to isci.

Remove the srst implementation and translate ->lldd_lu_reset() for ata
devices as a request to drive a reset via libata-eh.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 312d3e56 17-Nov-2011 Dan Williams <dan.j.williams@intel.com>

[SCSI] libsas: remove ata_port.lock management duties from lldds

Each libsas driver (mvsas, pm8001, and isci) has invented a different
method for managing the ap->lock. The lock is held by the ata
->queuecommand() path. mvsas drops it prior to acquiring any internal
locks which allows it to hold its internal lock across calls to
task->task_done(). This capability is important as it is the only way
the driver can flush task->task_done() instances to guarantee that it no
longer has any in-flight references to a domain_device at
->lldd_dev_gone() time.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 27234ab4 04-Jan-2012 Maciej Trela <maciej.trela@intel.com>

[SCSI] isci: remove unused 'isci_tmf->device' field

As the field was never set, isci_print_tmf() using 'isci_tmf->device'
sometimes causes a kernel crash if the dev_dbg() statement is enabled.
Remove the unused field both from isci_tmf struct definition and from
isci_print_tmf()

Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>


# 98145cb7 27-Oct-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

[SCSI] isci: Fix task management for SMP, SATA and on dev remove.

libsas uses the LLDD abort task interface to handle I/O timeouts
in the SATA/STP and SMP discovery paths, so this change will terminate
STP/SMP requests. Also, if the device is gone, the lldd will prevent
libsas from further escalations in the error handler.

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>


# b343dff1 27-Oct-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

[SCSI] isci: Handle task request timeouts correctly.

In the case where "task" requests timeout (note that this class of
requests can also include SATA/STP soft reset FIS transmissions),
handle the case where the task was being managed by some call to
terminate the task request by completing both the tmf and the aborting
process.

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>


# cd06b9ba 28-Sep-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

[SCSI] isci: SATA/STP I/O is only returned in the normal path to libsas

Since libsas has it's own means to escalate SATA/STP device error
handling depending on task status codes, return all SATA/STP I/O
on the normal path.

i.e. skip sas_task_abort() and let sas_ata_task_done() disposition the
qc. Longer term we want to audit non-essential calls to
sas_task_abort().

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>


# 16ba7709 01-Jul-2011 Dan Williams <dan.j.williams@intel.com>

isci: merge sata.[ch] into request.c

Undo some needless separation.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# 209fae14 13-Jun-2011 Dan Williams <dan.j.williams@intel.com>

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>


# 360b03ed 15-Jun-2011 Dan Williams <dan.j.williams@intel.com>

isci: fix ssp response iu buffer size in isci_tmf

In isci_task_request_complete() we save the response/sense data from the
command. Make sure isci_tmf has enough space to hold the full response.

[ it does not look like we actually use this data, and
response_data_len/sense_data_len should be specifying the byte count,
in any event do the simple fix first so we don't corrupt memory ]

Reported-by: Adam Gruchala <adam.gruchala@intel.com>
Tested-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# cde76fbf 20-Jun-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

isci: Add decode for SMP request retry error condition

There are situations with slow expanders in which a first attempt
to execute an SMP request will fail with a timeout. Immediate
subsequent retries will generally succeed. This change makes sure
SMP I/O failures are immediately failed to libsas so that retries
happen with no discovery process timeout delay.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# fd18388b 18-May-2011 Edmund Nadolski <edmund.nadolski@intel.com>

isci: Remove tmf timeout_timer

Replace the timeout_timer in the isci_tmf with a call to
wait_for_completion_timeout

Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# ce2b3261 08-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>


# cc3dbd0a 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>


# 5b3f2bd8 05-May-2011 Dan Williams <dan.j.williams@intel.com>

isci: fix ata locking

Upstream commit a29b5dad "libata: fix locking for sas paths" switched
libsas ata locking to the ata_host lock. We need to do the same when
returning ata tasks from the execute path.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# af5ae893 04-May-2011 Dave Jiang <dave.jiang@intel.com>

isci: Convert of sci_ssp_response_iu to ssp_response_iu

Converting to Linux native format. However the isci driver does a lot of
the calculation based on the max size of this data structure and the
Linux data structure only has a pointer to the response data. Thus the
sizeof(struct ssp_response_iu) will be incorrect and we need to define
the max size.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# ed8a72d1 31-Mar-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

isci: Qualify when the host lock is managed for STP/SATA callbacks.

In the case of internal discovery related STP/SATA I/O started
through sas_execute_task the host lock is not taken by libsas before
calling lldd_execute_task, so the lock should not be managed before
calling back to libsas through task->task_done or sas_task_abort.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# 35173d57 26-Mar-2011 Dan Williams <dan.j.williams@intel.com>

isci: namespacecheck cleanups

* mark needlessly global routines static
* delete unused functions
* move kernel-doc blocks from header files to source
* reorder some functions to delete declarations
* more default handler cleanups phy

Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# ce0b89f3 17-Mar-2011 Dan Williams <dan.j.williams@intel.com>

isci: task.h compile and checkpatch fixes

A usage of "FALSE" leaked in as well as some checkpatch escapes.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# aa145102 07-Mar-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

isci: Always set response/status for requests going into the error path.

In the case of I/O requests being failed because of a required device
reset condition, set the response and status to indicate an I/O failure.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# 50e7f9b5 09-Mar-2011 Dan Williams <dan.j.williams@intel.com>

isci: Errors in the submit path for SATA devices manage the ap lock.

Since libsas takes the domain device sata_dev.ap->lock before submitting
a task, error completions in the submit path for SATA devices must
unlock/relock when completing the sas_task back to libsas.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# c3f42feb 04-Mar-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

isci: Fix TMF build for SAS/SATA LUN reset cases.

In the case where a SAS or SATA LUN reset TMF is built a NULL pointer
dereference occurred because of the (unused) callback data pointer.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com>


# 1fad9e93 04-Mar-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

isci: save the i/o tag outside the scic request structure.

The pointer to the core representation of a request is marked NULL at
completion, but we need to save the i/o tag for task management.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com>
[revise changelog]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# ec6c9638 04-Mar-2011 Jeff Skirvin <jeffrey.d.skirvin@intel.com>

isci: Any reset indicated on an I/O completion escalates it to the error path.

If there is a pending device reset, the I/O is used to accomplish the reset by setting the
RESET bit in the task status, and then putting the task into the error handler
path using sas abort task.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>


# 6f231dda 02-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>