diff options
author | Kalesh AP <kalesh.purayil@avagotech.com> | 2015-10-12 03:47:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-13 07:32:41 -0400 |
commit | ae4a9d6a6362df4e4e492c297157498d299bdb68 (patch) | |
tree | f5884bdf1e6adba824fde126644deb9ae3768b92 | |
parent | 3bb35ac4978977cf414893ee721f442039c4b8a4 (diff) |
be2net: fix BE3-R FW download compatibility check
In the BE3 FW image, unlike Skyhawk's, the "asic_type_rev" field doesn't
track the asic_rev of chip it is compatible with. When asic_type_rev
is 0 the image is compatible only with pre-BE3-R chips (asic_rev < 0x10).
Fix the current compatibility check to take care of this.
We hit this issue when we try to flash old BE3 images (used prior to the
release of BE3-R) on pre-BE3-R adapters.
Fixes: a6e6ff6eee12f3e ("be2net: simplify UFI compatibility checking")
Signed-off-by: Kalesh AP <kalesh.purayil@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 7bf51a1a0a77..86eed4761806 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c | |||
@@ -4999,7 +4999,15 @@ static bool be_check_ufi_compatibility(struct be_adapter *adapter, | |||
4999 | return false; | 4999 | return false; |
5000 | } | 5000 | } |
5001 | 5001 | ||
5002 | return (fhdr->asic_type_rev >= adapter->asic_rev); | 5002 | /* In BE3 FW images the "asic_type_rev" field doesn't track the |
5003 | * asic_rev of the chips it is compatible with. | ||
5004 | * When asic_type_rev is 0 the image is compatible only with | ||
5005 | * pre-BE3-R chips (asic_rev < 0x10) | ||
5006 | */ | ||
5007 | if (BEx_chip(adapter) && fhdr->asic_type_rev == 0) | ||
5008 | return adapter->asic_rev < 0x10; | ||
5009 | else | ||
5010 | return (fhdr->asic_type_rev >= adapter->asic_rev); | ||
5003 | } | 5011 | } |
5004 | 5012 | ||
5005 | static int be_fw_download(struct be_adapter *adapter, const struct firmware* fw) | 5013 | static int be_fw_download(struct be_adapter *adapter, const struct firmware* fw) |