.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /**************************************************************************** |
---|
2 | 3 | * Driver for Solarflare network controllers and boards |
---|
3 | 4 | * Copyright 2008-2013 Solarflare Communications Inc. |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or modify it |
---|
6 | | - * under the terms of the GNU General Public License version 2 as published |
---|
7 | | - * by the Free Software Foundation, incorporated herein by reference. |
---|
8 | 5 | */ |
---|
9 | 6 | |
---|
10 | 7 | #ifndef EFX_MCDI_H |
---|
.. | .. |
---|
193 | 190 | * 32-bit-aligned. Also, on Siena we must copy to the MC shared |
---|
194 | 191 | * memory strictly 32 bits at a time, so add any necessary padding. |
---|
195 | 192 | */ |
---|
| 193 | +#define MCDI_TX_BUF_LEN(_len) DIV_ROUND_UP((_len), 4) |
---|
196 | 194 | #define _MCDI_DECLARE_BUF(_name, _len) \ |
---|
197 | 195 | efx_dword_t _name[DIV_ROUND_UP(_len, 4)] |
---|
198 | 196 | #define MCDI_DECLARE_BUF(_name, _len) \ |
---|
.. | .. |
---|
329 | 327 | #define MCDI_EVENT_FIELD(_ev, _field) \ |
---|
330 | 328 | EFX_QWORD_FIELD(_ev, MCDI_EVENT_ ## _field) |
---|
331 | 329 | |
---|
| 330 | +#define MCDI_CAPABILITY(field) \ |
---|
| 331 | + MC_CMD_GET_CAPABILITIES_V8_OUT_ ## field ## _LBN |
---|
| 332 | + |
---|
| 333 | +#define MCDI_CAPABILITY_OFST(field) \ |
---|
| 334 | + MC_CMD_GET_CAPABILITIES_V8_OUT_ ## field ## _OFST |
---|
| 335 | + |
---|
| 336 | +#define efx_has_cap(efx, field) \ |
---|
| 337 | + efx->type->check_caps(efx, \ |
---|
| 338 | + MCDI_CAPABILITY(field), \ |
---|
| 339 | + MCDI_CAPABILITY_OFST(field)) |
---|
| 340 | + |
---|
332 | 341 | void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len); |
---|
333 | 342 | int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, |
---|
334 | 343 | u16 *fw_subtype_list, u32 *capabilities); |
---|
.. | .. |
---|
337 | 346 | int efx_mcdi_nvram_info(struct efx_nic *efx, unsigned int type, |
---|
338 | 347 | size_t *size_out, size_t *erase_size_out, |
---|
339 | 348 | bool *protected_out); |
---|
| 349 | +int efx_new_mcdi_nvram_test_all(struct efx_nic *efx); |
---|
340 | 350 | int efx_mcdi_nvram_test_all(struct efx_nic *efx); |
---|
341 | 351 | int efx_mcdi_handle_assertion(struct efx_nic *efx); |
---|
342 | | -void efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); |
---|
| 352 | +int efx_mcdi_set_id_led(struct efx_nic *efx, enum efx_led_mode mode); |
---|
343 | 353 | int efx_mcdi_wol_filter_set_magic(struct efx_nic *efx, const u8 *mac, |
---|
344 | 354 | int *id_out); |
---|
345 | 355 | int efx_mcdi_wol_filter_get_magic(struct efx_nic *efx, int *id_out); |
---|
346 | 356 | int efx_mcdi_wol_filter_remove(struct efx_nic *efx, int id); |
---|
347 | 357 | int efx_mcdi_wol_filter_reset(struct efx_nic *efx); |
---|
348 | 358 | int efx_mcdi_flush_rxqs(struct efx_nic *efx); |
---|
349 | | -int efx_mcdi_port_probe(struct efx_nic *efx); |
---|
350 | | -void efx_mcdi_port_remove(struct efx_nic *efx); |
---|
351 | | -int efx_mcdi_port_reconfigure(struct efx_nic *efx); |
---|
352 | | -int efx_mcdi_port_get_number(struct efx_nic *efx); |
---|
353 | | -u32 efx_mcdi_phy_get_caps(struct efx_nic *efx); |
---|
354 | 359 | void efx_mcdi_process_link_change(struct efx_nic *efx, efx_qword_t *ev); |
---|
355 | | -int efx_mcdi_set_mac(struct efx_nic *efx); |
---|
356 | | -#define EFX_MC_STATS_GENERATION_INVALID ((__force __le64)(-1)) |
---|
357 | 360 | void efx_mcdi_mac_start_stats(struct efx_nic *efx); |
---|
358 | 361 | void efx_mcdi_mac_stop_stats(struct efx_nic *efx); |
---|
359 | 362 | void efx_mcdi_mac_pull_stats(struct efx_nic *efx); |
---|
360 | | -bool efx_mcdi_mac_check_fault(struct efx_nic *efx); |
---|
361 | 363 | enum reset_type efx_mcdi_map_reset_reason(enum reset_type reason); |
---|
362 | 364 | int efx_mcdi_reset(struct efx_nic *efx, enum reset_type method); |
---|
363 | 365 | int efx_mcdi_set_workaround(struct efx_nic *efx, u32 type, bool enabled, |
---|