Skip to content

Commit 965c77a

Browse files
Saurav KashyapJames Bottomley
authored andcommitted
[SCSI] qla2xxx: Properly handle 32 bit mailbox register for ISPFX00.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1 parent 1ca60e3 commit 965c77a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/scsi/qla2xxx/qla_mr.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,9 +2916,9 @@ qlafx00_async_event(scsi_qla_host_t *vha)
29162916
break;
29172917

29182918
case QLAFX00_MBA_PORT_UPDATE: /* Port database update */
2919-
ha->aenmb[1] = RD_REG_WORD(&reg->aenmailbox1);
2920-
ha->aenmb[2] = RD_REG_WORD(&reg->aenmailbox2);
2921-
ha->aenmb[3] = RD_REG_WORD(&reg->aenmailbox3);
2919+
ha->aenmb[1] = RD_REG_DWORD(&reg->aenmailbox1);
2920+
ha->aenmb[2] = RD_REG_DWORD(&reg->aenmailbox2);
2921+
ha->aenmb[3] = RD_REG_DWORD(&reg->aenmailbox3);
29222922
ql_dbg(ql_dbg_async, vha, 0x5077,
29232923
"Asynchronous port Update received "
29242924
"aenmb[0]: %x, aenmb[1]: %x, aenmb[2]: %x, aenmb[3]: %x\n",
@@ -2975,7 +2975,7 @@ static void
29752975
qlafx00_mbx_completion(scsi_qla_host_t *vha, uint32_t mb0)
29762976
{
29772977
uint16_t cnt;
2978-
uint16_t __iomem *wptr;
2978+
uint32_t __iomem *wptr;
29792979
struct qla_hw_data *ha = vha->hw;
29802980
struct device_reg_fx00 __iomem *reg = &ha->iobase->ispfx00;
29812981

@@ -2985,10 +2985,10 @@ qlafx00_mbx_completion(scsi_qla_host_t *vha, uint32_t mb0)
29852985
/* Load return mailbox registers. */
29862986
ha->flags.mbox_int = 1;
29872987
ha->mailbox_out32[0] = mb0;
2988-
wptr = (uint16_t __iomem *)&reg->mailbox17;
2988+
wptr = (uint32_t __iomem *)&reg->mailbox17;
29892989

29902990
for (cnt = 1; cnt < ha->mbx_count; cnt++) {
2991-
ha->mailbox_out32[cnt] = RD_REG_WORD(wptr);
2991+
ha->mailbox_out32[cnt] = RD_REG_DWORD(wptr);
29922992
wptr++;
29932993
}
29942994
}

0 commit comments

Comments
 (0)