Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / net / ethernet / sfc / siena / mcdi_port_common.h
blob7a6de13d9ce6b97897dacaca83072d2d08c559b4
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /****************************************************************************
3 * Driver for Solarflare network controllers and boards
4 * Copyright 2018 Solarflare Communications Inc.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation, incorporated herein by reference.
9 */
10 #ifndef EFX_MCDI_PORT_COMMON_H
11 #define EFX_MCDI_PORT_COMMON_H
13 #include "net_driver.h"
14 #include "mcdi.h"
15 #include "mcdi_pcol.h"
17 struct efx_mcdi_phy_data {
18 u32 flags;
19 u32 type;
20 u32 supported_cap;
21 u32 channel;
22 u32 port;
23 u32 stats_mask;
24 u8 name[20];
25 u32 media;
26 u32 mmd_mask;
27 u8 revision[20];
28 u32 forced_cap;
31 void efx_siena_link_set_advertising(struct efx_nic *efx,
32 const unsigned long *advertising);
33 bool efx_siena_mcdi_phy_poll(struct efx_nic *efx);
34 int efx_siena_mcdi_phy_probe(struct efx_nic *efx);
35 void efx_siena_mcdi_phy_remove(struct efx_nic *efx);
36 void efx_siena_mcdi_phy_get_link_ksettings(struct efx_nic *efx,
37 struct ethtool_link_ksettings *cmd);
38 int efx_siena_mcdi_phy_set_link_ksettings(struct efx_nic *efx,
39 const struct ethtool_link_ksettings *cmd);
40 int efx_siena_mcdi_phy_get_fecparam(struct efx_nic *efx,
41 struct ethtool_fecparam *fec);
42 int efx_siena_mcdi_phy_set_fecparam(struct efx_nic *efx,
43 const struct ethtool_fecparam *fec);
44 int efx_siena_mcdi_phy_test_alive(struct efx_nic *efx);
45 int efx_siena_mcdi_port_reconfigure(struct efx_nic *efx);
46 int efx_siena_mcdi_phy_run_tests(struct efx_nic *efx, int *results,
47 unsigned int flags);
48 const char *efx_siena_mcdi_phy_test_name(struct efx_nic *efx,
49 unsigned int index);
50 int efx_siena_mcdi_phy_get_module_eeprom(struct efx_nic *efx,
51 struct ethtool_eeprom *ee, u8 *data);
52 int efx_siena_mcdi_phy_get_module_info(struct efx_nic *efx,
53 struct ethtool_modinfo *modinfo);
54 int efx_siena_mcdi_set_mac(struct efx_nic *efx);
55 int efx_siena_mcdi_mac_init_stats(struct efx_nic *efx);
56 void efx_siena_mcdi_mac_fini_stats(struct efx_nic *efx);
58 #endif