2015-10-22 16:01:17 -04:00
|
|
|
/* Broadcom NetXtreme-C/E network driver.
|
|
|
|
*
|
2016-04-05 14:08:55 -04:00
|
|
|
* Copyright (c) 2014-2016 Broadcom Corporation
|
2017-04-04 18:14:09 -04:00
|
|
|
* Copyright (c) 2016-2017 Broadcom Limited
|
2015-10-22 16:01:17 -04:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BNXT_ETHTOOL_H
|
|
|
|
#define BNXT_ETHTOOL_H
|
|
|
|
|
2017-01-13 01:32:03 -05:00
|
|
|
struct bnxt_led_cfg {
|
|
|
|
u8 led_id;
|
|
|
|
u8 led_state;
|
|
|
|
u8 led_color;
|
|
|
|
u8 unused;
|
|
|
|
__le16 led_blink_on;
|
|
|
|
__le16 led_blink_off;
|
|
|
|
u8 led_group_id;
|
|
|
|
u8 rsvd;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define BNXT_LED_DFLT_ENA \
|
|
|
|
(PORT_LED_CFG_REQ_ENABLES_LED0_ID | \
|
|
|
|
PORT_LED_CFG_REQ_ENABLES_LED0_STATE | \
|
|
|
|
PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_ON | \
|
|
|
|
PORT_LED_CFG_REQ_ENABLES_LED0_BLINK_OFF | \
|
|
|
|
PORT_LED_CFG_REQ_ENABLES_LED0_GROUP_ID)
|
|
|
|
|
|
|
|
#define BNXT_LED_DFLT_ENA_SHIFT 6
|
|
|
|
|
|
|
|
#define BNXT_LED_DFLT_ENABLES(x) \
|
|
|
|
cpu_to_le32(BNXT_LED_DFLT_ENA << (BNXT_LED_DFLT_ENA_SHIFT * (x)))
|
|
|
|
|
2020-05-04 04:50:33 -04:00
|
|
|
#define BNXT_FW_RESET_AP (ETH_RESET_AP << ETH_RESET_SHARED_SHIFT)
|
|
|
|
#define BNXT_FW_RESET_CHIP ((ETH_RESET_MGMT | ETH_RESET_IRQ | \
|
|
|
|
ETH_RESET_DMA | ETH_RESET_FILTER | \
|
|
|
|
ETH_RESET_OFFLOAD | ETH_RESET_MAC | \
|
|
|
|
ETH_RESET_PHY | ETH_RESET_RAM) \
|
|
|
|
<< ETH_RESET_SHARED_SHIFT)
|
2017-10-26 11:51:26 -04:00
|
|
|
|
2020-07-27 05:40:45 -04:00
|
|
|
#define BNXT_PXP_REG_LEN 0x3110
|
|
|
|
|
2024-02-05 14:31:54 -08:00
|
|
|
#define BNXT_IP_PROTO_FULL_MASK 0xFF
|
2024-11-04 21:13:20 -07:00
|
|
|
#define BNXT_IP_PROTO_WILDCARD 0x0
|
2024-02-05 14:31:54 -08:00
|
|
|
|
2015-10-22 16:01:17 -04:00
|
|
|
extern const struct ethtool_ops bnxt_ethtool_ops;
|
|
|
|
|
2020-07-08 07:53:54 -04:00
|
|
|
u32 bnxt_get_rxfh_indir_size(struct net_device *dev);
|
2024-02-07 17:47:35 +01:00
|
|
|
void _bnxt_fw_to_linkmode(unsigned long *mode, u16 fw_speeds);
|
2015-10-22 16:01:17 -04:00
|
|
|
u32 bnxt_fw_to_ethtool_speed(u16);
|
2024-02-07 17:47:35 +01:00
|
|
|
u16 bnxt_get_fw_auto_link_speeds(const unsigned long *mode);
|
2020-10-12 05:10:52 -04:00
|
|
|
int bnxt_hwrm_nvm_get_dev_info(struct bnxt *bp,
|
|
|
|
struct hwrm_nvm_get_dev_info_output *nvm_dev_info);
|
2021-10-29 03:47:41 -04:00
|
|
|
int bnxt_hwrm_firmware_reset(struct net_device *dev, u8 proc_type,
|
|
|
|
u8 self_reset, u8 flags);
|
2020-11-18 11:06:35 -08:00
|
|
|
int bnxt_flash_package_from_fw_obj(struct net_device *dev, const struct firmware *fw,
|
2022-05-12 22:40:24 -04:00
|
|
|
u32 install_type, struct netlink_ext_ack *extack);
|
2021-10-29 03:47:55 -04:00
|
|
|
int bnxt_get_pkginfo(struct net_device *dev, char *ver, int size);
|
2017-04-04 18:14:12 -04:00
|
|
|
void bnxt_ethtool_init(struct bnxt *bp);
|
|
|
|
void bnxt_ethtool_free(struct bnxt *bp);
|
2022-07-27 22:27:21 +05:30
|
|
|
int bnxt_find_nvram_item(struct net_device *dev, u16 type, u16 ordinal,
|
|
|
|
u16 ext, u16 *index, u32 *item_length,
|
|
|
|
u32 *data_length);
|
|
|
|
int bnxt_find_nvram_item(struct net_device *dev, u16 type, u16 ordinal,
|
|
|
|
u16 ext, u16 *index, u32 *item_length,
|
|
|
|
u32 *data_length);
|
|
|
|
int bnxt_flash_nvram(struct net_device *dev, u16 dir_type,
|
|
|
|
u16 dir_ordinal, u16 dir_ext, u16 dir_attr,
|
|
|
|
u32 dir_item_len, const u8 *data,
|
|
|
|
size_t data_len);
|
|
|
|
int bnxt_get_nvram_item(struct net_device *dev, u32 index, u32 offset,
|
|
|
|
u32 length, u8 *data);
|
2015-10-22 16:01:17 -04:00
|
|
|
|
|
|
|
#endif
|