Skip to content

Commit 31a0865

Browse files
alexhenriemartinkpetersen
authored andcommitted
scsi: ppa: Fix accidentally reversed conditions for 16-bit and 32-bit EPP
The conditions were correct in the ppa_in() function but not in the ppa_out() function. Fixes: 68a4f84 ("scsi: ppa: Add a module parameter for the transfer mode") Signed-off-by: Alex Henrie <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 0b0747d commit 31a0865

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/ppa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ static int ppa_out(ppa_struct *dev, char *buffer, int len)
307307
case PPA_EPP_8:
308308
epp_reset(ppb);
309309
w_ctr(ppb, 0x4);
310-
if (dev->mode == PPA_EPP_32 && !(((long) buffer | len) & 0x01))
310+
if (dev->mode == PPA_EPP_32 && !(((long) buffer | len) & 0x03))
311311
outsl(ppb + 4, buffer, len >> 2);
312-
else if (dev->mode == PPA_EPP_16 && !(((long) buffer | len) & 0x03))
312+
else if (dev->mode == PPA_EPP_16 && !(((long) buffer | len) & 0x01))
313313
outsw(ppb + 4, buffer, len >> 1);
314314
else
315315
outsb(ppb + 4, buffer, len);

0 commit comments

Comments
 (0)