]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Fix bug with driver processing dump command type 4 using 16Gb FC Adapter (CR 126406)
authorVaios Papadimitriou <vaios.papadimitriou@emulex.com>
Tue, 8 May 2012 22:01:24 +0000 (17:01 -0500)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 9 May 2012 00:01:24 +0000 (17:01 -0700)
Dump Mbox commands fail to LPe16000 adapter, these commands were not recognized
by the driver, they are now allowed to pass through.

commit id: 3ef6d24cd9f473518dd7941e86cc2a5f8992eed0

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
drivers/scsi/lpfc/lpfc_bsg.c
drivers/scsi/lpfc/lpfc_hw.h

index 231614c177d393011bccfe06a69f045f0eca62ed..e4d9bb0cf915213f3f89d09078d9589899d61f43 100644 (file)
@@ -4560,7 +4560,12 @@ lpfc_bsg_issue_mbox(struct lpfc_hba *phba, struct fc_bsg_job *job,
                                                        + sizeof(MAILBOX_t));
                }
        } else if (phba->sli_rev == LPFC_SLI_REV4) {
-               if (pmb->mbxCommand == MBX_DUMP_MEMORY) {
+               /* Let type 4 (well known data) through because the data is
+                * returned in varwords[4-8]
+                * otherwise check the recieve length and fetch the buffer addr
+                */
+               if ((pmb->mbxCommand == MBX_DUMP_MEMORY) &&
+                       (pmb->un.varDmp.type != DMP_WELL_KNOWN)) {
                        /* rebuild the command for sli4 using our own buffers
                        * like we do for biu diags
                        */
index c3289077e04aa2ffb1ef5b227c10ebb6392db453..5f280b5ae3db8a9a8df45044422e203bde93748f 100644 (file)
@@ -1,7 +1,7 @@
 /*******************************************************************
  * This file is part of the Emulex Linux Device Driver for         *
  * Fibre Channel Host Bus Adapters.                                *
- * Copyright (C) 2004-2010 Emulex.  All rights reserved.           *
+ * Copyright (C) 2004-2011 Emulex.  All rights reserved.           *
  * EMULEX and SLI are trademarks of Emulex.                        *
  * www.emulex.com                                                  *
  *                                                                 *
@@ -2568,6 +2568,8 @@ typedef struct {
 
 #define  DMP_MEM_REG             0x1
 #define  DMP_NV_PARAMS           0x2
+#define  DMP_LMSD                0x3 /* Link Module Serial Data */
+#define  DMP_WELL_KNOWN          0x4
 
 #define  DMP_REGION_VPD          0xe
 #define  DMP_VPD_SIZE            0x400  /* maximum amount of VPD */