diff options
author | John Garry <john.garry@huawei.com> | 2016-08-24 14:05:47 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-08-26 05:38:53 +0300 |
commit | 441c27401470c417cf4a33ab9c17bcefdf1ecca3 (patch) | |
tree | 010221d4afff074a893c9e577514b28a16bfbcc3 /drivers/scsi/hisi_sas/hisi_sas.h | |
parent | 108c8670df99dd689494c0ba981b5e82c863caf2 (diff) | |
download | linux-441c27401470c417cf4a33ab9c17bcefdf1ecca3.tar.xz |
scsi: hisi_sas: add internal abort main code
Add main code for internal abort functionality.
The internal abort features allows the host controller to abort commands
which are still active in the controller but have not yet been sent to
the slave device.
Typically a command only spends a relatively short time in the
controller when compared to the amount of the time after it is sent to
the slave device.
Two modes of internal abort are supported:
- device
- individual command
For device, when the internal abort is issued all commands in the host
for that device are aborted. For a single command, only that command is
aborted if it is still in the host.
In HW the internal abort command is executed similar to any other sort
of command, like SSP.
Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas.h')
-rw-r--r-- | drivers/scsi/hisi_sas/hisi_sas.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 4731d3241323..83113600721c 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -56,6 +56,11 @@ enum dev_status { HISI_SAS_DEV_EH, }; +enum { + HISI_SAS_INT_ABT_CMD = 0, + HISI_SAS_INT_ABT_DEV = 1, +}; + enum hisi_sas_dev_type { HISI_SAS_DEV_TYPE_STP = 0, HISI_SAS_DEV_TYPE_SSP, @@ -146,6 +151,9 @@ struct hisi_sas_hw { struct hisi_sas_slot *slot); int (*prep_stp)(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot); + int (*prep_abort)(struct hisi_hba *hisi_hba, + struct hisi_sas_slot *slot, + int device_id, int abort_flag, int tag_to_abort); int (*slot_complete)(struct hisi_hba *hisi_hba, struct hisi_sas_slot *slot, int abort); void (*phy_enable)(struct hisi_hba *hisi_hba, int phy_no); |