scsi: hpsa: add controller checkpoint
authorDon Brace <don.brace@microsemi.com>
Fri, 20 Oct 2017 21:51:26 +0000 (16:51 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 25 Oct 2017 08:55:18 +0000 (04:55 -0400)
Tell hpsa controller to generate a checkpoint for rare lockup
conditions.

Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hpsa.c
drivers/scsi/hpsa_cmd.h

index 0330f17c8feb1d91fd0b3bf285437da5a3e1be1e..9c491c50709254f81eb1b7735fb632b122013382 100644 (file)
@@ -8009,6 +8009,10 @@ static void controller_lockup_detected(struct ctlr_info *h)
        spin_unlock_irqrestore(&h->lock, flags);
        dev_warn(&h->pdev->dev, "Controller lockup detected: 0x%08x after %d\n",
                        lockup_detected, h->heartbeat_sample_interval / HZ);
+       if (lockup_detected == 0xffff0000) {
+               dev_warn(&h->pdev->dev, "Telling controller to do a CHKPT\n");
+               writel(DOORBELL_GENERATE_CHKPT, h->vaddr + SA5_DOORBELL);
+       }
        pci_disable_device(h->pdev);
        fail_all_outstanding_cmds(h);
 }
index 078afe448115d5399399e2047996f6477dea548d..78c3b64b0b97144c74d501d6cb4030347c49e7cf 100644 (file)
 #define DOORBELL_CTLR_RESET    0x00000004l
 #define DOORBELL_CTLR_RESET2   0x00000020l
 #define DOORBELL_CLEAR_EVENTS  0x00000040l
+#define DOORBELL_GENERATE_CHKPT        0x00000080l
 
 #define CFGTBL_Trans_Simple     0x00000002l
 #define CFGTBL_Trans_Performant 0x00000004l