Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /****************************************************************************
0003  * Driver for Solarflare network controllers and boards
0004  * Copyright 2018 Solarflare Communications Inc.
0005  *
0006  * This program is free software; you can redistribute it and/or modify it
0007  * under the terms of the GNU General Public License version 2 as published
0008  * by the Free Software Foundation, incorporated herein by reference.
0009  */
0010 #ifndef EFX_MCDI_PORT_COMMON_H
0011 #define EFX_MCDI_PORT_COMMON_H
0012 
0013 #include "net_driver.h"
0014 #include "mcdi.h"
0015 #include "mcdi_pcol.h"
0016 
0017 struct efx_mcdi_phy_data {
0018     u32 flags;
0019     u32 type;
0020     u32 supported_cap;
0021     u32 channel;
0022     u32 port;
0023     u32 stats_mask;
0024     u8 name[20];
0025     u32 media;
0026     u32 mmd_mask;
0027     u8 revision[20];
0028     u32 forced_cap;
0029 };
0030 
0031 void efx_siena_link_set_advertising(struct efx_nic *efx,
0032                     const unsigned long *advertising);
0033 bool efx_siena_mcdi_phy_poll(struct efx_nic *efx);
0034 int efx_siena_mcdi_phy_probe(struct efx_nic *efx);
0035 void efx_siena_mcdi_phy_remove(struct efx_nic *efx);
0036 void efx_siena_mcdi_phy_get_link_ksettings(struct efx_nic *efx,
0037                        struct ethtool_link_ksettings *cmd);
0038 int efx_siena_mcdi_phy_set_link_ksettings(struct efx_nic *efx,
0039                       const struct ethtool_link_ksettings *cmd);
0040 int efx_siena_mcdi_phy_get_fecparam(struct efx_nic *efx,
0041                     struct ethtool_fecparam *fec);
0042 int efx_siena_mcdi_phy_set_fecparam(struct efx_nic *efx,
0043                     const struct ethtool_fecparam *fec);
0044 int efx_siena_mcdi_phy_test_alive(struct efx_nic *efx);
0045 int efx_siena_mcdi_port_reconfigure(struct efx_nic *efx);
0046 int efx_siena_mcdi_phy_run_tests(struct efx_nic *efx, int *results,
0047                  unsigned int flags);
0048 const char *efx_siena_mcdi_phy_test_name(struct efx_nic *efx,
0049                      unsigned int index);
0050 int efx_siena_mcdi_phy_get_module_eeprom(struct efx_nic *efx,
0051                      struct ethtool_eeprom *ee, u8 *data);
0052 int efx_siena_mcdi_phy_get_module_info(struct efx_nic *efx,
0053                        struct ethtool_modinfo *modinfo);
0054 int efx_siena_mcdi_set_mac(struct efx_nic *efx);
0055 int efx_siena_mcdi_mac_init_stats(struct efx_nic *efx);
0056 void efx_siena_mcdi_mac_fini_stats(struct efx_nic *efx);
0057 
0058 #endif