#include <linux/etherdevice.h>
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/mdio.h>
#include "reg.h"
#include "hw.h"
static inline bool alx_is_rev_a(u8 rev)
{ … }
static int alx_wait_mdio_idle(struct alx_hw *hw)
{ … }
static int alx_read_phy_core(struct alx_hw *hw, bool ext, u8 dev,
u16 reg, u16 *phy_data)
{ … }
static int alx_write_phy_core(struct alx_hw *hw, bool ext, u8 dev,
u16 reg, u16 phy_data)
{ … }
static int __alx_read_phy_reg(struct alx_hw *hw, u16 reg, u16 *phy_data)
{ … }
static int __alx_write_phy_reg(struct alx_hw *hw, u16 reg, u16 phy_data)
{ … }
static int __alx_read_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 *pdata)
{ … }
static int __alx_write_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 data)
{ … }
static int __alx_read_phy_dbg(struct alx_hw *hw, u16 reg, u16 *pdata)
{ … }
static int __alx_write_phy_dbg(struct alx_hw *hw, u16 reg, u16 data)
{ … }
int alx_read_phy_reg(struct alx_hw *hw, u16 reg, u16 *phy_data)
{ … }
int alx_write_phy_reg(struct alx_hw *hw, u16 reg, u16 phy_data)
{ … }
int alx_read_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 *pdata)
{ … }
int alx_write_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 data)
{ … }
static int alx_read_phy_dbg(struct alx_hw *hw, u16 reg, u16 *pdata)
{ … }
static int alx_write_phy_dbg(struct alx_hw *hw, u16 reg, u16 data)
{ … }
static u16 alx_get_phy_config(struct alx_hw *hw)
{ … }
static bool alx_wait_reg(struct alx_hw *hw, u32 reg, u32 wait, u32 *val)
{ … }
static bool alx_read_macaddr(struct alx_hw *hw, u8 *addr)
{ … }
int alx_get_perm_macaddr(struct alx_hw *hw, u8 *addr)
{ … }
void alx_set_macaddr(struct alx_hw *hw, const u8 *addr)
{ … }
static void alx_reset_osc(struct alx_hw *hw, u8 rev)
{ … }
static int alx_stop_mac(struct alx_hw *hw)
{ … }
int alx_reset_mac(struct alx_hw *hw)
{ … }
void alx_reset_phy(struct alx_hw *hw)
{ … }
#define ALX_PCI_CMD …
void alx_reset_pcie(struct alx_hw *hw)
{ … }
void alx_start_mac(struct alx_hw *hw)
{ … }
void alx_cfg_mac_flowcontrol(struct alx_hw *hw, u8 fc)
{ … }
void alx_enable_aspm(struct alx_hw *hw, bool l0s_en, bool l1_en)
{ … }
static u32 ethadv_to_hw_cfg(struct alx_hw *hw, u32 ethadv_cfg)
{ … }
int alx_setup_speed_duplex(struct alx_hw *hw, u32 ethadv, u8 flowctrl)
{ … }
void alx_post_phy_link(struct alx_hw *hw)
{ … }
bool alx_phy_configured(struct alx_hw *hw)
{ … }
int alx_read_phy_link(struct alx_hw *hw)
{ … }
int alx_clear_phy_intr(struct alx_hw *hw)
{ … }
void alx_disable_rss(struct alx_hw *hw)
{ … }
void alx_configure_basic(struct alx_hw *hw)
{ … }
void alx_mask_msix(struct alx_hw *hw, int index, bool mask)
{ … }
bool alx_get_phy_info(struct alx_hw *hw)
{ … }
void alx_update_hw_stats(struct alx_hw *hw)
{ … }