2021-04-16 04:29:04

by Ching Huang

[permalink] [raw]
Subject: [PATCH 1/2] scsi: arcmsr: fixed the wrong cdb payload report to IOP

From: ching Huang <[email protected]>

This patch fixed the wrong cdb payload report to IOP.

Signed-off-by: ching Huang <[email protected]>
---

diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
index 4b79661..930972c 100644
--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -1923,8 +1923,12 @@ static void arcmsr_post_ccb(struct AdapterControlBlock *acb, struct CommandContr

if (ccb->arc_cdb_size <= 0x300)
arc_cdb_size = (ccb->arc_cdb_size - 1) >> 6 | 1;
- else
- arc_cdb_size = (((ccb->arc_cdb_size + 0xff) >> 8) + 2) << 1 | 1;
+ else {
+ arc_cdb_size = ((ccb->arc_cdb_size + 0xff) >> 8) + 2;
+ if (arc_cdb_size > 0xF)
+ arc_cdb_size = 0xF;
+ arc_cdb_size = (arc_cdb_size << 1) | 1;
+ }
ccb_post_stamp = (ccb->smid | arc_cdb_size);
writel(0, &pmu->inbound_queueport_high);
writel(ccb_post_stamp, &pmu->inbound_queueport_low);


2021-05-11 03:27:23

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH 1/2] scsi: arcmsr: fixed the wrong cdb payload report to IOP

On Fri, 16 Apr 2021 11:44:57 +0800, ching Huang wrote:

> This patch fixed the wrong cdb payload report to IOP.

Applied to 5.14/scsi-queue, thanks!

[1/2] scsi: arcmsr: fixed the wrong cdb payload report to IOP
https://git.kernel.org/mkp/scsi/c/5b8644968d2c

--
Martin K. Petersen Oracle Linux Engineering