diff options
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 21 |
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); | |||
80 | /* | 80 | /* |
81 | * Other private/forward protos... | 81 | * Other private/forward protos... |
82 | */ | 82 | */ |
83 | struct scsi_cmnd *mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i); | ||
83 | static struct scsi_cmnd * mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i); | 84 | static struct scsi_cmnd * mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i); |
84 | static void mptscsih_set_scsi_lookup(MPT_ADAPTER *ioc, int i, struct scsi_cmnd *scmd); | 85 | static void mptscsih_set_scsi_lookup(MPT_ADAPTER *ioc, int i, struct scsi_cmnd *scmd); |
85 | static int SCPNT_TO_LOOKUP_IDX(MPT_ADAPTER *ioc, struct scsi_cmnd *scmd); | 86 | 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 | |||
2419 | } | 2420 | } |
2420 | } | 2421 | } |
2421 | 2422 | ||
2423 | /** | ||
2424 | * mptscsih_get_scsi_lookup - retrieves scmd entry | ||
2425 | * @ioc: Pointer to MPT_ADAPTER structure | ||
2426 | * @i: index into the array | ||
2427 | * | ||
2428 | * Returns the scsi_cmd pointer | ||
2429 | */ | ||
2430 | struct scsi_cmnd * | ||
2431 | mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i) | ||
2432 | { | ||
2433 | unsigned long flags; | ||
2434 | struct scsi_cmnd *scmd; | ||
2435 | |||
2436 | spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); | ||
2437 | scmd = ioc->ScsiLookup[i]; | ||
2438 | spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); | ||
2439 | |||
2440 | return scmd; | ||
2441 | } | ||
2442 | EXPORT_SYMBOL(mptscsih_get_scsi_lookup); | ||
2422 | 2443 | ||
2423 | /** | 2444 | /** |
2424 | * mptscsih_getclear_scsi_lookup | 2445 | * mptscsih_getclear_scsi_lookup |