projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
311e87b
)
scsi: arcmsr: Fix the wrong CDB payload report to IOP
author
ching Huang
<ching2048@areca.com.tw>
Fri, 16 Apr 2021 03:44:57 +0000
(11:44 +0800)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Mon, 10 May 2021 17:25:10 +0000
(13:25 -0400)
This patch fixes the wrong CDB payload report to IOP.
Link:
https://lore.kernel.org/r/d2c97df3c817595c6faf582839316209022f70da.camel@areca.com.tw
Signed-off-by: ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/arcmsr/arcmsr_hba.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/arcmsr/arcmsr_hba.c
b/drivers/scsi/arcmsr/arcmsr_hba.c
index 4b79661275c904ecd8dc6b5dfc0f8124ea3a6c88..930972cda38c4d431a187cc505d14339422654ae 100644
(file)
--- 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);