From: Vaios Papadimitriou Date: Tue, 8 May 2012 22:01:24 +0000 (-0500) Subject: Fix bug with driver processing dump command type 4 using 16Gb FC Adapter (CR 126406) X-Git-Tag: v2.6.39-400.9.0~423^2~123^2~25 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2d805ae585db2791e42764381605fae2f26cb3c6;p=users%2Fjedix%2Flinux-maple.git Fix bug with driver processing dump command type 4 using 16Gb FC Adapter (CR 126406) 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 --- diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 231614c177d3..e4d9bb0cf915 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -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 */ diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index c3289077e04a..5f280b5ae3db 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h @@ -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 */