diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-08 10:57:51 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-08 10:57:51 -0700 |
commit | 19915e623458004547c1c2490b09bb923fe69337 (patch) | |
tree | b794a81ddf083ed08a5bb32820c2dd0121ed74b2 /drivers/net/ethernet/brocade/bna/cna_fwimg.c | |
parent | 4e47dcf78d2fa0b6316b6d563a055fdcc93bd222 (diff) | |
parent | d4a4f75cd8f29cd9464a5a32e9224a91571d6649 (diff) |
Merge 4.1-rc7 into usb-next
This resolves a merge issue in musb_core.c and we want the fixes that
were in Linus's tree in this branch as well for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/brocade/bna/cna_fwimg.c')
-rw-r--r-- | drivers/net/ethernet/brocade/bna/cna_fwimg.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/brocade/bna/cna_fwimg.c b/drivers/net/ethernet/brocade/bna/cna_fwimg.c index ebf462d8082f..badea368bdc8 100644 --- a/drivers/net/ethernet/brocade/bna/cna_fwimg.c +++ b/drivers/net/ethernet/brocade/bna/cna_fwimg.c @@ -30,6 +30,7 @@ cna_read_firmware(struct pci_dev *pdev, u32 **bfi_image, u32 *bfi_image_size, char *fw_name) { const struct firmware *fw; + u32 n; if (request_firmware(&fw, fw_name, &pdev->dev)) { pr_alert("Can't locate firmware %s\n", fw_name); @@ -40,6 +41,12 @@ cna_read_firmware(struct pci_dev *pdev, u32 **bfi_image, *bfi_image_size = fw->size/sizeof(u32); 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; error: return NULL; |