aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijaya Mohan Guvva <vmohan@brocade.com>2013-12-04 08:43:58 -0500
committerJames Bottomley <JBottomley@Parallels.com>2013-12-18 11:28:17 -0500
commitdcaf9aed995c2b2a49fb86bbbcfa2f92c797ab5d (patch)
tree907746783b4070019f9efae9369c039c2deda42d
parent319e2e3f63c348a9b66db4667efa73178e18b17d (diff)
[SCSI] bfa: Chinook quad port 16G FC HBA claim issue
Bfa driver crash is observed while pushing the firmware on to chinook quad port card due to uninitialized bfi_image_ct2 access which gets initialized only for CT2 ASIC based cards after request_firmware(). For quard port chinook (CT2 ASIC based), bfi_image_ct2 is not getting initialized as there is no check for chinook PCI device ID before request_firmware and instead bfi_image_cb is initialized as it is the default case for card type check. This patch includes changes to read the right firmware for quad port chinook. Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com> Cc: stable@vger.kernel.org Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/bfa/bfad.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index fc80a325a1e6..27e270e00a10 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1802,7 +1802,7 @@ out:
1802static u32 * 1802static u32 *
1803bfad_load_fwimg(struct pci_dev *pdev) 1803bfad_load_fwimg(struct pci_dev *pdev)
1804{ 1804{
1805 if (pdev->device == BFA_PCI_DEVICE_ID_CT2) { 1805 if (bfa_asic_id_ct2(pdev->device)) {
1806 if (bfi_image_ct2_size == 0) 1806 if (bfi_image_ct2_size == 0)
1807 bfad_read_firmware(pdev, &bfi_image_ct2, 1807 bfad_read_firmware(pdev, &bfi_image_ct2,
1808 &bfi_image_ct2_size, BFAD_FW_FILE_CT2); 1808 &bfi_image_ct2_size, BFAD_FW_FILE_CT2);
@@ -1812,12 +1812,14 @@ bfad_load_fwimg(struct pci_dev *pdev)
1812 bfad_read_firmware(pdev, &bfi_image_ct, 1812 bfad_read_firmware(pdev, &bfi_image_ct,
1813 &bfi_image_ct_size, BFAD_FW_FILE_CT); 1813 &bfi_image_ct_size, BFAD_FW_FILE_CT);
1814 return bfi_image_ct; 1814 return bfi_image_ct;
1815 } else { 1815 } else if (bfa_asic_id_cb(pdev->device)) {
1816 if (bfi_image_cb_size == 0) 1816 if (bfi_image_cb_size == 0)
1817 bfad_read_firmware(pdev, &bfi_image_cb, 1817 bfad_read_firmware(pdev, &bfi_image_cb,
1818 &bfi_image_cb_size, BFAD_FW_FILE_CB); 1818 &bfi_image_cb_size, BFAD_FW_FILE_CB);
1819 return bfi_image_cb; 1819 return bfi_image_cb;
1820 } 1820 }
1821
1822 return NULL;
1821} 1823}
1822 1824
1823static void 1825static void