Skip to contentSkip to conversation

be2iscsi: Removing BUG_ON for async messages

PATCH In review Jayamohan Kallickal 1 participant 1 message Dec 4, 2009

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

PATCH 13/15 be2iscsi: Removing BUG_ON for async messages

This patch removes BUG_ON when non Link Status
is reported as Async messages

---
 drivers/scsi/be2iscsi/be_cmds.c |   11 +++++++----
 drivers/scsi/be2iscsi/be_cmds.h |    2 ++
 2 files changed, 9 insertions(+), 4 deletions(-)
drivers/scsi/be2iscsi/be_cmds.c +7 -4
index 9d80729..9701de6 100644
@@ -199,11 +199,14 @@ 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,
+			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);
drivers/scsi/be2iscsi/be_cmds.h +2 -0
index 9b9f78a..69dddfa 100644
@@ -454,6 +454,8 @@ int be_cmd_iscsi_post_sgl_pages(struct be_ctrl_info *ctrl,
 int be_cmd_wrbq_create(struct be_ctrl_info *ctrl, struct be_dma_mem *q_mem,
 		       struct be_queue_info *wrbq);
 
+bool is_link_state_evt(u32 trailer);
+
 struct be_default_pdu_context {
 	u32 dw[4];
 } __packed;
Signature · 1 line
1.6.4