Merge tag 'nfs-for-5.7-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[linux-2.6-microblaze.git] / drivers / scsi / dpt_i2o.c
index abc74fd..02dff3a 100644 (file)
@@ -8,7 +8,7 @@
                           July 30, 2001 First version being submitted
                           for inclusion in the kernel.  V2.4
 
-    See Documentation/scsi/dpti.txt for history, notes, license info
+    See Documentation/scsi/dpti.rst for history, notes, license info
     and credits
  ***************************************************************************/
 
@@ -817,7 +817,7 @@ static int adpt_hba_reset(adpt_hba* pHba)
        }
        pHba->state &= ~DPTI_STATE_RESET;
 
-       adpt_fail_posted_scbs(pHba);
+       scsi_host_complete_all_commands(pHba->host, DID_RESET);
        return 0;       /* return success */
 }
 
@@ -2173,7 +2173,7 @@ static irqreturn_t adpt_isr(int irq, void *dev_id)
                                                 readl(reply + 12) - 1);
                        if(cmd != NULL){
                                scsi_dma_unmap(cmd);
-                               adpt_i2o_to_scsi(reply, cmd);
+                               adpt_i2o_scsi_complete(reply, cmd);
                        }
                }
                writel(m, pHba->reply_port);
@@ -2335,13 +2335,12 @@ static s32 adpt_scsi_host_alloc(adpt_hba* pHba, struct scsi_host_template *sht)
        host->unique_id = (u32)sys_tbl_pa + pHba->unit;
        host->sg_tablesize = pHba->sg_tablesize;
        host->can_queue = pHba->post_fifo_size;
-       host->use_cmd_list = 1;
 
        return 0;
 }
 
 
-static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
+static void adpt_i2o_scsi_complete(void __iomem *reply, struct scsi_cmnd *cmd)
 {
        adpt_hba* pHba;
        u32 hba_status;
@@ -2459,7 +2458,6 @@ static s32 adpt_i2o_to_scsi(void __iomem *reply, struct scsi_cmnd* cmd)
        if(cmd->scsi_done != NULL){
                cmd->scsi_done(cmd);
        } 
-       return cmd->result;
 }
 
 
@@ -2647,23 +2645,6 @@ static s32 adpt_i2o_reparse_lct(adpt_hba* pHba)
        return 0;
 }
 
-static void adpt_fail_posted_scbs(adpt_hba* pHba)
-{
-       struct scsi_cmnd*       cmd = NULL;
-       struct scsi_device*     d = NULL;
-
-       shost_for_each_device(d, pHba->host) {
-               unsigned long flags;
-               spin_lock_irqsave(&d->list_lock, flags);
-               list_for_each_entry(cmd, &d->cmd_list, list) {
-                       cmd->result = (DID_OK << 16) | (QUEUE_FULL <<1);
-                       cmd->scsi_done(cmd);
-               }
-               spin_unlock_irqrestore(&d->list_lock, flags);
-       }
-}
-
-
 /*============================================================================
  *  Routines from i2o subsystem
  *============================================================================