aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.h
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsi.com>2007-09-29 12:16:53 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:52:15 -0400
commite8206381f5842269691f3164ec0d79b7059bd710 (patch)
tree4d3db0df57f86b34425dcfe929c940d8d06fe614 /drivers/message/fusion/mptbase.h
parentbc6e089a13a5c0ac36247616baecd6fc77405e7f (diff)
[SCSI] mpt fusion: lock down ScsiLookup
ScsiLookup is an array of pending scmd pointers that the scsi lld maintains. This array is touched from queuecommand, eh threads, and interrupt context. This array should put under locks, hence this patch to synchronize its access. I've added some nice little function wrappers for this, and moved the ScsiLookup array over to MPT_ADAPTER struct. Signed-off-by: Eric Moore <Eric.Moore@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptbase.h')
-rw-r--r--drivers/message/fusion/mptbase.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 945656438e71..eb65c493ce0a 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -704,6 +704,8 @@ typedef struct _MPT_ADAPTER
704 struct work_struct fc_rescan_work; 704 struct work_struct fc_rescan_work;
705 char fc_rescan_work_q_name[KOBJ_NAME_LEN]; 705 char fc_rescan_work_q_name[KOBJ_NAME_LEN];
706 struct workqueue_struct *fc_rescan_work_q; 706 struct workqueue_struct *fc_rescan_work_q;
707 struct scsi_cmnd **ScsiLookup;
708 spinlock_t scsi_lookup_lock;
707} MPT_ADAPTER; 709} MPT_ADAPTER;
708 710
709/* 711/*
@@ -817,7 +819,6 @@ typedef struct _MPT_SCSI_HOST {
817 MPT_ADAPTER *ioc; 819 MPT_ADAPTER *ioc;
818 int port; 820 int port;
819 u32 pad0; 821 u32 pad0;
820 struct scsi_cmnd **ScsiLookup;
821 MPT_LOCAL_REPLY *pLocal; /* used for internal commands */ 822 MPT_LOCAL_REPLY *pLocal; /* used for internal commands */
822 struct timer_list timer; 823 struct timer_list timer;
823 /* Pool of memory for holding SCpnts before doing 824 /* Pool of memory for holding SCpnts before doing