diff options
| author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
|---|---|---|
| committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-22 10:38:37 -0500 |
| commit | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch) | |
| tree | a57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/net/ixgbe | |
| parent | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff) | |
Diffstat (limited to 'drivers/net/ixgbe')
25 files changed, 28512 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile new file mode 100644 index 00000000000..7d7387fbdec --- /dev/null +++ b/drivers/net/ixgbe/Makefile | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | ################################################################################ | ||
| 2 | # | ||
| 3 | # Intel 10 Gigabit PCI Express Linux driver | ||
| 4 | # Copyright(c) 1999 - 2010 Intel Corporation. | ||
| 5 | # | ||
| 6 | # This program is free software; you can redistribute it and/or modify it | ||
| 7 | # under the terms and conditions of the GNU General Public License, | ||
| 8 | # version 2, as published by the Free Software Foundation. | ||
| 9 | # | ||
| 10 | # This program is distributed in the hope it will be useful, but WITHOUT | ||
| 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 13 | # more details. | ||
| 14 | # | ||
| 15 | # You should have received a copy of the GNU General Public License along with | ||
| 16 | # this program; if not, write to the Free Software Foundation, Inc., | ||
| 17 | # 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 18 | # | ||
| 19 | # The full GNU General Public License is included in this distribution in | ||
| 20 | # the file called "COPYING". | ||
| 21 | # | ||
| 22 | # Contact Information: | ||
| 23 | # Linux NICS <linux.nics@intel.com> | ||
| 24 | # e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> | ||
| 25 | # Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
| 26 | # | ||
| 27 | ################################################################################ | ||
| 28 | |||
| 29 | # | ||
| 30 | # Makefile for the Intel(R) 10GbE PCI Express ethernet driver | ||
| 31 | # | ||
| 32 | |||
| 33 | obj-$(CONFIG_IXGBE) += ixgbe.o | ||
| 34 | |||
| 35 | ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_ethtool.o \ | ||
| 36 | ixgbe_82599.o ixgbe_82598.o ixgbe_phy.o ixgbe_sriov.o \ | ||
| 37 | ixgbe_mbx.o ixgbe_x540.o | ||
| 38 | |||
| 39 | ixgbe-$(CONFIG_IXGBE_DCB) += ixgbe_dcb.o ixgbe_dcb_82598.o \ | ||
| 40 | ixgbe_dcb_82599.o ixgbe_dcb_nl.o | ||
| 41 | |||
| 42 | ixgbe-$(CONFIG_FCOE:m=y) += ixgbe_fcoe.o | ||
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h new file mode 100644 index 00000000000..e04a8e49e6d --- /dev/null +++ b/drivers/net/ixgbe/ixgbe.h | |||
| @@ -0,0 +1,617 @@ | |||
| 1 | /******************************************************************************* | ||
| 2 | |||
| 3 | Intel 10 Gigabit PCI Express Linux driver | ||
| 4 | Copyright(c) 1999 - 2011 Intel Corporation. | ||
| 5 | |||
| 6 | This program is free software; you can redistribute it and/or modify it | ||
| 7 | under the terms and conditions of the GNU General Public License, | ||
| 8 | version 2, as published by the Free Software Foundation. | ||
| 9 | |||
| 10 | This program is distributed in the hope it will be useful, but WITHOUT | ||
| 11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 12 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 13 | more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License along with | ||
| 16 | this program; if not, write to the Free Software Foundation, Inc., | ||
| 17 | 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 18 | |||
| 19 | The full GNU General Public License is included in this distribution in | ||
| 20 | the file called "COPYING". | ||
| 21 | |||
| 22 | Contact Information: | ||
| 23 | e1000-devel Mailing List <e1000-devel@lists.sourceforge.net> | ||
| 24 | Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 | ||
| 25 | |||
| 26 | *******************************************************************************/ | ||
| 27 | |||
| 28 | #ifndef _IXGBE_H_ | ||
| 29 | #define _IXGBE_H_ | ||
| 30 | |||
| 31 | #include <linux/bitops.h> | ||
| 32 | #include <linux/types.h> | ||
| 33 | #include <linux/pci.h> | ||
| 34 | #include <linux/netdevice.h> | ||
| 35 | #include <linux/cpumask.h> | ||
| 36 | #include <linux/aer.h> | ||
| 37 | #include <linux/if_vlan.h> | ||
| 38 | |||
| 39 | #include "ixgbe_type.h" | ||
| 40 | #include "ixgbe_common.h" | ||
| 41 | #include "ixgbe_dcb.h" | ||
| 42 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | ||
| 43 | #define IXGBE_FCOE | ||
| 44 | #include "ixgbe_fcoe.h" | ||
| 45 | #endif /* CONFIG_FCOE or CONFIG_FCOE_MODULE */ | ||
| 46 | #ifdef CONFIG_IXGBE_DCA | ||
| 47 | #include <linux/dca.h> | ||
| 48 | #endif | ||
| 49 | |||
| 50 | /* common prefix used by pr_<> macros */ | ||
| 51 | #undef pr_fmt | ||
| 52 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 53 | |||
| 54 | /* TX/RX descriptor defines */ | ||
| 55 | #define IXGBE_DEFAULT_TXD 512 | ||
| 56 | #define IXGBE_MAX_TXD 4096 | ||
| 57 | #define IXGBE_MIN_TXD 64 | ||
| 58 | |||
| 59 | #define IXGBE_DEFAULT_RXD 512 | ||
| 60 | #define IXGBE_MAX_RXD 4096 | ||
| 61 | #define IXGBE_MIN_RXD 64 | ||
| 62 | |||
| 63 | /* flow control */ | ||
| 64 | #define IXGBE_MIN_FCRTL 0x40 | ||
| 65 | #define IXGBE_MAX_FCRTL 0x7FF80 | ||
| 66 | #define IXGBE_MIN_FCRTH 0x600 | ||
| 67 | #define IXGBE_MAX_FCRTH 0x7FFF0 | ||
| 68 | #define IXGBE_DEFAULT_FCPAUSE 0xFFFF | ||
| 69 | #define IXGBE_MIN_FCPAUSE 0 | ||
| 70 | #define IXGBE_MAX_FCPAUSE 0xFFFF | ||
| 71 | |||
| 72 | /* Supported Rx Buffer Sizes */ | ||
| 73 | #define IXGBE_RXBUFFER_512 512 /* Used for packet split */ | ||
| 74 | #define IXGBE_RXBUFFER_2048 2048 | ||
| 75 | #define IXGBE_RXBUFFER_4096 4096 | ||
| 76 | #define IXGBE_RXBUFFER_8192 8192 | ||
| 77 | #define IXGBE_MAX_RXBUFFER 16384 /* largest size for a single descriptor */ | ||
| 78 | |||
| 79 | /* | ||
| 80 | * NOTE: netdev_alloc_skb reserves up to 64 bytes, NET_IP_ALIGN mans we | ||
| 81 | * reserve 2 more, and skb_shared_info adds an additional 384 bytes more, | ||
| 82 | * this adds up to 512 bytes of extra data meaning the smallest allocation | ||
| 83 | * we could have is 1K. | ||
| 84 | * i.e. RXBUFFER_512 --> size-1024 slab | ||
| 85 | */ | ||
| 86 | #define IXGBE_RX_HDR_SIZE IXGBE_RXBUFFER_512 | ||
| 87 | |||
| 88 | #define MAXIMUM_ETHERNET_VLAN_SIZE (ETH_FRAME_LEN + ETH_FCS_LEN + VLAN_HLEN) | ||
| 89 | |||
| 90 | /* How many Rx Buffers do we bundle into one write to the hardware ? */ | ||
| 91 | #define IXGBE_RX_BUFFER_WRITE 16 /* Must be power of 2 */ | ||
| 92 | |||
| 93 | #define IXGBE_TX_FLAGS_CSUM (u32)(1) | ||
| 94 | #define IXGBE_TX_FLAGS_VLAN (u32)(1 << 1) | ||
| 95 | #define IXGBE_TX_FLAGS_TSO (u32)(1 << 2) | ||
| 96 | #define IXGBE_TX_FLAGS_IPV4 (u32)(1 << 3) | ||
| 97 | #define IXGBE_TX_FLAGS_FCOE (u32)(1 << 4) | ||
| 98 | #define IXGBE_TX_FLAGS_FSO (u32)(1 << 5) | ||
| 99 | #define IXGBE_TX_FLAGS_VLAN_MASK 0xffff0000 | ||
| 100 | #define IXGBE_TX_FLAGS_VLAN_PRIO_MASK 0x0000e000 | ||
| 101 | #define IXGBE_TX_FLAGS_VLAN_SHIFT 16 | ||
| 102 | |||
| 103 | #define IXGBE_MAX_RSC_INT_RATE 162760 | ||
| 104 | |||
| 105 | #define IXGBE_MAX_VF_MC_ENTRIES 30 | ||
| 106 | #define IXGBE_MAX_VF_FUNCTIONS 64 | ||
| 107 | #define IXGBE_MAX_VFTA_ENTRIES 128 | ||
| 108 | #define MAX_EMULATION_MAC_ADDRS 16 | ||
| 109 | #define IXGBE_MAX_PF_MACVLANS 15 | ||
| 110 | #define VMDQ_P(p) ((p) + adapter->num_vfs) | ||
| 111 | |||
| 112 | struct vf_data_storage { | ||
| 113 | unsigned char vf_mac_addresses[ETH_ALEN]; | ||
| 114 | u16 vf_mc_hashes[IXGBE_MAX_VF_MC_ENTRIES]; | ||
| 115 | u16 num_vf_mc_hashes; | ||
| 116 | u16 default_vf_vlan_id; | ||
| 117 | u16 vlans_enabled; | ||
| 118 | bool clear_to_send; | ||
| 119 | bool pf_set_mac; | ||
| 120 | u16 pf_vlan; /* When set, guest VLAN config not allowed. */ | ||
| 121 | u16 pf_qos; | ||
| 122 | u16 tx_rate; | ||
| 123 | }; | ||
| 124 | |||
| 125 | struct vf_macvlans { | ||
| 126 | struct list_head l; | ||
| 127 | int vf; | ||
| 128 | int rar_entry; | ||
| 129 | bool free; | ||
| 130 | bool is_macvlan; | ||
| 131 | u8 vf_macvlan[ETH_ALEN]; | ||
| 132 | }; | ||
| 133 | |||
| 134 | #define IXGBE_MAX_TXD_PWR 14 | ||
| 135 | # | ||
