Skip to content

Commit

Permalink
[SCSI] bfa: Chinook quad port 16G FC HBA claim issue
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
Vijaya Mohan Guvva authored and James Bottomley committed Dec 18, 2013
1 parent 319e2e3 commit dcaf9ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/bfa/bfad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ bfad_read_firmware(struct pci_dev *pdev, u32 **bfi_image,
static u32 *
bfad_load_fwimg(struct pci_dev *pdev)
{
if (pdev->device == BFA_PCI_DEVICE_ID_CT2) {
if (bfa_asic_id_ct2(pdev->device)) {
if (bfi_image_ct2_size == 0)
bfad_read_firmware(pdev, &bfi_image_ct2,
&bfi_image_ct2_size, BFAD_FW_FILE_CT2);
Expand All @@ -1812,12 +1812,14 @@ bfad_load_fwimg(struct pci_dev *pdev)
bfad_read_firmware(pdev, &bfi_image_ct,
&bfi_image_ct_size, BFAD_FW_FILE_CT);
return bfi_image_ct;
} else {
} else if (bfa_asic_id_cb(pdev->device)) {
if (bfi_image_cb_size == 0)
bfad_read_firmware(pdev, &bfi_image_cb,
&bfi_image_cb_size, BFAD_FW_FILE_CB);
return bfi_image_cb;
}

return NULL;
}

static void
Expand Down

0 comments on commit dcaf9ae

Please sign in to comment.