Commit fdf7c644 authored by David S. Miller's avatar David S. Miller

Merge branch 'bna-fixes'

Ivan Vecera says:

====================
bna: misc bugfixes

These patches fix several bugs found during device initialization debugging.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 50dce303 4818e856
...@@ -2414,7 +2414,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, enum bfi_fwboot_type boot_type, ...@@ -2414,7 +2414,7 @@ bfa_ioc_boot(struct bfa_ioc *ioc, enum bfi_fwboot_type boot_type,
if (status == BFA_STATUS_OK) if (status == BFA_STATUS_OK)
bfa_ioc_lpu_start(ioc); bfa_ioc_lpu_start(ioc);
else else
bfa_nw_iocpf_timeout(ioc); bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT);
return status; return status;
} }
...@@ -3029,7 +3029,7 @@ bfa_ioc_poll_fwinit(struct bfa_ioc *ioc) ...@@ -3029,7 +3029,7 @@ bfa_ioc_poll_fwinit(struct bfa_ioc *ioc)
} }
if (ioc->iocpf.poll_time >= BFA_IOC_TOV) { if (ioc->iocpf.poll_time >= BFA_IOC_TOV) {
bfa_nw_iocpf_timeout(ioc); bfa_fsm_send_event(&ioc->iocpf, IOCPF_E_TIMEOUT);
} else { } else {
ioc->iocpf.poll_time += BFA_IOC_POLL_TOV; ioc->iocpf.poll_time += BFA_IOC_POLL_TOV;
mod_timer(&ioc->iocpf_timer, jiffies + mod_timer(&ioc->iocpf_timer, jiffies +
......
...@@ -3701,10 +3701,6 @@ bnad_pci_probe(struct pci_dev *pdev, ...@@ -3701,10 +3701,6 @@ bnad_pci_probe(struct pci_dev *pdev,
setup_timer(&bnad->bna.ioceth.ioc.sem_timer, bnad_iocpf_sem_timeout, setup_timer(&bnad->bna.ioceth.ioc.sem_timer, bnad_iocpf_sem_timeout,
((unsigned long)bnad)); ((unsigned long)bnad));
/* Now start the timer before calling IOC */
mod_timer(&bnad->bna.ioceth.ioc.iocpf_timer,
jiffies + msecs_to_jiffies(BNA_IOC_TIMER_FREQ));
/* /*
* Start the chip * Start the chip
* If the call back comes with error, we bail out. * If the call back comes with error, we bail out.
......
...@@ -30,6 +30,7 @@ cna_read_firmware(struct pci_dev *pdev, u32 **bfi_image, ...@@ -30,6 +30,7 @@ cna_read_firmware(struct pci_dev *pdev, u32 **bfi_image,
u32 *bfi_image_size, char *fw_name) u32 *bfi_image_size, char *fw_name)
{ {
const struct firmware *fw; const struct firmware *fw;
u32 n;
if (request_firmware(&fw, fw_name, &pdev->dev)) { if (request_firmware(&fw, fw_name, &pdev->dev)) {
pr_alert("Can't locate firmware %s\n", fw_name); pr_alert("Can't locate firmware %s\n", fw_name);
...@@ -40,6 +41,12 @@ cna_read_firmware(struct pci_dev *pdev, u32 **bfi_image, ...@@ -40,6 +41,12 @@ cna_read_firmware(struct pci_dev *pdev, u32 **bfi_image,
*bfi_image_size = fw->size/sizeof(u32); *bfi_image_size = fw->size/sizeof(u32);
bfi_fw = fw; bfi_fw = fw;
/* Convert loaded firmware to host order as it is stored in file
* as sequence of LE32 integers.
*/
for (n = 0; n < *bfi_image_size; n++)
le32_to_cpus(*bfi_image + n);
return *bfi_image; return *bfi_image;
error: error:
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment