Use libie_aq_desc instead of ixgbe_aci_desc. Do needed changes to allow
clean build.
Move additional caps used in ixgbe to libie.
Reviewed-by: Przemek Kitszel
Reviewed-by: Aleksandr Loktionov
Signed-off-by: Michal Swiatkowski
---
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 12 +-
.../ethernet/intel/ixgbe/ixgbe_type_e610.h| 226 +--
include/linux/net/intel/libie/adminq.h| 16 ++
.../net/ethernet/intel/ixgbe/devlink/region.c | 4 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 272 +-
.../ethernet/intel/ixgbe/ixgbe_fw_update.c| 4 +-
6 files changed, 167 insertions(+), 367 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
index bb31d65bd1c8..782c489b0fa7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h
@@ -6,15 +6,15 @@
#include "ixgbe_type.h"
-int ixgbe_aci_send_cmd(struct ixgbe_hw *hw, struct ixgbe_aci_desc *desc,
+int ixgbe_aci_send_cmd(struct ixgbe_hw *hw, struct libie_aq_desc *desc,
void *buf, u16 buf_size);
bool ixgbe_aci_check_event_pending(struct ixgbe_hw *hw);
int ixgbe_aci_get_event(struct ixgbe_hw *hw, struct ixgbe_aci_event *e,
bool *pending);
-void ixgbe_fill_dflt_direct_cmd_desc(struct ixgbe_aci_desc *desc, u16 opcode);
-int ixgbe_acquire_res(struct ixgbe_hw *hw, enum ixgbe_aci_res_ids res,
- enum ixgbe_aci_res_access_type access, u32 timeout);
-void ixgbe_release_res(struct ixgbe_hw *hw, enum ixgbe_aci_res_ids res);
+void ixgbe_fill_dflt_direct_cmd_desc(struct libie_aq_desc *desc, u16 opcode);
+int ixgbe_acquire_res(struct ixgbe_hw *hw, enum libie_aq_res_id res,
+ enum libie_aq_res_access_type access, u32 timeout);
+void ixgbe_release_res(struct ixgbe_hw *hw, enum libie_aq_res_id res);
int ixgbe_aci_list_caps(struct ixgbe_hw *hw, void *buf, u16 buf_size,
u32 *cap_count, enum ixgbe_aci_opc opc);
int ixgbe_discover_dev_caps(struct ixgbe_hw *hw,
@@ -62,7 +62,7 @@ int ixgbe_aci_get_netlist_node(struct ixgbe_hw *hw,
struct ixgbe_aci_cmd_get_link_topo *cmd,
u8 *node_part_number, u16 *node_handle);
int ixgbe_acquire_nvm(struct ixgbe_hw *hw,
- enum ixgbe_aci_res_access_type access);
+ enum libie_aq_res_access_type access);
void ixgbe_release_nvm(struct ixgbe_hw *hw);
int ixgbe_aci_read_nvm(struct ixgbe_hw *hw, u16 module_typeid, u32 offset,
u16 length, void *data, bool last_command,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h
b/drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h
index 09df67f03cf4..d2f22d8558f8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type_e610.h
@@ -4,6 +4,8 @@
#ifndef _IXGBE_TYPE_E610_H_
#define _IXGBE_TYPE_E610_H_
+#include
+
#define BYTES_PER_DWORD4
/* General E610 defines */
@@ -135,60 +137,6 @@
/* [ms] timeout of waiting for resource release */
#define IXGBE_ACI_RELEASE_RES_TIMEOUT 1
-/* FW defined boundary for a large buffer, 4k >= Large buffer > 512 bytes */
-#define IXGBE_ACI_LG_BUF 512
-
-/* Flags sub-structure
- * |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |
- * |DD |CMP|ERR|VFE| * * RESERVED * * |LB |RD |VFC|BUF|SI |EI |FE |
- */
-
-#define IXGBE_ACI_FLAG_DD BIT(0) /* 0x1 */
-#define IXGBE_ACI_FLAG_CMP BIT(1) /* 0x2 */
-#define IXGBE_ACI_FLAG_ERR BIT(2) /* 0x4 */
-#define IXGBE_ACI_FLAG_VFE BIT(3) /* 0x8 */
-#define IXGBE_ACI_FLAG_LB BIT(9) /* 0x200 */
-#define IXGBE_ACI_FLAG_RD BIT(10) /* 0x400 */
-#define IXGBE_ACI_FLAG_VFC BIT(11) /* 0x800 */
-#define IXGBE_ACI_FLAG_BUF BIT(12) /* 0x1000 */
-#define IXGBE_ACI_FLAG_SI BIT(13) /* 0x2000 */
-#define IXGBE_ACI_FLAG_EI BIT(14) /* 0x4000 */
-#define IXGBE_ACI_FLAG_FE BIT(15) /* 0x8000 */
-
-/* Admin Command Interface (ACI) error codes */
-enum ixgbe_aci_err {
- IXGBE_ACI_RC_OK = 0, /* Success */
- IXGBE_ACI_RC_EPERM = 1, /* Operation not permitted */
- IXGBE_ACI_RC_ENOENT = 2, /* No such element */
- IXGBE_ACI_RC_ESRCH = 3, /* Bad opcode */
- IXGBE_ACI_RC_EINTR = 4, /* Operation interrupted */
- IXGBE_ACI_RC_EIO= 5, /* I/O error */
- IXGBE_ACI_RC_ENXIO = 6, /* No such resource */
- IXGBE_ACI_RC_E2BIG = 7, /* Arg too long */
- IXGBE_ACI_RC_EAGAIN = 8, /* Try again */
- IXGBE_ACI_RC_ENOMEM = 9, /* Out of memory */
- IXGBE_ACI_RC_EACCES = 10, /* Permission denied */
- IXGBE_ACI_RC_EFAULT = 11, /* Bad address */
- IXGBE_ACI_RC_EBUSY = 12, /* Device or resource busy */
- IXGBE_ACI_RC_EEXIST = 13, /* Object already exists */
-