summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/atari_scsi.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2014-11-12 06:12:21 +0100
committerChristoph Hellwig <hch@lst.de>2014-11-20 09:11:20 +0100
commita53a21e4662fd2ed27863f511715898459312393 (patch)
treeb770b830e1ab4843ae4f0e8139b0a02c69f0606c /drivers/scsi/atari_scsi.c
parentatari_NCR5380: Move static TagAlloc array to host data (diff)
downloadlinux-a53a21e4662fd2ed27863f511715898459312393.tar.xz
linux-a53a21e4662fd2ed27863f511715898459312393.zip
atari_NCR5380: Move static co-routine variables to host data
Unlike NCR5380.c, the atari_NCR5380.c core driver is limited to a single instance because co-routine state is stored globally. Fix this by removing the static scsi host pointer. For the co-routine, obtain this pointer from the work_struct pointer instead. For the interrupt handler, obtain it from the dev_id argument. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.de> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/atari_scsi.c')
-rw-r--r--drivers/scsi/atari_scsi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c
index b69010604699..d1c37a386947 100644
--- a/drivers/scsi/atari_scsi.c
+++ b/drivers/scsi/atari_scsi.c
@@ -110,7 +110,7 @@
#define NCR5380_dma_xfer_len(instance, cmd, phase) \
atari_dma_xfer_len(cmd->SCp.this_residual, cmd, !((phase) & SR_IO))
-#define NCR5380_acquire_dma_irq(instance) falcon_get_lock()
+#define NCR5380_acquire_dma_irq(instance) falcon_get_lock(instance)
#define NCR5380_release_dma_irq(instance) falcon_release_lock()
#include "NCR5380.h"
@@ -468,15 +468,15 @@ static void falcon_release_lock(void)
* command immediately but tell the SCSI mid-layer to defer.
*/
-static int falcon_get_lock(void)
+static int falcon_get_lock(struct Scsi_Host *instance)
{
if (IS_A_TT())
return 1;
if (in_interrupt())
- return stdma_try_lock(scsi_falcon_intr, NULL);
+ return stdma_try_lock(scsi_falcon_intr, instance);
- stdma_lock(scsi_falcon_intr, NULL);
+ stdma_lock(scsi_falcon_intr, instance);
return 1;
}