Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2230eac authored by Matthew Wilcox's avatar Matthew Wilcox Committed by
Browse files

[SCSI] sym2: Mask off opcode from RBC



pm->sg.size is set from the Residual Byte Count register.  However,
the upper byte of the RBC is the opcode of the instruction that was
executing, so we need to mask it off.  This fixes some spurious rejects
of IGNORE WIDE RESIDUE messages.

Signed-off-by: default avatarMatthew Wilcox <matthew@wil.cx>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 61c41823
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3588,7 +3588,7 @@ static int sym_evaluate_dp(struct sym_hcb *np, struct sym_ccb *cp, u32 scr, int

	if (pm) {
		dp_scr  = scr_to_cpu(pm->ret);
		dp_ofs -= scr_to_cpu(pm->sg.size);
		dp_ofs -= scr_to_cpu(pm->sg.size) & 0x00ffffff;
	}

	/*