[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <afdfdf7eabecf14632492c4987a6b9ac6312a7ad.camel@areca.com.tw>
Date: Thu, 20 May 2021 14:55:15 +0800
From: ching Huang <ching2048@...ca.com.tw>
To: martin.petersen@...cle.com, James.Bottomley@...senPartnership.com,
linux-scsi@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/2] scsi: arcmsr: fix doorbell status may arrived late on
ARC-1886
From: ching Huang <ching2048@...ca.com.tw>
This patch fix the doorbell status coming from IOP may late.
The doorbell status value should not be 0.
Signed-off-by: ching Huang <ching2048@...ca.com.tw>
---
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index 930972c..98e3d57 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -2419,10 +2419,18 @@ static void arcmsr_hbaD_doorbell_isr(struct AdapterControlBlock *pACB)
static void arcmsr_hbaE_doorbell_isr(struct AdapterControlBlock *pACB)
{
- uint32_t outbound_doorbell, in_doorbell, tmp;
+ uint32_t outbound_doorbell, in_doorbell, tmp, i;
struct MessageUnit_E __iomem *reg = pACB->pmuE;
- in_doorbell = readl(®->iobound_doorbell);
+ if (pACB->adapter_type == ACB_ADAPTER_TYPE_F) {
+ for (i = 0; i < 5; i++) {
+ in_doorbell = readl(®->iobound_doorbell);
+ if (in_doorbell != 0)
+ break;
+ }
+ }
+ else
+ in_doorbell = readl(®->iobound_doorbell);
outbound_doorbell = in_doorbell ^ pACB->in_doorbell;
do {
writel(0, ®->host_int_status); /* clear interrupt */
Powered by blists - more mailing lists