Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: arcmsr: Fix doorbell status being updated late on ARC-1886

It is possible for the IOP to be delayed in updating the doorbell
status. The doorbell status should not be 0 so loop until the value
changes.

Link: https://lore.kernel.org/r/afdfdf7eabecf14632492c4987a6b9ac6312a7ad.camel@areca.com.tw
Signed-off-by: ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

ching Huang and committed by
Martin K. Petersen
d9a23122 2a38d2a8

+9 -2
+9 -2
drivers/scsi/arcmsr/arcmsr_hba.c
··· 2419 2419 2420 2420 static void arcmsr_hbaE_doorbell_isr(struct AdapterControlBlock *pACB) 2421 2421 { 2422 - uint32_t outbound_doorbell, in_doorbell, tmp; 2422 + uint32_t outbound_doorbell, in_doorbell, tmp, i; 2423 2423 struct MessageUnit_E __iomem *reg = pACB->pmuE; 2424 2424 2425 - in_doorbell = readl(&reg->iobound_doorbell); 2425 + if (pACB->adapter_type == ACB_ADAPTER_TYPE_F) { 2426 + for (i = 0; i < 5; i++) { 2427 + in_doorbell = readl(&reg->iobound_doorbell); 2428 + if (in_doorbell != 0) 2429 + break; 2430 + } 2431 + } else 2432 + in_doorbell = readl(&reg->iobound_doorbell); 2426 2433 outbound_doorbell = in_doorbell ^ pACB->in_doorbell; 2427 2434 do { 2428 2435 writel(0, &reg->host_int_status); /* clear interrupt */