forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bnxt_en: New Broadcom ethernet driver.
Broadcom ethernet driver for the new family of NetXtreme-C/E ethernet devices. v5: - Removed empty blank lines at end of files (noted by David Miller). - Moved busy poll helper functions to bnxt.h to at least make the .c file look less cluttered with #ifdef (noted by Stephen Hemminger). v4: - Broke up 2 long message strings with "\n" (suggested by John Linville) - Constify an array of strings (suggested by Stephen Hemminger) - Improve bnxt_vf_pciid() (suggested by Stephen Hemminger) - Use PCI_VDEVICE() to populate pci_device_id table for more compact source. v3: - Fixed 2 more sparse warnings. - Removed some unused structures in .h files. v2: - Fixed all kbuild test robot reported warnings. - Fixed many of the checkpatch.pl errors and warnings. - Fixed the Kconfig description (noted by Dmitry Kravkov). Acked-by: Eddie Wai <[email protected]> Acked-by: Jeffrey Huang <[email protected]> Signed-off-by: Prashant Sreedharan <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- v5.11
- v5.11-rc7
- v5.11-rc6
- v5.11-rc5
- v5.11-rc4
- v5.11-rc3
- v5.11-rc2
- v5.11-rc1
- v5.10
- v5.10-rc7
- v5.10-rc6
- v5.10-rc5
- v5.10-rc4
- v5.10-rc3
- v5.10-rc2
- v5.10-rc1
- v5.9
- v5.9-rc8
- v5.9-rc7
- v5.9-rc6
- v5.9-rc5
- v5.9-rc4
- v5.9-rc3
- v5.9-rc2
- v5.9-rc1
- v5.8
- v5.8-rc7
- v5.8-rc6
- v5.8-rc5
- v5.8-rc4
- v5.8-rc3
- v5.8-rc2
- v5.8-rc1
- v5.7
- v5.7-rc7
- v5.7-rc6
- v5.7-rc5
- v5.7-rc4
- v5.7-rc3
- v5.7-rc2
- v5.7-rc1
- v5.6
- v5.6-rc7
- v5.6-rc6
- v5.6-rc5
- v5.6-rc4
- v5.6-rc3
- v5.6-rc2
- v5.6-rc1
- v5.5
- v5.5-rc7
- v5.5-rc6
- v5.5-rc5
- v5.5-rc4
- v5.5-rc3
- v5.5-rc2
- v5.5-rc1
- v5.4
- v5.4-rc8
- v5.4-rc7
- v5.4-rc6
- v5.4-rc5
- v5.4-rc4
- v5.4-rc3
- v5.4-rc2
- v5.4-rc1
- v5.3
- v5.3-rc8
- v5.3-rc7
- v5.3-rc6
- v5.3-rc5
- v5.3-rc4
- v5.3-rc3
- v5.3-rc2
- v5.3-rc1
- v5.2
- v5.2-rc7
- v5.2-rc6
- v5.2-rc5
- v5.2-rc4
- v5.2-rc3
- v5.2-rc2
- v5.2-rc1
- v5.1
- v5.1-rc7
- v5.1-rc6
- v5.1-rc5
- v5.1-rc4
- v5.1-rc3
- v5.1-rc2
- v5.1-rc1
- v5.0
- v5.0-rc8
- v5.0-rc7
- v5.0-rc6
- v5.0-rc5
- v5.0-rc4
- v5.0-rc3
- v5.0-rc2
- v5.0-rc1
- v4.20
- v4.20-rc7
- v4.20-rc6
- v4.20-rc5
- v4.20-rc4
- v4.20-rc3
- v4.20-rc2
- v4.20-rc1
- v4.19
- v4.19-rc8
- v4.19-rc7
- v4.19-rc6
- v4.19-rc5
- v4.19-rc4
- v4.19-rc3
- v4.19-rc2
- v4.19-rc1
- v4.18
- v4.18-rc8
- v4.18-rc7
- v4.18-rc6
- v4.18-rc5
- v4.18-rc4
- v4.18-rc3
- v4.18-rc2
- v4.18-rc1
- v4.17
- v4.17-rc7
- v4.17-rc6
- v4.17-rc5
- v4.17-rc4
- v4.17-rc3
- v4.17-rc2
- v4.17-rc1
- v4.16
- v4.16-rc7
- v4.16-rc6
- v4.16-rc5
- v4.16-rc4
- v4.16-rc3
- v4.16-rc2
- v4.16-rc1
- v4.15
- v4.15-rc9
- v4.15-rc8
- v4.15-rc7
- v4.15-rc6
- v4.15-rc5
- v4.15-rc4
- v4.15-rc3
- v4.15-rc2
- v4.15-rc1
- v4.14
- v4.14-rc8
- v4.14-rc7
- v4.14-rc6
- v4.14-rc5
- v4.14-rc4
- v4.14-rc3
- v4.14-rc2
- v4.14-rc1
- v4.13
- v4.13-rc7
- v4.13-rc6
- v4.13-rc5
- v4.13-rc4
- v4.13-rc3
- v4.13-rc2
- v4.13-rc1
- v4.12
- v4.12-rc7
- v4.12-rc6
- v4.12-rc5
- v4.12-rc4
- v4.12-rc3
- v4.12-rc2
- v4.12-rc1
- v4.11
- v4.11-rc8
- v4.11-rc7
- v4.11-rc6
- v4.11-rc5
- v4.11-rc4
- v4.11-rc3
- v4.11-rc2
- v4.11-rc1
- v4.10
- v4.10-rc8
- v4.10-rc7
- v4.10-rc6
- v4.10-rc5
- v4.10-rc4
- v4.10-rc3
- v4.10-rc2
- v4.10-rc1
- v4.9
- v4.9-rc8
- v4.9-rc7
- v4.9-rc6
- v4.9-rc5
- v4.9-rc4
- v4.9-rc3
- v4.9-rc2
- v4.9-rc1
- v4.8
- v4.8-rc8
- v4.8-rc7
- v4.8-rc6
- v4.8-rc5
- v4.8-rc4
- v4.8-rc3
- v4.8-rc2
- v4.8-rc1
- v4.7
- v4.7-rc7
- v4.7-rc6
- v4.7-rc5
- v4.7-rc4
- v4.7-rc3
- v4.7-rc2
- v4.7-rc1
- v4.6
- v4.6-rc7
- v4.6-rc6
- v4.6-rc5
- v4.6-rc4
- v4.6-rc3
- v4.6-rc2
- v4.6-rc1
- v4.5
- v4.5-rc7
- v4.5-rc6
- v4.5-rc5
- v4.5-rc4
- v4.5-rc3
- v4.5-rc2
- v4.5-rc1
- v4.4
- v4.4-rc8
- v4.4-rc7
- v4.4-rc6
- v4.4-rc5
- v4.4-rc4
- v4.4-rc3
- v4.4-rc2
- v4.4-rc1
Showing
12 changed files
with
13,034 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
obj-$(CONFIG_BNXT) += bnxt_en.o | ||
|
||
bnxt_en-y := bnxt.o bnxt_sriov.o bnxt_ethtool.o |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
1,149 changes: 1,149 additions & 0 deletions
1,149
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* Broadcom NetXtreme-C/E network driver. | ||
* | ||
* Copyright (c) 2014-2015 Broadcom Corporation | ||
* | ||
* 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 | ||
|
||
extern const struct ethtool_ops bnxt_ethtool_ops; | ||
|
||
u32 bnxt_fw_to_ethtool_speed(u16); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
/* Broadcom NetXtreme-C/E network driver. | ||
* | ||
* Copyright (c) 2014-2015 Broadcom Corporation | ||
* | ||
* 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_FW_HDR_H__ | ||
#define __BNXT_FW_HDR_H__ | ||
|
||
#define BNXT_FIRMWARE_BIN_SIGNATURE 0x1a4d4342 /* "BCM"+0x1a */ | ||
|
||
enum SUPPORTED_FAMILY { | ||
DEVICE_5702_3_4_FAMILY, /* 0 - Denali, Vinson, K2 */ | ||
DEVICE_5705_FAMILY, /* 1 - Bachelor */ | ||
DEVICE_SHASTA_FAMILY, /* 2 - 5751 */ | ||
DEVICE_5706_FAMILY, /* 3 - Teton */ | ||
DEVICE_5714_FAMILY, /* 4 - Hamilton */ | ||
DEVICE_STANFORD_FAMILY, /* 5 - 5755 */ | ||
DEVICE_STANFORD_ME_FAMILY, /* 6 - 5756 */ | ||
DEVICE_SOLEDAD_FAMILY, /* 7 - 5761[E] */ | ||
DEVICE_CILAI_FAMILY, /* 8 - 57780/60/90/91 */ | ||
DEVICE_ASPEN_FAMILY, /* 9 - 57781/85/61/65/91/95 */ | ||
DEVICE_ASPEN_PLUS_FAMILY, /* 10 - 57786 */ | ||
DEVICE_LOGAN_FAMILY, /* 11 - Any device in the Logan family | ||
*/ | ||
DEVICE_LOGAN_5762, /* 12 - Logan Enterprise (aka Columbia) | ||
*/ | ||
DEVICE_LOGAN_57767, /* 13 - Logan Client */ | ||
DEVICE_LOGAN_57787, /* 14 - Logan Consumer */ | ||
DEVICE_LOGAN_5725, /* 15 - Logan Server (TruManage-enabled) | ||
*/ | ||
DEVICE_SAWTOOTH_FAMILY, /* 16 - 5717/18 */ | ||
DEVICE_COTOPAXI_FAMILY, /* 17 - 5719 */ | ||
DEVICE_SNAGGLETOOTH_FAMILY, /* 18 - 5720 */ | ||
DEVICE_CUMULUS_FAMILY, /* 19 - Cumulus/Whitney */ | ||
MAX_DEVICE_FAMILY | ||
}; | ||
|
||
enum SUPPORTED_CODE { | ||
CODE_ASF1, /* 0 - ASF VERSION 1.03 <deprecated> */ | ||
CODE_ASF2, /* 1 - ASF VERSION 2.00 <deprecated> */ | ||
CODE_PASSTHRU, /* 2 - PassThru <deprecated> */ | ||
CODE_PT_SEC, /* 3 - PassThru with security <deprecated> */ | ||
CODE_UMP, /* 4 - UMP <deprecated> */ | ||
CODE_BOOT, /* 5 - Bootcode */ | ||
CODE_DASH, /* 6 - TruManage (DASH + ASF + PMCI) | ||
* Management firmwares | ||
*/ | ||
CODE_MCTP_PASSTHRU, /* 7 - NCSI / MCTP Passt-hrough firmware */ | ||
CODE_PM_OFFLOAD, /* 8 - Power-Management Proxy Offload firmwares | ||
*/ | ||
CODE_MDNS_SD_OFFLOAD, /* 9 - Multicast DNS Service Discovery Proxys | ||
* Offload firmware | ||
*/ | ||
CODE_DISC_OFFLOAD, /* 10 - Discovery Offload firmware */ | ||
CODE_MUSTANG, /* 11 - I2C Error reporting APE firmwares | ||
* <deprecated> | ||
*/ | ||
CODE_ARP_BATCH, /* 12 - ARP Batch firmware */ | ||
CODE_SMASH, /* 13 - TruManage (SMASH + DCMI/IPMI + PMCI) | ||
* Management firmware | ||
*/ | ||
CODE_APE_DIAG, /* 14 - APE Test Diag firmware */ | ||
CODE_APE_PATCH, /* 15 - APE Patch firmware */ | ||
CODE_TANG_PATCH, /* 16 - TANG Patch firmware */ | ||
CODE_KONG_FW, /* 17 - KONG firmware */ | ||
CODE_KONG_PATCH, /* 18 - KONG Patch firmware */ | ||
CODE_BONO_FW, /* 19 - BONO firmware */ | ||
CODE_BONO_PATCH, /* 20 - BONO Patch firmware */ | ||
|
||
MAX_CODE_TYPE, | ||
}; | ||
|
||
enum SUPPORTED_MEDIA { | ||
MEDIA_COPPER, /* 0 */ | ||
MEDIA_FIBER, /* 1 */ | ||
MEDIA_NONE, /* 2 */ | ||
MEDIA_COPPER_FIBER, /* 3 */ | ||
MAX_MEDIA_TYPE, | ||
}; | ||
|
||
struct bnxt_fw_header { | ||
__le32 signature; /* constains the constant value of | ||
* BNXT_Firmware_Bin_Signatures | ||
*/ | ||
u8 flags; /* reserved for ChiMP use */ | ||
u8 code_type; /* enum SUPPORTED_CODE */ | ||
u8 device; /* enum SUPPORTED_FAMILY */ | ||
u8 media; /* enum SUPPORTED_MEDIA */ | ||
u8 version[16]; /* the null terminated version string to | ||
* indicate the version of the | ||
* file, this will be copied from the binary | ||
* file version string | ||
*/ | ||
u8 build; | ||
u8 revision; | ||
u8 minor_ver; | ||
u8 major_ver; | ||
}; | ||
|
||
#endif |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* Broadcom NetXtreme-C/E network driver. | ||
* | ||
* Copyright (c) 2014-2015 Broadcom Corporation | ||
* | ||
* 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_NVM_DEFS_H_ | ||
#define _BNXT_NVM_DEFS_H_ | ||
|
||
enum bnxt_nvm_directory_type { | ||
BNX_DIR_TYPE_UNUSED = 0, | ||
BNX_DIR_TYPE_PKG_LOG = 1, | ||
BNX_DIR_TYPE_CHIMP_PATCH = 3, | ||
BNX_DIR_TYPE_BOOTCODE = 4, | ||
BNX_DIR_TYPE_VPD = 5, | ||
BNX_DIR_TYPE_EXP_ROM_MBA = 6, | ||
BNX_DIR_TYPE_AVS = 7, | ||
BNX_DIR_TYPE_PCIE = 8, | ||
BNX_DIR_TYPE_PORT_MACRO = 9, | ||
BNX_DIR_TYPE_APE_FW = 10, | ||
BNX_DIR_TYPE_APE_PATCH = 11, | ||
BNX_DIR_TYPE_KONG_FW = 12, | ||
BNX_DIR_TYPE_KONG_PATCH = 13, | ||
BNX_DIR_TYPE_BONO_FW = 14, | ||
BNX_DIR_TYPE_BONO_PATCH = 15, | ||
BNX_DIR_TYPE_TANG_FW = 16, | ||
BNX_DIR_TYPE_TANG_PATCH = 17, | ||
BNX_DIR_TYPE_BOOTCODE_2 = 18, | ||
BNX_DIR_TYPE_CCM = 19, | ||
BNX_DIR_TYPE_PCI_CFG = 20, | ||
BNX_DIR_TYPE_TSCF_UCODE = 21, | ||
BNX_DIR_TYPE_ISCSI_BOOT = 22, | ||
BNX_DIR_TYPE_ISCSI_BOOT_IPV6 = 24, | ||
BNX_DIR_TYPE_ISCSI_BOOT_IPV4N6 = 25, | ||
BNX_DIR_TYPE_ISCSI_BOOT_CFG6 = 26, | ||
BNX_DIR_TYPE_EXT_PHY = 27, | ||
BNX_DIR_TYPE_SHARED_CFG = 40, | ||
BNX_DIR_TYPE_PORT_CFG = 41, | ||
BNX_DIR_TYPE_FUNC_CFG = 42, | ||
BNX_DIR_TYPE_MGMT_CFG = 48, | ||
BNX_DIR_TYPE_MGMT_DATA = 49, | ||
BNX_DIR_TYPE_MGMT_WEB_DATA = 50, | ||
BNX_DIR_TYPE_MGMT_WEB_META = 51, | ||
BNX_DIR_TYPE_MGMT_EVENT_LOG = 52, | ||
BNX_DIR_TYPE_MGMT_AUDIT_LOG = 53 | ||
}; | ||
|
||
#define BNX_DIR_ORDINAL_FIRST 0 | ||
|
||
#define BNX_DIR_EXT_INACTIVE (1 << 0) | ||
#define BNX_DIR_EXT_UPDATE (1 << 1) | ||
|
||
#define BNX_DIR_ATTR_NO_CHKSUM (1 << 0) | ||
#define BNX_DIR_ATTR_PROP_STREAM (1 << 1) | ||
|
||
#endif /* Don't add anything after this line */ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* Broadcom NetXtreme-C/E network driver. | ||
* | ||
* Copyright (c) 2014-2015 Broadcom Corporation | ||
* | ||
* 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_SRIOV_H | ||
#define BNXT_SRIOV_H | ||
|
||
int bnxt_get_vf_config(struct net_device *, int, struct ifla_vf_info *); | ||
int bnxt_set_vf_mac(struct net_device *, int, u8 *); | ||
int bnxt_set_vf_vlan(struct net_device *, int, u16, u8); | ||
int bnxt_set_vf_bw(struct net_device *, int, int, int); | ||
int bnxt_set_vf_link_state(struct net_device *, int, int); | ||
int bnxt_set_vf_spoofchk(struct net_device *, int, bool); | ||
int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs); | ||
void bnxt_sriov_disable(struct bnxt *); | ||
void bnxt_hwrm_exec_fwd_req(struct bnxt *); | ||
#endif |