Skip to content

Commit 76c19c6

Browse files
caildavem330
authored andcommitted
net: aquantia: Change confusing no_ff_addr to more meaningful name
The address to check if HW is not dead/hang could be stored in capabilities, since it is a constant. Change its name to better reflect the idea. Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ef24175 commit 76c19c6

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

drivers/net/ethernet/aquantia/atlantic/aq_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ struct aq_hw_caps_s {
3131
u32 vecs;
3232
u32 mtu;
3333
u32 mac_regs_count;
34+
u32 hw_alive_check_addr;
3435
u8 msix_irqs;
3536
u8 tcs;
3637
u8 rxd_alignment;
@@ -102,7 +103,6 @@ struct aq_hw_s {
102103
atomic_t flags;
103104
struct aq_nic_cfg_s *aq_nic_cfg;
104105
void __iomem *mmio;
105-
unsigned int not_ff_addr;
106106
struct aq_hw_link_status_s aq_link_status;
107107
struct hw_aq_atl_utils_mbox mbox;
108108
struct hw_atl_stats_s last_stats;

drivers/net/ethernet/aquantia/atlantic/aq_hw_utils.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include "aq_hw_utils.h"
1515
#include "aq_hw.h"
16+
#include "aq_nic.h"
1617

1718
void aq_hw_write_reg_bit(struct aq_hw_s *aq_hw, u32 addr, u32 msk,
1819
u32 shift, u32 val)
@@ -39,7 +40,9 @@ u32 aq_hw_read_reg(struct aq_hw_s *hw, u32 reg)
3940
{
4041
u32 value = readl(hw->mmio + reg);
4142

42-
if ((~0U) == value && (~0U) == readl(hw->mmio + hw->not_ff_addr))
43+
if ((~0U) == value &&
44+
(~0U) == readl(hw->mmio +
45+
hw->aq_nic_cfg->aq_hw_caps->hw_alive_check_addr))
4346
aq_utils_obj_set(&hw->flags, AQ_HW_FLAG_ERR_UNPLUG);
4447

4548
return value;

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
.hw_priv_flags = IFF_UNICAST_FLT, \
4242
.flow_control = true, \
4343
.mtu = HW_ATL_A0_MTU_JUMBO, \
44-
.mac_regs_count = 88
44+
.mac_regs_count = 88, \
45+
.hw_alive_check_addr = 0x10U
4546

4647
const struct aq_hw_caps_s hw_atl_a0_caps_aqc100 = {
4748
DEFAULT_A0_BOARD_BASIC_CAPABILITIES,

drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
.hw_priv_flags = IFF_UNICAST_FLT, \
4444
.flow_control = true, \
4545
.mtu = HW_ATL_B0_MTU_JUMBO, \
46-
.mac_regs_count = 88
46+
.mac_regs_count = 88, \
47+
.hw_alive_check_addr = 0x10U
4748

4849
const struct aq_hw_caps_s hw_atl_b0_caps_aqc100 = {
4950
DEFAULT_B0_BOARD_BASIC_CAPABILITIES,

0 commit comments

Comments
 (0)