]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
scsi: hisi_sas: Drop hisi_sas_slot_abort()
authorJohn Garry <john.garry@huawei.com>
Wed, 18 Jul 2018 14:14:25 +0000 (22:14 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
BugLink: https://bugs.launchpad.net/bugs/1810457
For some time now we have not used hisi_sas_slot_abort() to handle erroring
slots, apart from in archaic v1 hw.

As such, remove this function and associated code. For v1 hw, move error
handling to same scheme as other hw revisions, where we allow erroring
commands to timeout.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 4e32b2f48427ea57743e4bdf9765076133b565ca)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/scsi/hisi_sas/hisi_sas.h
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c

index 0ecb56d4d04a17609650fb19b10a5d388fd965e4..6c7d2e201abed7ec29e96bea97852ad8f3812a23 100644 (file)
@@ -204,7 +204,6 @@ struct hisi_sas_slot {
        int     ready;
        void    *cmd_hdr;
        dma_addr_t cmd_hdr_dma;
-       struct work_struct abort_slot;
        struct timer_list internal_abort_timer;
        bool is_internal;
        struct hisi_sas_tmf_task *tmf;
index cd272078c51f374eb7b9b7ff132596f7a11d7147..a4e2e6aa9a6b8c9ea1ecda64dfde666f6e3efb6b 100644 (file)
@@ -281,40 +281,6 @@ static void hisi_sas_task_prep_abort(struct hisi_hba *hisi_hba,
                        device_id, abort_flag, tag_to_abort);
 }
 
-/*
- * This function will issue an abort TMF regardless of whether the
- * task is in the sdev or not. Then it will do the task complete
- * cleanup and callbacks.
- */
-static void hisi_sas_slot_abort(struct work_struct *work)
-{
-       struct hisi_sas_slot *abort_slot =
-               container_of(work, struct hisi_sas_slot, abort_slot);
-       struct sas_task *task = abort_slot->task;
-       struct hisi_hba *hisi_hba = dev_to_hisi_hba(task->dev);
-       struct scsi_cmnd *cmnd = task->uldd_task;
-       struct hisi_sas_tmf_task tmf_task;
-       struct scsi_lun lun;
-       struct device *dev = hisi_hba->dev;
-       int tag = abort_slot->idx;
-
-       if (!(task->task_proto & SAS_PROTOCOL_SSP)) {
-               dev_err(dev, "cannot abort slot for non-ssp task\n");
-               goto out;
-       }
-
-       int_to_scsilun(cmnd->device->lun, &lun);
-       tmf_task.tmf = TMF_ABORT_TASK;
-       tmf_task.tag_of_task_to_be_managed = cpu_to_le16(tag);
-
-       hisi_sas_debug_issue_ssp_tmf(task->dev, lun.scsi_lun, &tmf_task);
-out:
-       /* Do cleanup for this task */
-       hisi_sas_slot_task_free(hisi_hba, task, abort_slot);
-       if (task->task_done)
-               task->task_done(task);
-}
-
 static int hisi_sas_task_prep(struct sas_task *task,
                              struct hisi_sas_dq **dq_pointer,
                              bool is_tmf, struct hisi_sas_tmf_task *tmf,
@@ -452,7 +418,6 @@ static int hisi_sas_task_prep(struct sas_task *task,
        slot->tmf = tmf;
        slot->is_internal = is_tmf;
        task->lldd_task = slot;
-       INIT_WORK(&slot->abort_slot, hisi_sas_slot_abort);
 
        memset(slot->cmd_hdr, 0, sizeof(struct hisi_sas_cmd_hdr));
        memset(hisi_sas_cmd_hdr_addr_mem(slot), 0, HISI_SAS_COMMAND_TABLE_SZ);
index 98ffe1aeeff67f85e819ba159c59fdbc0bf92c9e..8f60f0e0459960616faf1849739632ad2e7c01b2 100644 (file)
@@ -1301,11 +1301,8 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba,
                !(cmplt_hdr_data & CMPLT_HDR_RSPNS_XFRD_MSK)) {
 
                slot_err_v1_hw(hisi_hba, task, slot);
-               if (unlikely(slot->abort)) {
-                       queue_work(hisi_hba->wq, &slot->abort_slot);
-                       /* immediately return and do not complete */
+               if (unlikely(slot->abort))
                        return ts->stat;
-               }
                goto out;
        }