From 61d739a4976424af0d2a62d8e8d0b2159702fb45 Mon Sep 17 00:00:00 2001 From: Finn Thain Date: Wed, 12 Nov 2014 16:12:20 +1100 Subject: atari_NCR5380: Move static TagAlloc array to host data The atari_NCR5380.c core driver keeps some per-host data in a static variable which limits the driver to a single instance. Fix this by moving TagAlloc to the hostdata struct. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz Signed-off-by: Christoph Hellwig --- drivers/scsi/NCR5380.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/scsi/NCR5380.h') diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h index 2fafe1d54fb8..a6946f2d1dc0 100644 --- a/drivers/scsi/NCR5380.h +++ b/drivers/scsi/NCR5380.h @@ -245,6 +245,15 @@ #define FLAG_TAGGED_QUEUING 64 /* as X3T9.2 spelled it */ #ifndef ASM + +#ifdef SUPPORT_TAGS +struct tag_alloc { + DECLARE_BITMAP(allocated, MAX_TAGS); + int nr_allocated; + int queue_size; +}; +#endif + struct NCR5380_hostdata { NCR5380_implementation_fields; /* implementation specific */ struct Scsi_Host *host; /* Host backpointer */ @@ -274,6 +283,9 @@ struct NCR5380_hostdata { int read_overruns; /* number of bytes to cut from a * transfer to handle chip overruns */ int retain_dma_intr; +#ifdef SUPPORT_TAGS + struct tag_alloc TagAlloc[8][8]; /* 8 targets and 8 LUNs */ +#endif #ifdef PSEUDO_DMA unsigned spin_max_r; unsigned spin_max_w; -- cgit v1.2.3