[SCSI] qla2xxx: Use the correct mailbox registers when acknowledging an IDC request...
authorChad Dupuis <chad.dupuis@qlogic.com>
Wed, 30 Oct 2013 07:38:23 +0000 (03:38 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 19 Dec 2013 15:39:00 +0000 (07:39 -0800)
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla2xxx/qla_isr.c

index 0b1b297712eecb6e42017e2eb99cb5bba7666c47..8e420e2027818cc118b9846a5c3e8d52677702e1 100644 (file)
@@ -298,11 +298,18 @@ qla81xx_idc_event(scsi_qla_host_t *vha, uint16_t aen, uint16_t descr)
                { "Complete", "Request Notification", "Time Extension" };
        int rval;
        struct device_reg_24xx __iomem *reg24 = &vha->hw->iobase->isp24;
+       struct device_reg_82xx __iomem *reg82 = &vha->hw->iobase->isp82;
        uint16_t __iomem *wptr;
        uint16_t cnt, timeout, mb[QLA_IDC_ACK_REGS];
 
        /* Seed data -- mailbox1 -> mailbox7. */
-       wptr = (uint16_t __iomem *)&reg24->mailbox1;
+       if (IS_QLA81XX(vha->hw) || IS_QLA83XX(vha->hw))
+               wptr = (uint16_t __iomem *)&reg24->mailbox1;
+       else if (IS_QLA8044(vha->hw))
+               wptr = (uint16_t __iomem *)&reg82->mailbox_out[1];
+       else
+               return;
+
        for (cnt = 0; cnt < QLA_IDC_ACK_REGS; cnt++, wptr++)
                mb[cnt] = RD_REG_WORD(wptr);