Message ID | d2c97df3c817595c6faf582839316209022f70da.camel@areca.com.tw |
---|---|
State | New |
Headers | show |
Series | [1/2] scsi: arcmsr: fixed the wrong cdb payload report to IOP | expand |
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
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);