* [PATCH] scsi: ppa: Fix accidentally reversed conditions for 16-bit and 32-bit EPP
@ 2023-08-31 5:19 Alex Henrie
2023-09-05 9:27 ` Martin K. Petersen
2023-09-14 1:40 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Alex Henrie @ 2023-08-31 5:19 UTC (permalink / raw)
To: linux-scsi, linux-parport, martin.petersen; +Cc: Alex Henrie
The conditions were correct in the ppa_in function but not in the
ppa_out function.
Fixes: 68a4f84a17c1 ("scsi: ppa: Add a module parameter for the transfer mode")
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
---
drivers/scsi/ppa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index 19f0b93fa3d8..d592ee9170c1 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -307,9 +307,9 @@ static int ppa_out(ppa_struct *dev, char *buffer, int len)
case PPA_EPP_8:
epp_reset(ppb);
w_ctr(ppb, 0x4);
- if (dev->mode == PPA_EPP_32 && !(((long) buffer | len) & 0x01))
+ if (dev->mode == PPA_EPP_32 && !(((long) buffer | len) & 0x03))
outsl(ppb + 4, buffer, len >> 2);
- else if (dev->mode == PPA_EPP_16 && !(((long) buffer | len) & 0x03))
+ else if (dev->mode == PPA_EPP_16 && !(((long) buffer | len) & 0x01))
outsw(ppb + 4, buffer, len >> 1);
else
outsb(ppb + 4, buffer, len);
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ppa: Fix accidentally reversed conditions for 16-bit and 32-bit EPP
2023-08-31 5:19 [PATCH] scsi: ppa: Fix accidentally reversed conditions for 16-bit and 32-bit EPP Alex Henrie
@ 2023-09-05 9:27 ` Martin K. Petersen
2023-09-14 1:40 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-09-05 9:27 UTC (permalink / raw)
To: Alex Henrie; +Cc: linux-scsi, linux-parport, martin.petersen
Alex,
> The conditions were correct in the ppa_in function but not in the
> ppa_out function.
Applied to 6.6/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: ppa: Fix accidentally reversed conditions for 16-bit and 32-bit EPP
2023-08-31 5:19 [PATCH] scsi: ppa: Fix accidentally reversed conditions for 16-bit and 32-bit EPP Alex Henrie
2023-09-05 9:27 ` Martin K. Petersen
@ 2023-09-14 1:40 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2023-09-14 1:40 UTC (permalink / raw)
To: linux-scsi, linux-parport, Alex Henrie; +Cc: Martin K . Petersen
On Wed, 30 Aug 2023 23:19:42 -0600, Alex Henrie wrote:
> The conditions were correct in the ppa_in function but not in the
> ppa_out function.
>
>
Applied to 6.6/scsi-fixes, thanks!
[1/1] scsi: ppa: Fix accidentally reversed conditions for 16-bit and 32-bit EPP
https://git.kernel.org/mkp/scsi/c/31a0865bf593
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-14 1:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31 5:19 [PATCH] scsi: ppa: Fix accidentally reversed conditions for 16-bit and 32-bit EPP Alex Henrie
2023-09-05 9:27 ` Martin K. Petersen
2023-09-14 1:40 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).