Skip to contentSkip to conversation

mpt fusion: [2.6.30-rc6]Added support for Broadcast primitives Event handling

PATCH In review Kashyap, Desai 2 participants 2 messages May 22, 2009 – May 27, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index 4f3d4c3..1c8514d 100644
@@ -758,6 +758,7 @@ typedef struct _MPT_ADAPTER
 	struct 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
index 508e8bb..841d396 100644
@@ -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
index a472977..77f021e 100644
@@ -133,4 +133,5 @@ extern int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int
 extern 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);
maintainer
#1 lore raw
Quoted 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