mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 05:12:49 +00:00
scsi: arcmsr: Fix the wrong CDB payload report to IOP
[ Upstream commit 5b8644968d
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
22d22fef9c
commit
4d395142d9
1 changed files with 6 additions and 2 deletions
|
@ -1928,8 +1928,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);
|
||||
|
|
Loading…
Reference in a new issue