Commit 2124c5b2 authored by Ching Huang's avatar Ching Huang Committed by Martin K. Petersen

scsi: arcmsr: Fix clear doorbell queue on ACB_ADAPTER_TYPE_B

Fix clear doorbell queue on ACB_ADAPTER_TYPE_B controller.
Signed-off-by: default avatarChing Huang <ching2048@areca.com.tw>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b416c099
...@@ -4196,10 +4196,19 @@ static void arcmsr_clear_doorbell_queue_buffer(struct AdapterControlBlock *acb) ...@@ -4196,10 +4196,19 @@ static void arcmsr_clear_doorbell_queue_buffer(struct AdapterControlBlock *acb)
case ACB_ADAPTER_TYPE_B: { case ACB_ADAPTER_TYPE_B: {
struct MessageUnit_B *reg = acb->pmuB; struct MessageUnit_B *reg = acb->pmuB;
/*clear interrupt and message state*/ uint32_t outbound_doorbell, i;
writel(ARCMSR_MESSAGE_INT_CLEAR_PATTERN, reg->iop2drv_doorbell); writel(ARCMSR_DOORBELL_INT_CLEAR_PATTERN, reg->iop2drv_doorbell);
writel(ARCMSR_DRV2IOP_DATA_READ_OK, reg->drv2iop_doorbell); writel(ARCMSR_DRV2IOP_DATA_READ_OK, reg->drv2iop_doorbell);
/* let IOP know data has been read */ /* let IOP know data has been read */
for(i=0; i < 200; i++) {
msleep(20);
outbound_doorbell = readl(reg->iop2drv_doorbell);
if( outbound_doorbell & ARCMSR_IOP2DRV_DATA_WRITE_OK) {
writel(ARCMSR_DOORBELL_INT_CLEAR_PATTERN, reg->iop2drv_doorbell);
writel(ARCMSR_DRV2IOP_DATA_READ_OK, reg->drv2iop_doorbell);
} else
break;
}
} }
break; break;
case ACB_ADAPTER_TYPE_C: { case ACB_ADAPTER_TYPE_C: {
......
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