diff options
author | Igor Russkikh <igor.russkikh@aquantia.com> | 2018-01-19 17:03:25 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-21 18:19:03 -0500 |
commit | a57d3929b838204efd026e0f6d5eaed5bb65cce7 (patch) | |
tree | 7fbf5b601544f9e64e1d71beeb9dfe196987bc9d /drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | |
parent | 0c58c35f02c2e99bb10137b32e8ec96dcbdcc705 (diff) |
net: aquantia: Introduce support for new firmware on AQC cards
This defines fw2x operations table and corresponding methods.
Some of the functions are being shared with 1.x firmware
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c')
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c index 616475ea5b2f..56fb048c4ddc 100644 --- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c +++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.c @@ -32,6 +32,8 @@ #define HW_ATL_MPI_SPEED_SHIFT 16U #define HW_ATL_FW_VER_1X 0x01050006U +#define HW_ATL_FW_VER_2X 0x02000000U +#define HW_ATL_FW_VER_3X 0x03000000U static int hw_atl_utils_ver_match(u32 ver_expected, u32 ver_actual); @@ -46,6 +48,12 @@ int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops) if (hw_atl_utils_ver_match(HW_ATL_FW_VER_1X, self->fw_ver_actual) == 0) *fw_ops = &aq_fw_1x_ops; + else if (hw_atl_utils_ver_match(HW_ATL_FW_VER_2X, + self->fw_ver_actual) == 0) + *fw_ops = &aq_fw_2x_ops; + else if (hw_atl_utils_ver_match(HW_ATL_FW_VER_3X, + self->fw_ver_actual) == 0) + *fw_ops = &aq_fw_2x_ops; else { aq_pr_err("Bad FW version detected: %x\n", self->fw_ver_actual); @@ -56,8 +64,8 @@ int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops) return err; } -static int hw_atl_utils_fw_downld_dwords(struct aq_hw_s *self, u32 a, - u32 *p, u32 cnt) +int hw_atl_utils_fw_downld_dwords(struct aq_hw_s *self, u32 a, + u32 *p, u32 cnt) { int err = 0; |