summaryrefslogtreecommitdiff
path: root/drivers/scsi/NCR5380.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2014-11-12 16:12:20 +1100
committerChristoph Hellwig <hch@lst.de>2014-11-20 09:11:19 +0100
commit61d739a4976424af0d2a62d8e8d0b2159702fb45 (patch)
tree1a65ddf3e88a58b794cfdf7e2ad4bb7ffeabdd0a /drivers/scsi/NCR5380.h
parentca513fc948e66ecdd3c75cca9371762bb4c06776 (diff)
downloadlinux-rpi-61d739a4976424af0d2a62d8e8d0b2159702fb45.tar.gz
linux-rpi-61d739a4976424af0d2a62d8e8d0b2159702fb45.tar.bz2
linux-rpi-61d739a4976424af0d2a62d8e8d0b2159702fb45.zip
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 <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/NCR5380.h')
-rw-r--r--drivers/scsi/NCR5380.h12
1 files changed, 12 insertions, 0 deletions
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;