ncr5380: Fix pseudo DMA transfers on 53C400
authorOndrej Zary <linux@rainbow-software.org>
Sun, 3 Jan 2016 05:06:14 +0000 (16:06 +1100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 7 Jan 2016 02:43:10 +0000 (21:43 -0500)
commitf03946210d67be9a33ad63f6a0eed7cdf8c28334
tree2ddf4785f0e09ce9109a1f0f4d2821c3a8bab60a
parent3d07d22b3d475ba9b0adfe083c537ee1ada034c8
ncr5380: Fix pseudo DMA transfers on 53C400

Pseudo-DMA (PDMA) has been broken for ages, resulting in hangs on
53C400-based cards.

According to 53C400 datasheet, PDMA transfer length must be a multiple
of 128. Check if that's true and use PIO if it's not.

This makes PDMA work on 53C400 (Canon FG2-5202).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/g_NCR5380.c