Skip to contentSkip to conversation

be2iscsi: Adding support for various Async messages from chip

PATCH In review Jayamohan Kallickal 2 participants 2 messages Nov 24, 2009 – Nov 26, 2009

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

PATCH 1/1 be2iscsi: Adding support for various Async messages from chip

This patch allows for future addition of various async messages
from the chip. This ensures that the driver won't hit a BUG_ON if the Firmware used is newer than inbox driver and so is using latest async messages.

The patch was built on the latest tree at
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git

---
 drivers/scsi/be2iscsi/be_cmds.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
drivers/scsi/be2iscsi/be_cmds.c +9 -5
index 698a527..bbd3632 100644
@@ -135,11 +135,15 @@ int beiscsi_process_mcc(struct beiscsi_hba *phba)
 	while ((compl = be_mcc_compl_get(phba))) {
 		if (compl->flags & CQE_FLAGS_ASYNC_MASK) {
 			/* Interpret flags as an async trailer */
-			BUG_ON(!is_link_state_evt(compl->flags));
-
-			/* Interpret compl as a async link evt */
-			beiscsi_async_link_state_process(phba,
-				(struct be_async_event_link_state *) compl);
+			if(is_link_state_evt(compl->flags))
+				/* Interpret compl as a async link evt */
+				beiscsi_async_link_state_process(phba,
+				   (struct be_async_event_link_state *) compl);
+			else
+				SE_DEBUG(DBG_LVL_1,
+					 " Unsupported Async Event, flags"
+					 " = 0x%08x \n", compl->flags);
+				
 		} else if (compl->flags & CQE_FLAGS_COMPLETED_MASK) {
 				status = be_mcc_compl_process(ctrl, compl);
 				atomic_dec(&phba->ctrl.mcc_obj.q.used);
Signature · 1 line
1.6.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines · Jayamohan Kallickal

This patch allows for future addition of various async messages
from the chip. This ensures that the driver won't hit a BUG_ON if the Firmware used is newer than inbox driver and so is using latest async messages.

The patch was built on the latest tree at
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git

---
 drivers/scsi/be2iscsi/be_cmds.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
drivers/scsi/be2iscsi/be_cmds.c +2 -5
index 698a527..bbd3632 100644
@@ -135,11 +135,15 @@ int beiscsi_process_mcc(struct beiscsi_hba *phba)
 	while ((compl = be_mcc_compl_get(phba))) {
 		if (compl->flags & CQE_FLAGS_ASYNC_MASK) {
 			/* Interpret flags as an async trailer */
-			BUG_ON(!is_link_state_evt(compl->flags));
-
-			/* Interpret compl as a async link evt */
-			beiscsi_async_link_state_process(phba,
-				(struct be_async_event_link_state *) compl);
+			if(is_link_state_evt(compl->flags))
+				/* Interpret compl as a async link evt */

drivers/scsi/be2iscsi/be_cmds.c int beiscsi_process_mcc(struct beiscsi_hba *phba) · line 149

Quoted 10 lines
drivers/scsi/be2iscsi/be_cmds.c +7 -0
+				beiscsi_async_link_state_process(phba,
+				   (struct be_async_event_link_state *) compl);
+			else
+				SE_DEBUG(DBG_LVL_1,
+					 " Unsupported Async Event, flags"
+					 " = 0x%08x \n", compl->flags);
+				
 		} else if (compl->flags & CQE_FLAGS_COMPLETED_MASK) {
 				status = be_mcc_compl_process(ctrl, compl);
 				atomic_dec(&phba->ctrl.mcc_obj.q.used);

Patch looks fine. It just adds some whitespace on a line. When you send your patches you might want to run it through git-am --whitespace=fix before sending to make sure they are all fixed.