mpt fusion: [2.6.30-rc6]Added support for Broadcast primitives Event handling
Subsystems (2)
PATCH 22/24 mpt fusion: [2.6.30-rc6]Added support for Broadcast primitives Event handling
Firware 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.
---
---
drivers/message/fusion/mptbase.h +1 -0
@@ -758,6 +758,7 @@ typedef struct _MPT_ADAPTERstruct scsi_cmnd **ScsiLookup;spinlock_t scsi_lookup_lock;u64 dma_mask; +u32 broadcast_aen_busy;char reset_work_q_name[MPT_KOBJ_NAME_LEN ];struct workqueue_struct *reset_work_q;struct delayed_work fault_reset_work;
drivers/message/fusion/mptsas.c +207 -0
237 lines not on this page · raw message
drivers/message/fusion/mptscsih.c +25 -0
@@ -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);
@@ -2420,6 +2421,30 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR } } +/** +* mptscsih_get_scsi_lookup +* +* retrieves scmd entry from ScsiLookup[] array list +* +* @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
drivers/message/fusion/mptscsih.h +1 -0
@@ -133,4 +133,5 @@ extern int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, intextern u8 mptscsih_raid_id_to_num (MPT_ADAPTER *ioc,u8 channel,u8 id);extern int mptscsih_is_phys_disk (MPT_ADAPTER *ioc,u8 channel,u8 id);extern struct device_attribute *mptscsih_host_attrs[]; +extern struct scsi_cmnd *mptscsih_get_scsi_lookup (MPT_ADAPTER *ioc,int i);extern void mptscsih_taskmgmt_response_code (MPT_ADAPTER *ioc,u8 response_code);
James Bottomley
maintainerQuoted 7 lines · Desai
drivers/message/fusion/mptsas.c +3
-0@@ -4314,6 +4333,182 @@ mptsas_send_raid_event(struct fw_event_work *fw_event)mptsas_free_fw_event (ioc, fw_event); } +/** +* mptsas_issue_tm - send mptsas internal tm request +* @ioc: Pointer to MPT_ADAPTER structure
drivers/message/fusion/mptsas.c mptsas_send_raid_event(struct fw_event_work *fw_event) · line 4348
Quoted 10 lines
drivers/message/fusion/mptsas.c +10
-0+* @type +* @channel +* @id +* @lun +* @task_context +* @timeout +* +* return: +* +**/
That's not really very descriptive, is it?
drivers/message/fusion/mptscsih.c mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR · line 2434
Quoted 11 lines
drivers/message/fusion/mptscsih.c +11
-0+/** +* mptscsih_get_scsi_lookup +* +* retrieves scmd entry from ScsiLookup[] array list +* +* @ioc: Pointer to MPT_ADAPTER structure +* @i: index into the array +* +* Returns the scsi_cmd pointer +* +**/
This is nicely descriptive, but it isn't legal docbook. That should be
/**
* mptscsih_get_scsi_lookup - retrieve scmd entry from ScsiLookup[] array list
* @ioc: Pointer to MPT_ADAPTER structure
* @i: index into the array
etc...
Nor is this:
drivers/message/fusion/mptsas.c mptsas_send_raid_event(struct fw_event_work *fw_event) · line 4422
Quoted 6 lines
drivers/message/fusion/mptsas.c +6
-0+/** +* mptsas_broadcast_primative_work - Work queue thread to handle +* broadcast primitive events +* @work: work queue payload containing info describing the event +* +**/
The initial description needs to be all on one line, not split across two.
James
James