Commit 8f60f762 authored by Nikita Danilov's avatar Nikita Danilov Committed by David S. Miller

net: aquantia: renaming for better visibility

Removed extra characters from the names of structures to unify prefixes
used through the driver code (we normally use hw_atl for hw specifics).
HW_ATL_B0_ and HW_ATL_A0_ are the same and useless copies.
Signed-off-by: default avatarNikita Danilov <nikita.danilov@aquantia.com>
Signed-off-by: default avatarIgor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e9157848
...@@ -112,7 +112,7 @@ struct aq_hw_s { ...@@ -112,7 +112,7 @@ struct aq_hw_s {
const struct aq_fw_ops *aq_fw_ops; const struct aq_fw_ops *aq_fw_ops;
void __iomem *mmio; void __iomem *mmio;
struct aq_hw_link_status_s aq_link_status; struct aq_hw_link_status_s aq_link_status;
struct hw_aq_atl_utils_mbox mbox; struct hw_atl_utils_mbox mbox;
struct hw_atl_stats_s last_stats; struct hw_atl_stats_s last_stats;
struct aq_stats_s curr_stats; struct aq_stats_s curr_stats;
u64 speed; u64 speed;
...@@ -124,7 +124,7 @@ struct aq_hw_s { ...@@ -124,7 +124,7 @@ struct aq_hw_s {
u32 mbox_addr; u32 mbox_addr;
u32 rpc_addr; u32 rpc_addr;
u32 rpc_tid; u32 rpc_tid;
struct hw_aq_atl_utils_fw_rpc rpc; struct hw_atl_utils_fw_rpc rpc;
}; };
struct aq_ring_s; struct aq_ring_s;
......
...@@ -49,37 +49,37 @@ ...@@ -49,37 +49,37 @@
const struct aq_hw_caps_s hw_atl_a0_caps_aqc100 = { const struct aq_hw_caps_s hw_atl_a0_caps_aqc100 = {
DEFAULT_A0_BOARD_BASIC_CAPABILITIES, DEFAULT_A0_BOARD_BASIC_CAPABILITIES,
.media_type = AQ_HW_MEDIA_TYPE_FIBRE, .media_type = AQ_HW_MEDIA_TYPE_FIBRE,
.link_speed_msk = HW_ATL_A0_RATE_5G | .link_speed_msk = AQ_NIC_RATE_5G |
HW_ATL_A0_RATE_2G5 | AQ_NIC_RATE_2GS |
HW_ATL_A0_RATE_1G | AQ_NIC_RATE_1G |
HW_ATL_A0_RATE_100M, AQ_NIC_RATE_100M,
}; };
const struct aq_hw_caps_s hw_atl_a0_caps_aqc107 = { const struct aq_hw_caps_s hw_atl_a0_caps_aqc107 = {
DEFAULT_A0_BOARD_BASIC_CAPABILITIES, DEFAULT_A0_BOARD_BASIC_CAPABILITIES,
.media_type = AQ_HW_MEDIA_TYPE_TP, .media_type = AQ_HW_MEDIA_TYPE_TP,
.link_speed_msk = HW_ATL_A0_RATE_10G | .link_speed_msk = AQ_NIC_RATE_10G |
HW_ATL_A0_RATE_5G | AQ_NIC_RATE_5G |
HW_ATL_A0_RATE_2G5 | AQ_NIC_RATE_2GS |
HW_ATL_A0_RATE_1G | AQ_NIC_RATE_1G |
HW_ATL_A0_RATE_100M, AQ_NIC_RATE_100M,
}; };
const struct aq_hw_caps_s hw_atl_a0_caps_aqc108 = { const struct aq_hw_caps_s hw_atl_a0_caps_aqc108 = {
DEFAULT_A0_BOARD_BASIC_CAPABILITIES, DEFAULT_A0_BOARD_BASIC_CAPABILITIES,
.media_type = AQ_HW_MEDIA_TYPE_TP, .media_type = AQ_HW_MEDIA_TYPE_TP,
.link_speed_msk = HW_ATL_A0_RATE_5G | .link_speed_msk = AQ_NIC_RATE_5G |
HW_ATL_A0_RATE_2G5 | AQ_NIC_RATE_2GS |
HW_ATL_A0_RATE_1G | AQ_NIC_RATE_1G |
HW_ATL_A0_RATE_100M, AQ_NIC_RATE_100M,
}; };
const struct aq_hw_caps_s hw_atl_a0_caps_aqc109 = { const struct aq_hw_caps_s hw_atl_a0_caps_aqc109 = {
DEFAULT_A0_BOARD_BASIC_CAPABILITIES, DEFAULT_A0_BOARD_BASIC_CAPABILITIES,
.media_type = AQ_HW_MEDIA_TYPE_TP, .media_type = AQ_HW_MEDIA_TYPE_TP,
.link_speed_msk = HW_ATL_A0_RATE_2G5 | .link_speed_msk = AQ_NIC_RATE_2GS |
HW_ATL_A0_RATE_1G | AQ_NIC_RATE_1G |
HW_ATL_A0_RATE_100M, AQ_NIC_RATE_100M,
}; };
static int hw_atl_a0_hw_reset(struct aq_hw_s *self) static int hw_atl_a0_hw_reset(struct aq_hw_s *self)
......
...@@ -62,12 +62,6 @@ ...@@ -62,12 +62,6 @@
#define HW_ATL_A0_MPI_SPEED_MSK 0xFFFFU #define HW_ATL_A0_MPI_SPEED_MSK 0xFFFFU
#define HW_ATL_A0_MPI_SPEED_SHIFT 16U #define HW_ATL_A0_MPI_SPEED_SHIFT 16U
#define HW_ATL_A0_RATE_10G BIT(0)
#define HW_ATL_A0_RATE_5G BIT(1)
#define HW_ATL_A0_RATE_2G5 BIT(3)
#define HW_ATL_A0_RATE_1G BIT(4)
#define HW_ATL_A0_RATE_100M BIT(5)
#define HW_ATL_A0_TXBUF_MAX 160U #define HW_ATL_A0_TXBUF_MAX 160U
#define HW_ATL_A0_RXBUF_MAX 320U #define HW_ATL_A0_RXBUF_MAX 320U
......
...@@ -51,38 +51,38 @@ ...@@ -51,38 +51,38 @@
const struct aq_hw_caps_s hw_atl_b0_caps_aqc100 = { const struct aq_hw_caps_s hw_atl_b0_caps_aqc100 = {
DEFAULT_B0_BOARD_BASIC_CAPABILITIES, DEFAULT_B0_BOARD_BASIC_CAPABILITIES,
.media_type = AQ_HW_MEDIA_TYPE_FIBRE, .media_type = AQ_HW_MEDIA_TYPE_FIBRE,
.link_speed_msk = HW_ATL_B0_RATE_10G | .link_speed_msk = AQ_NIC_RATE_10G |
HW_ATL_B0_RATE_5G | AQ_NIC_RATE_5G |
HW_ATL_B0_RATE_2G5 | AQ_NIC_RATE_2GS |
HW_ATL_B0_RATE_1G | AQ_NIC_RATE_1G |
HW_ATL_B0_RATE_100M, AQ_NIC_RATE_100M,
}; };
const struct aq_hw_caps_s hw_atl_b0_caps_aqc107 = { const struct aq_hw_caps_s hw_atl_b0_caps_aqc107 = {
DEFAULT_B0_BOARD_BASIC_CAPABILITIES, DEFAULT_B0_BOARD_BASIC_CAPABILITIES,
.media_type = AQ_HW_MEDIA_TYPE_TP, .media_type = AQ_HW_MEDIA_TYPE_TP,
.link_speed_msk = HW_ATL_B0_RATE_10G | .link_speed_msk = AQ_NIC_RATE_10G |
HW_ATL_B0_RATE_5G | AQ_NIC_RATE_5G |
HW_ATL_B0_RATE_2G5 | AQ_NIC_RATE_2GS |
HW_ATL_B0_RATE_1G | AQ_NIC_RATE_1G |
HW_ATL_B0_RATE_100M, AQ_NIC_RATE_100M,
}; };
const struct aq_hw_caps_s hw_atl_b0_caps_aqc108 = { const struct aq_hw_caps_s hw_atl_b0_caps_aqc108 = {
DEFAULT_B0_BOARD_BASIC_CAPABILITIES, DEFAULT_B0_BOARD_BASIC_CAPABILITIES,
.media_type = AQ_HW_MEDIA_TYPE_TP, .media_type = AQ_HW_MEDIA_TYPE_TP,
.link_speed_msk = HW_ATL_B0_RATE_5G | .link_speed_msk = AQ_NIC_RATE_5G |
HW_ATL_B0_RATE_2G5 | AQ_NIC_RATE_2GS |
HW_ATL_B0_RATE_1G | AQ_NIC_RATE_1G |
HW_ATL_B0_RATE_100M, AQ_NIC_RATE_100M,
}; };
const struct aq_hw_caps_s hw_atl_b0_caps_aqc109 = { const struct aq_hw_caps_s hw_atl_b0_caps_aqc109 = {
DEFAULT_B0_BOARD_BASIC_CAPABILITIES, DEFAULT_B0_BOARD_BASIC_CAPABILITIES,
.media_type = AQ_HW_MEDIA_TYPE_TP, .media_type = AQ_HW_MEDIA_TYPE_TP,
.link_speed_msk = HW_ATL_B0_RATE_2G5 | .link_speed_msk = AQ_NIC_RATE_2GS |
HW_ATL_B0_RATE_1G | AQ_NIC_RATE_1G |
HW_ATL_B0_RATE_100M, AQ_NIC_RATE_100M,
}; };
static int hw_atl_b0_hw_reset(struct aq_hw_s *self) static int hw_atl_b0_hw_reset(struct aq_hw_s *self)
......
...@@ -67,12 +67,6 @@ ...@@ -67,12 +67,6 @@
#define HW_ATL_B0_MPI_SPEED_MSK 0xFFFFU #define HW_ATL_B0_MPI_SPEED_MSK 0xFFFFU
#define HW_ATL_B0_MPI_SPEED_SHIFT 16U #define HW_ATL_B0_MPI_SPEED_SHIFT 16U
#define HW_ATL_B0_RATE_10G BIT(0)
#define HW_ATL_B0_RATE_5G BIT(1)
#define HW_ATL_B0_RATE_2G5 BIT(3)
#define HW_ATL_B0_RATE_1G BIT(4)
#define HW_ATL_B0_RATE_100M BIT(5)
#define HW_ATL_B0_TXBUF_MAX 160U #define HW_ATL_B0_TXBUF_MAX 160U
#define HW_ATL_B0_RXBUF_MAX 320U #define HW_ATL_B0_RXBUF_MAX 320U
......
...@@ -439,7 +439,7 @@ int hw_atl_utils_fw_rpc_call(struct aq_hw_s *self, unsigned int rpc_size) ...@@ -439,7 +439,7 @@ int hw_atl_utils_fw_rpc_call(struct aq_hw_s *self, unsigned int rpc_size)
} }
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
struct hw_aq_atl_utils_fw_rpc **rpc) struct hw_atl_utils_fw_rpc **rpc)
{ {
int err = 0; int err = 0;
struct aq_hw_atl_utils_fw_rpc_tid_s sw; struct aq_hw_atl_utils_fw_rpc_tid_s sw;
...@@ -504,7 +504,7 @@ static int hw_atl_utils_mpi_create(struct aq_hw_s *self) ...@@ -504,7 +504,7 @@ static int hw_atl_utils_mpi_create(struct aq_hw_s *self)
} }
int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self, int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self,
struct hw_aq_atl_utils_mbox_header *pmbox) struct hw_atl_utils_mbox_header *pmbox)
{ {
return hw_atl_utils_fw_downld_dwords(self, return hw_atl_utils_fw_downld_dwords(self,
self->mbox_addr, self->mbox_addr,
...@@ -513,7 +513,7 @@ int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self, ...@@ -513,7 +513,7 @@ int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self,
} }
void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self, void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self,
struct hw_aq_atl_utils_mbox *pmbox) struct hw_atl_utils_mbox *pmbox)
{ {
int err = 0; int err = 0;
...@@ -553,7 +553,7 @@ static int hw_atl_utils_mpi_set_state(struct aq_hw_s *self, ...@@ -553,7 +553,7 @@ static int hw_atl_utils_mpi_set_state(struct aq_hw_s *self,
{ {
int err = 0; int err = 0;
u32 transaction_id = 0; u32 transaction_id = 0;
struct hw_aq_atl_utils_mbox_header mbox; struct hw_atl_utils_mbox_header mbox;
u32 val = aq_hw_read_reg(self, HW_ATL_MPI_CONTROL_ADR); u32 val = aq_hw_read_reg(self, HW_ATL_MPI_CONTROL_ADR);
if (state == MPI_RESET) { if (state == MPI_RESET) {
...@@ -747,7 +747,7 @@ static int hw_atl_fw1x_deinit(struct aq_hw_s *self) ...@@ -747,7 +747,7 @@ static int hw_atl_fw1x_deinit(struct aq_hw_s *self)
int hw_atl_utils_update_stats(struct aq_hw_s *self) int hw_atl_utils_update_stats(struct aq_hw_s *self)
{ {
struct hw_aq_atl_utils_mbox mbox; struct hw_atl_utils_mbox mbox;
hw_atl_utils_mpi_read_stats(self, &mbox); hw_atl_utils_mpi_read_stats(self, &mbox);
...@@ -834,7 +834,7 @@ int hw_atl_utils_get_fw_version(struct aq_hw_s *self, u32 *fw_version) ...@@ -834,7 +834,7 @@ int hw_atl_utils_get_fw_version(struct aq_hw_s *self, u32 *fw_version)
static int aq_fw1x_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac) static int aq_fw1x_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac)
{ {
struct hw_aq_atl_utils_fw_rpc *prpc = NULL; struct hw_atl_utils_fw_rpc *prpc = NULL;
unsigned int rpc_size = 0U; unsigned int rpc_size = 0U;
int err = 0; int err = 0;
...@@ -873,7 +873,7 @@ static int aq_fw1x_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac) ...@@ -873,7 +873,7 @@ static int aq_fw1x_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac)
int aq_fw1x_set_power(struct aq_hw_s *self, unsigned int power_state, int aq_fw1x_set_power(struct aq_hw_s *self, unsigned int power_state,
u8 *mac) u8 *mac)
{ {
struct hw_aq_atl_utils_fw_rpc *prpc = NULL; struct hw_atl_utils_fw_rpc *prpc = NULL;
unsigned int rpc_size = 0U; unsigned int rpc_size = 0U;
int err = 0; int err = 0;
......
...@@ -75,7 +75,7 @@ union __packed ip_addr { ...@@ -75,7 +75,7 @@ union __packed ip_addr {
} v4; } v4;
}; };
struct __packed hw_aq_atl_utils_fw_rpc { struct __packed hw_atl_utils_fw_rpc {
u32 msg_id; u32 msg_id;
union { union {
...@@ -165,7 +165,7 @@ struct __packed hw_aq_atl_utils_fw_rpc { ...@@ -165,7 +165,7 @@ struct __packed hw_aq_atl_utils_fw_rpc {
}; };
}; };
struct __packed hw_aq_atl_utils_mbox_header { struct __packed hw_atl_utils_mbox_header {
u32 version; u32 version;
u32 transaction_id; u32 transaction_id;
u32 error; u32 error;
...@@ -183,8 +183,8 @@ struct __packed hw_aq_info { ...@@ -183,8 +183,8 @@ struct __packed hw_aq_info {
u32 caps_hi; u32 caps_hi;
}; };
struct __packed hw_aq_atl_utils_mbox { struct __packed hw_atl_utils_mbox {
struct hw_aq_atl_utils_mbox_header header; struct hw_atl_utils_mbox_header header;
struct hw_atl_stats_s stats; struct hw_atl_stats_s stats;
struct hw_aq_info info; struct hw_aq_info info;
}; };
...@@ -386,10 +386,10 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self); ...@@ -386,10 +386,10 @@ int hw_atl_utils_soft_reset(struct aq_hw_s *self);
void hw_atl_utils_hw_chip_features_init(struct aq_hw_s *self, u32 *p); void hw_atl_utils_hw_chip_features_init(struct aq_hw_s *self, u32 *p);
int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self, int hw_atl_utils_mpi_read_mbox(struct aq_hw_s *self,
struct hw_aq_atl_utils_mbox_header *pmbox); struct hw_atl_utils_mbox_header *pmbox);
void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self, void hw_atl_utils_mpi_read_stats(struct aq_hw_s *self,
struct hw_aq_atl_utils_mbox *pmbox); struct hw_atl_utils_mbox *pmbox);
void hw_atl_utils_mpi_set(struct aq_hw_s *self, void hw_atl_utils_mpi_set(struct aq_hw_s *self,
enum hal_atl_utils_fw_state_e state, enum hal_atl_utils_fw_state_e state,
...@@ -425,7 +425,7 @@ int hw_atl_utils_fw_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac); ...@@ -425,7 +425,7 @@ int hw_atl_utils_fw_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac);
int hw_atl_utils_fw_rpc_call(struct aq_hw_s *self, unsigned int rpc_size); int hw_atl_utils_fw_rpc_call(struct aq_hw_s *self, unsigned int rpc_size);
int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self, int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
struct hw_aq_atl_utils_fw_rpc **rpc); struct hw_atl_utils_fw_rpc **rpc);
extern const struct aq_fw_ops aq_fw_1x_ops; extern const struct aq_fw_ops aq_fw_1x_ops;
extern const struct aq_fw_ops aq_fw_2x_ops; extern const struct aq_fw_ops aq_fw_2x_ops;
......
...@@ -302,7 +302,7 @@ int aq_fw2x_update_stats(struct aq_hw_s *self) ...@@ -302,7 +302,7 @@ int aq_fw2x_update_stats(struct aq_hw_s *self)
static int aq_fw2x_set_sleep_proxy(struct aq_hw_s *self, u8 *mac) static int aq_fw2x_set_sleep_proxy(struct aq_hw_s *self, u8 *mac)
{ {
struct hw_aq_atl_utils_fw_rpc *rpc = NULL; struct hw_atl_utils_fw_rpc *rpc = NULL;
struct offload_info *cfg = NULL; struct offload_info *cfg = NULL;
unsigned int rpc_size = 0U; unsigned int rpc_size = 0U;
u32 mpi_opts; u32 mpi_opts;
...@@ -344,7 +344,7 @@ static int aq_fw2x_set_sleep_proxy(struct aq_hw_s *self, u8 *mac) ...@@ -344,7 +344,7 @@ static int aq_fw2x_set_sleep_proxy(struct aq_hw_s *self, u8 *mac)
static int aq_fw2x_set_wol_params(struct aq_hw_s *self, u8 *mac) static int aq_fw2x_set_wol_params(struct aq_hw_s *self, u8 *mac)
{ {
struct hw_aq_atl_utils_fw_rpc *rpc = NULL; struct hw_atl_utils_fw_rpc *rpc = NULL;
struct fw2x_msg_wol *msg = NULL; struct fw2x_msg_wol *msg = NULL;
u32 mpi_opts; u32 mpi_opts;
int err = 0; int err = 0;
...@@ -412,7 +412,7 @@ static int aq_fw2x_get_eee_rate(struct aq_hw_s *self, u32 *rate, ...@@ -412,7 +412,7 @@ static int aq_fw2x_get_eee_rate(struct aq_hw_s *self, u32 *rate,
u32 mpi_state; u32 mpi_state;
u32 caps_hi; u32 caps_hi;
int err = 0; int err = 0;
u32 addr = self->mbox_addr + offsetof(struct hw_aq_atl_utils_mbox, info) + u32 addr = self->mbox_addr + offsetof(struct hw_atl_utils_mbox, info) +
offsetof(struct hw_aq_info, caps_hi); offsetof(struct hw_aq_info, caps_hi);
err = hw_atl_utils_fw_downld_dwords(self, addr, &caps_hi, err = hw_atl_utils_fw_downld_dwords(self, addr, &caps_hi,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment