]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: g_NCR5380: End PDMA transfer correctly on target disconnection
authorOndrej Zary <linux@rainbow-software.org>
Mon, 3 Jul 2017 07:59:05 +0000 (03:59 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 7 Aug 2017 18:04:00 +0000 (14:04 -0400)
commit744d6a660801ab435e645fd80ccd9469c7e6e12e
treec2ce36bb7471f10c4681e50d5809fba8383832ab
parentb0e4c57909e96f5e0fc9b7222c7c468296c50948
scsi: g_NCR5380: End PDMA transfer correctly on target disconnection

When an IRQ arrives during PDMA transfer, pread() and pwrite() return
without waiting for the 53C80 registers to be ready and this ends up
messing up the chip state. This was observed with SONY CDU-55S which is
slow enough to disconnect during 4096-byte reads.

IRQ during PDMA is not an error so don't return -1. Instead, store the
remaining byte count for use by NCR5380_dma_residual().

[Poll for the BASR_END_DMA_TRANSFER condition rather than remove the
error message -- F.T.]

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