]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SCSI] be2iscsi: Adding support for various Async messages from chip
authorJayamohan Kallickal <jayamohank@serverengines.com>
Tue, 24 Nov 2009 20:11:37 +0000 (01:41 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 10 Dec 2009 14:54:13 +0000 (08:54 -0600)
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.

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/be2iscsi/be_cmds.c

index 698a527d6ccad07be1bad6a2eb9cf2a3e9513011..f008708f1b08e440bc0985ff03eec004cb4346ee 100644 (file)
@@ -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));
+                       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);
 
-                       /* Interpret compl as a async link evt */
-                       beiscsi_async_link_state_process(phba,
-                               (struct be_async_event_link_state *) compl);
                } else if (compl->flags & CQE_FLAGS_COMPLETED_MASK) {
                                status = be_mcc_compl_process(ctrl, compl);
                                atomic_dec(&phba->ctrl.mcc_obj.q.used);