Commit 865e35a2 authored by James Bottomley's avatar James Bottomley

qla2xxx - Use RIO mode 4 for ISP2100/ISP2200 operation. [3/3]

From: 	Andrew Vasquez <andrew.vasquez@qlogic.com>

RIO mode 3 (originally used in the qla2xxx driver) will not work on
big-endian platforms due to the firmware returning only the first-word
of the dword command handle returned after SCSI completion.  Use RIO
mode 4 since full 32bit handle is returned during status.

I've recently added an IBM p630 machine (ppc64) to my test ring with a
mix of 2200 and 2300 cards -- I feel fairly confident that most endian
type issues are addressed.
parent 738c6448
......@@ -1399,7 +1399,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
icb->firmware_options[0] &= ~BIT_3;
icb->add_firmware_options[0] &=
~(BIT_3 | BIT_2 | BIT_1 | BIT_0);
icb->add_firmware_options[0] |= (BIT_1 | BIT_0);
icb->add_firmware_options[0] |= BIT_2;
icb->response_accumulation_timer = 3;
icb->interrupt_delay_timer = 5;
......
......@@ -283,10 +283,13 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint32_t mbx)
switch (mb[0]) {
case MBA_SCSI_COMPLETION:
if (IS_QLA2100(ha) || IS_QLA2200(ha))
handles[0] = RD_MAILBOX_REG(ha, reg, 1);
handles[0] = le32_to_cpu(
((uint32_t)(RD_MAILBOX_REG(ha, reg, 2) << 16)) |
RD_MAILBOX_REG(ha, reg, 1));
else
handles[0] = MSW(mbx);
handles[0] |= (uint32_t)(RD_MAILBOX_REG(ha, reg, 2) << 16);
handles[0] = le32_to_cpu(
((uint32_t)(RD_MAILBOX_REG(ha, reg, 2) << 16)) |
MSW(mbx));
handle_cnt = 1;
break;
case MBA_CMPLT_1_16BIT:
......@@ -328,9 +331,11 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint32_t mbx)
mb[0] = MBA_SCSI_COMPLETION;
break;
case MBA_CMPLT_2_32BIT:
handles[0] = (uint32_t)((RD_MAILBOX_REG(ha, reg, 2) << 16) |
handles[0] = le32_to_cpu(
((uint32_t)(RD_MAILBOX_REG(ha, reg, 2) << 16)) |
RD_MAILBOX_REG(ha, reg, 1));
handles[1] = (uint32_t)((RD_MAILBOX_REG(ha, reg, 7) << 16) |
handles[1] = le32_to_cpu(
((uint32_t)(RD_MAILBOX_REG(ha, reg, 7) << 16)) |
RD_MAILBOX_REG(ha, reg, 6));
handle_cnt = 2;
mb[0] = MBA_SCSI_COMPLETION;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment