Commit 5b864496 authored by ching Huang's avatar ching Huang Committed by Martin K. Petersen

scsi: arcmsr: Fix the wrong CDB payload report to IOP

This patch fixes the wrong CDB payload report to IOP.

Link: https://lore.kernel.org/r/d2c97df3c817595c6faf582839316209022f70da.camel@areca.com.twSigned-off-by: default avatarching Huang <ching2048@areca.com.tw>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 311e87b7
...@@ -1923,8 +1923,12 @@ static void arcmsr_post_ccb(struct AdapterControlBlock *acb, struct CommandContr ...@@ -1923,8 +1923,12 @@ static void arcmsr_post_ccb(struct AdapterControlBlock *acb, struct CommandContr
if (ccb->arc_cdb_size <= 0x300) if (ccb->arc_cdb_size <= 0x300)
arc_cdb_size = (ccb->arc_cdb_size - 1) >> 6 | 1; arc_cdb_size = (ccb->arc_cdb_size - 1) >> 6 | 1;
else else {
arc_cdb_size = (((ccb->arc_cdb_size + 0xff) >> 8) + 2) << 1 | 1; 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); ccb_post_stamp = (ccb->smid | arc_cdb_size);
writel(0, &pmu->inbound_queueport_high); writel(0, &pmu->inbound_queueport_high);
writel(ccb_post_stamp, &pmu->inbound_queueport_low); writel(ccb_post_stamp, &pmu->inbound_queueport_low);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment