From: Finn Thain Date: Sun, 15 Jan 2017 23:50:57 +0000 (-0500) Subject: scsi: atari_scsi: Reset DMA during bus reset only under ST-DMA lock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=546a4d1812b647fddad58a4416c7a44c27bb0499;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scsi: atari_scsi: Reset DMA during bus reset only under ST-DMA lock The atari_scsi driver should not access Falcon DMA chip registers unless it has acquired exclusive access to that chip. If the driver doesn't have exclusive access then there's no need for a DMA reset as there are no scsi commands in progress. Signed-off-by: Finn Thain Tested-by: Ondrej Zary Tested-by: Michael Schmitz Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index b2ffab6577a6..f792420c533e 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c @@ -682,7 +682,8 @@ static int atari_scsi_bus_reset(struct scsi_cmnd *cmd) if (IS_A_TT()) { tt_scsi_dma.dma_ctrl = 0; } else { - st_dma.dma_mode_status = 0x90; + if (stdma_is_locked_by(scsi_falcon_intr)) + st_dma.dma_mode_status = 0x90; atari_dma_active = 0; atari_dma_orig_addr = NULL; }