Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.tw
Signed-off-by: ching Huang <ching2048@areca.com.tw>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

ching Huang and committed by
Martin K. Petersen
5b864496 311e87b7

+6 -2
+6 -2
drivers/scsi/arcmsr/arcmsr_hba.c
··· 1923 1923 1924 1924 if (ccb->arc_cdb_size <= 0x300) 1925 1925 arc_cdb_size = (ccb->arc_cdb_size - 1) >> 6 | 1; 1926 - else 1927 - arc_cdb_size = (((ccb->arc_cdb_size + 0xff) >> 8) + 2) << 1 | 1; 1926 + else { 1927 + arc_cdb_size = ((ccb->arc_cdb_size + 0xff) >> 8) + 2; 1928 + if (arc_cdb_size > 0xF) 1929 + arc_cdb_size = 0xF; 1930 + arc_cdb_size = (arc_cdb_size << 1) | 1; 1931 + } 1928 1932 ccb_post_stamp = (ccb->smid | arc_cdb_size); 1929 1933 writel(0, &pmu->inbound_queueport_high); 1930 1934 writel(ccb_post_stamp, &pmu->inbound_queueport_low);