summaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
authorKashyap, Desai <kashyap.desai@lsi.com>2009-05-29 16:56:59 +0530
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-09 17:45:10 -0500
commitdb7051b2984d2c7d44b6178ad4c523500dff7f7c (patch)
tree5a6a97bf57a9b94f9f2ca710781393722b195553 /drivers/message/fusion/mptscsih.c
parent57e985136bfafdfcd72c4c7d91115955d225677e (diff)
downloadblackbird-op-linux-db7051b2984d2c7d44b6178ad4c523500dff7f7c.tar.gz
blackbird-op-linux-db7051b2984d2c7d44b6178ad4c523500dff7f7c.zip
[SCSI] mpt fusion: Added support for Broadcast primitives Event handling
Firmware is able to handle Broadcast primitives, but upstream driver does not have support for broadcast primitive handling. Now this patch is mainly to support broadcast primitives. Signed-off-by: Kashyap Desai <kadesai@lsi.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index cf1aba18a09f..96681203d4a9 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -80,6 +80,7 @@ MODULE_VERSION(my_VERSION);
/*
* Other private/forward protos...
*/
+struct scsi_cmnd *mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i);
static struct scsi_cmnd * mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i);
static void mptscsih_set_scsi_lookup(MPT_ADAPTER *ioc, int i, struct scsi_cmnd *scmd);
static int SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, struct scsi_cmnd *scmd);
@@ -2419,6 +2420,26 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR
}
}
+/**
+ * mptscsih_get_scsi_lookup - retrieves scmd entry
+ * @ioc: Pointer to MPT_ADAPTER structure
+ * @i: index into the array
+ *
+ * Returns the scsi_cmd pointer
+ */
+struct scsi_cmnd *
+mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i)
+{
+ unsigned long flags;
+ struct scsi_cmnd *scmd;
+
+ spin_lock_irqsave(&ioc->scsi_lookup_lock, flags);
+ scmd = ioc->ScsiLookup[i];
+ spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags);
+
+ return scmd;
+}
+EXPORT_SYMBOL(mptscsih_get_scsi_lookup);
/**
* mptscsih_getclear_scsi_lookup
OpenPOWER on IntegriCloud