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 <fthain@telegraphics.com.au>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Finn Thain 2017-01-15 18:50:57 -05:00 committed by Martin K. Petersen
parent b15e791d0c
commit 546a4d1812

View File

@ -682,7 +682,8 @@ static int atari_scsi_bus_reset(struct scsi_cmnd *cmd)
if (IS_A_TT()) { if (IS_A_TT()) {
tt_scsi_dma.dma_ctrl = 0; tt_scsi_dma.dma_ctrl = 0;
} else { } 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_active = 0;
atari_dma_orig_addr = NULL; atari_dma_orig_addr = NULL;
} }