All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] scsi: arcmsr: fix doorbell status may arrived late on ARC-1886
@ 2021-05-20  6:55 ching Huang
  2021-05-26  4:07 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: ching Huang @ 2021-05-20  6:55 UTC (permalink / raw)
  To: martin.petersen, James.Bottomley, linux-scsi, Linux Kernel Mailing List

From: ching Huang <ching2048@areca.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@areca.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(&reg->iobound_doorbell);
+	if (pACB->adapter_type == ACB_ADAPTER_TYPE_F) {
+		for (i = 0; i < 5; i++) {
+			in_doorbell = readl(&reg->iobound_doorbell);
+			if (in_doorbell != 0)
+				break;
+		}
+	}
+	else
+		in_doorbell = readl(&reg->iobound_doorbell);
 	outbound_doorbell = in_doorbell ^ pACB->in_doorbell;
 	do {
 		writel(0, &reg->host_int_status); /* clear interrupt */


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] scsi: arcmsr: fix doorbell status may arrived late on ARC-1886
  2021-05-20  6:55 [PATCH 1/2] scsi: arcmsr: fix doorbell status may arrived late on ARC-1886 ching Huang
@ 2021-05-26  4:07 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2021-05-26  4:07 UTC (permalink / raw)
  To: James.Bottomley, linux-scsi, Linux Kernel Mailing List, ching Huang
  Cc: Martin K . Petersen

On Thu, 20 May 2021 14:55:15 +0800, ching Huang wrote:

> This patch fix the doorbell status coming from IOP may late.
> The doorbell status value should not be 0.

Applied to 5.14/scsi-queue, thanks!

[1/2] scsi: arcmsr: fix doorbell status may arrived late on ARC-1886
      https://git.kernel.org/mkp/scsi/c/d9a231226f28

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-26  4:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20  6:55 [PATCH 1/2] scsi: arcmsr: fix doorbell status may arrived late on ARC-1886 ching Huang
2021-05-26  4:07 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.