linux-stable/arch/m68k/atari
Finn Thain 16b29e75a7 atari_scsi: Fix atari_scsi deadlocks on Falcon
Don't disable irqs when waiting for the ST DMA "lock"; its release may
require an interrupt.

Introduce stdma_try_lock() for use in soft irq context. atari_scsi now tells
the SCSI mid-layer to defer queueing a command if the ST DMA lock is not
available, as per Michael's patch:
http://marc.info/?l=linux-m68k&m=139095335824863&w=2

The falcon_got_lock variable is race prone: we can't disable IRQs while
waiting to acquire the lock, so after acquiring it there must be some
interval during which falcon_got_lock remains false. Introduce
stdma_is_locked_by() to replace falcon_got_lock.

The falcon_got_lock tests in the EH handlers are incorrect these days. It
can happen that an EH handler is called after a command completes normally.
Remove these checks along with falcon_got_lock.

Also remove the complicated and racy fairness wait queues. If fairness is an
issue (when SCSI competes with IDE for the ST DMA interrupt), the solution
is likely to be a lower value for host->can_queue.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-20 09:11:13 +01:00
..
ataints.c m68k: atari: Fix the last kernel_stat.h fallout 2014-03-20 12:40:30 +01:00
atakeyb.c input/atari: Use the correct mouse interrupt hook 2011-05-19 18:19:11 +02:00
atasound.c Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
config.c m68k/UAPI: Use proper types (endianness/size) in <asm/bootinfo*.h> 2013-11-26 11:09:21 +01:00
debug.c m68k/amiga,atari: Fix specifying multiple debug= parameters 2013-12-08 11:03:21 +01:00
Makefile m68k: Remove the broken Hades support 2008-10-14 10:23:27 -07:00
stdma.c atari_scsi: Fix atari_scsi deadlocks on Falcon 2014-11-20 09:11:13 +01:00
stram.c m68k/atari - stram: Add missing #include <linux/ioport.h> 2014-09-14 11:51:35 +02:00
time.c m68k: set arch_gettimeoffset directly 2012-12-24 09:36:34 -07:00