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

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

parent 311e87b7
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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);