diff options
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_init.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_init.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 74ec96da1762..4ec0eeb6bff9 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c | |||
@@ -1130,9 +1130,20 @@ qlcnic_load_firmware(struct qlcnic_adapter *adapter) | |||
1130 | } else { | 1130 | } else { |
1131 | u64 data; | 1131 | u64 data; |
1132 | u32 hi, lo; | 1132 | u32 hi, lo; |
1133 | 1133 | int ret; | |
1134 | size = (QLCNIC_IMAGE_START - QLCNIC_BOOTLD_START) / 8; | 1134 | struct qlcnic_flt_entry bootld_entry; |
1135 | flashaddr = QLCNIC_BOOTLD_START; | 1135 | |
1136 | ret = qlcnic_get_flt_entry(adapter, QLCNIC_BOOTLD_REGION, | ||
1137 | &bootld_entry); | ||
1138 | if (!ret) { | ||
1139 | size = bootld_entry.size / 8; | ||
1140 | flashaddr = bootld_entry.start_addr; | ||
1141 | } else { | ||
1142 | size = (QLCNIC_IMAGE_START - QLCNIC_BOOTLD_START) / 8; | ||
1143 | flashaddr = QLCNIC_BOOTLD_START; | ||
1144 | dev_info(&pdev->dev, | ||
1145 | "using legacy method to get flash fw region"); | ||
1146 | } | ||
1136 | 1147 | ||
1137 | for (i = 0; i < size; i++) { | 1148 | for (i = 0; i < size; i++) { |
1138 | if (qlcnic_rom_fast_read(adapter, | 1149 | if (qlcnic_rom_fast_read(adapter, |