[SCSI] lpfc 8.3.35: Fixed Linux generic firmware download on SLI4 devices with longer...
authorJames Smart <james.smart@emulex.com>
Sat, 29 Sep 2012 15:30:06 +0000 (11:30 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 8 Oct 2012 10:55:41 +0000 (11:55 +0100)
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_init.c

index a184c24..69b5993 100644 (file)
@@ -27,6 +27,8 @@
 
 struct lpfc_sli2_slim;
 
+#define ELX_MODEL_NAME_SIZE    80
+
 #define LPFC_PCI_DEV_LP                0x1
 #define LPFC_PCI_DEV_OC                0x2
 
index 12014eb..7a981d1 100644 (file)
@@ -9428,7 +9428,7 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid)
        int mcnt;
        int adjusted_fcp_io_channel;
        const struct firmware *fw;
-       uint8_t file_name[16];
+       uint8_t file_name[ELX_MODEL_NAME_SIZE];
 
        /* Allocate memory for HBA structure */
        phba = lpfc_hba_alloc(pdev);
@@ -9574,7 +9574,8 @@ lpfc_pci_probe_one_s4(struct pci_dev *pdev, const struct pci_device_id *pid)
        /* check for firmware upgrade or downgrade (if_type 2 only) */
        if (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) ==
            LPFC_SLI_INTF_IF_TYPE_2) {
-               snprintf(file_name, 16, "%s.grp", phba->ModelName);
+               snprintf(file_name, ELX_MODEL_NAME_SIZE, "%s.grp",
+                        phba->ModelName);
                error = request_firmware(&fw, file_name, &phba->pcidev->dev);
                if (!error) {
                        lpfc_write_firmware(phba, fw);