iPXE
|
#include "igbvf.h"
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_ONLY) | |
int | igbvf_setup_tx_resources (struct igbvf_adapter *adapter) |
igbvf_setup_tx_resources - allocate Tx resources (Descriptors) More... | |
void | igbvf_free_tx_resources (struct igbvf_adapter *adapter) |
igbvf_free_tx_resources - Free Tx Resources per Queue @adapter: board private structure More... | |
void | igbvf_free_rx_resources (struct igbvf_adapter *adapter) |
igbvf_free_rx_resources - Free Rx Resources @adapter: board private structure More... | |
static int | igbvf_refill_rx_ring (struct igbvf_adapter *adapter) |
igbvf_refill_rx_ring - allocate Rx io_buffers More... | |
static void | igbvf_irq_disable (struct igbvf_adapter *adapter) |
igbvf_irq_disable - Mask off interrupt generation on the NIC @adapter: board private structure More... | |
static void | igbvf_irq_enable (struct igbvf_adapter *adapter) |
igbvf_irq_enable - Enable default interrupt generation settings @adapter: board private structure More... | |
static void | igbvf_irq (struct net_device *netdev, int enable) |
igbvf_irq - enable or Disable interrupts More... | |
static void | igbvf_process_tx_packets (struct net_device *netdev) |
igbvf_process_tx_packets - process transmitted packets More... | |
static void | igbvf_process_rx_packets (struct net_device *netdev) |
igbvf_process_rx_packets - process received packets More... | |
static void | igbvf_poll (struct net_device *netdev) |
igbvf_poll - Poll for received packets More... | |
void | igbvf_config_collision_dist (struct e1000_hw *hw) |
igbvf_config_collision_dist_generic - Configure collision distance @hw: pointer to the HW structure More... | |
static void | igbvf_configure_tx (struct igbvf_adapter *adapter) |
igbvf_configure_tx - Configure Transmit Unit after Reset @adapter: board private structure More... | |
void | igbvf_reset (struct igbvf_adapter *adapter) |
void | igbvf_init_function_pointers_vf (struct e1000_hw *hw) |
igbvf_init_function_pointers_vf - Inits function pointers @hw: pointer to the HW structure More... | |
static int __devinit | igbvf_sw_init (struct igbvf_adapter *adapter) |
igbvf_sw_init - Initialize general software structures (struct igbvf_adapter) @adapter: board private structure to initialize More... | |
static void | igbvf_setup_srrctl (struct igbvf_adapter *adapter) |
igbvf_setup_srrctl - configure the receive control registers @adapter: Board private structure More... | |
static void | igbvf_configure_rx (struct igbvf_adapter *adapter) |
igbvf_configure_rx - Configure 8254x Receive Unit after Reset @adapter: board private structure More... | |
int | igbvf_setup_rx_resources (struct igbvf_adapter *adapter) |
igbvf_setup_rx_resources - allocate Rx resources (Descriptors) More... | |
static int | igbvf_open (struct net_device *netdev) |
igbvf_open - Called when a network interface is made active @netdev: network interface device structure More... | |
static void | igbvf_close (struct net_device *netdev) |
igbvf_close - Disables a network interface @netdev: network interface device structure More... | |
static int | igbvf_transmit (struct net_device *netdev, struct io_buffer *iobuf) |
igbvf_transmit - Transmit a packet More... | |
void | igbvf_get_hw_control (struct igbvf_adapter *adapter) |
igbvf_get_hw_control - get control of the h/w from f/w @adapter: address of board private structure More... | |
int | igbvf_probe (struct pci_device *pdev) |
igbvf_probe - Device Initialization Routine @pdev: PCI device information struct @ent: entry in igbvf_pci_tbl More... | |
void | igbvf_remove (struct pci_device *pdev) |
igbvf_remove - Device Removal Routine @pdev: PCI device information struct More... | |
Variables | |
static struct net_device_operations | igbvf_operations |
igbvf net device operations More... | |
static struct pci_device_id | igbvf_pci_tbl [] |
struct pci_driver igbvf_driver | __pci_driver |
FILE_LICENCE | ( | GPL2_ONLY | ) |
int igbvf_setup_tx_resources | ( | struct igbvf_adapter * | adapter | ) |
igbvf_setup_tx_resources - allocate Tx resources (Descriptors)
adapter | e1000 private structure |
rc | Returns 0 on success, negative on failure |
Definition at line 43 of file igbvf_main.c.
References DBG, ENOMEM, malloc_phys(), memset(), igbvf_adapter::tx_base, igbvf_adapter::tx_ring_size, and virt_to_bus().
Referenced by igbvf_open().
void igbvf_free_tx_resources | ( | struct igbvf_adapter * | adapter | ) |
igbvf_free_tx_resources - Free Tx Resources per Queue @adapter: board private structure
Free all transmit software resources
Definition at line 77 of file igbvf_main.c.
References DBG, free_phys(), igbvf_adapter::tx_base, and igbvf_adapter::tx_ring_size.
Referenced by igbvf_close(), and igbvf_open().
void igbvf_free_rx_resources | ( | struct igbvf_adapter * | adapter | ) |
igbvf_free_rx_resources - Free Rx Resources @adapter: board private structure
Free all receive software resources
Definition at line 90 of file igbvf_main.c.
References DBG, free_iob(), free_phys(), NUM_RX_DESC, igbvf_adapter::rx_base, igbvf_adapter::rx_iobuf, and igbvf_adapter::rx_ring_size.
Referenced by igbvf_close().
|
static |
igbvf_refill_rx_ring - allocate Rx io_buffers
adapter | e1000 private structure |
rc | Returns 0 on success, negative on failure |
Definition at line 110 of file igbvf_main.c.
References alloc_iob(), io_buffer::data, DBG, DBG2, DBGP, E1000_RXD_STAT_DD, ENOMEM, ew32, e1000_adv_rx_desc::hdr_addr, igbvf_adapter::hw, MAXIMUM_ETHERNET_VLAN_SIZE, NULL, NUM_RX_DESC, e1000_adv_rx_desc::pkt_addr, rc, e1000_adv_rx_desc::read, igbvf_adapter::rx_base, igbvf_adapter::rx_curr, igbvf_adapter::rx_iobuf, e1000_adv_rx_desc::upper, virt_to_bus(), and e1000_adv_rx_desc::wb.
Referenced by igbvf_poll().
|
static |
igbvf_irq_disable - Mask off interrupt generation on the NIC @adapter: board private structure
Definition at line 154 of file igbvf_main.c.
References ew32, and igbvf_adapter::hw.
Referenced by igbvf_close(), igbvf_irq(), and igbvf_sw_init().
|
static |
igbvf_irq_enable - Enable default interrupt generation settings @adapter: board private structure
Definition at line 165 of file igbvf_main.c.
References ew32, igbvf_adapter::hw, and IMS_ENABLE_MASK.
Referenced by igbvf_irq().
|
static |
igbvf_irq - enable or Disable interrupts
adapter | e1000 adapter |
action | requested interrupt action |
Definition at line 180 of file igbvf_main.c.
References DBG, igbvf_irq_disable(), igbvf_irq_enable(), netdev, and netdev_priv().
|
static |
igbvf_process_tx_packets - process transmitted packets
netdev | network interface device structure |
Definition at line 198 of file igbvf_main.c.
References DBG, DBGP, E1000_TXD_STAT_DD, memset(), netdev, netdev_priv(), netdev_tx_complete(), NUM_TX_DESC, e1000_adv_tx_desc::status, igbvf_adapter::tx_base, igbvf_adapter::tx_fill_ctr, igbvf_adapter::tx_head, igbvf_adapter::tx_iobuf, igbvf_adapter::tx_tail, virt_to_bus(), and e1000_adv_tx_desc::wb.
Referenced by igbvf_poll().
|
static |
igbvf_process_rx_packets - process received packets
netdev | network interface device structure |
Definition at line 244 of file igbvf_main.c.
References DBG, DBG2, DBGP, E1000_RXD_STAT_DD, E1000_RXDEXT_ERR_FRAME_ERR_MASK, EINVAL, er32, igbvf_adapter::hw, iob_put, memset(), netdev, netdev_priv(), netdev_rx(), netdev_rx_err(), NULL, NUM_RX_DESC, igbvf_adapter::rx_base, igbvf_adapter::rx_curr, rx_err, igbvf_adapter::rx_iobuf, e1000_adv_rx_desc::upper, and e1000_adv_rx_desc::wb.
Referenced by igbvf_poll().
|
static |
igbvf_poll - Poll for received packets
netdev | Network device |
Definition at line 307 of file igbvf_main.c.
References DBGP, E1000_RXD_STAT_DD, igbvf_process_rx_packets(), igbvf_process_tx_packets(), igbvf_refill_rx_ring(), netdev, netdev_priv(), igbvf_adapter::rx_base, igbvf_adapter::rx_curr, e1000_adv_rx_desc::upper, and e1000_adv_rx_desc::wb.
void igbvf_config_collision_dist | ( | struct e1000_hw * | hw | ) |
igbvf_config_collision_dist_generic - Configure collision distance @hw: pointer to the HW structure
Configures the collision distance to the default value and is used during link setup. Currently no func pointer exists and all implementations are handled in the generic version of this function.
Definition at line 337 of file igbvf_main.c.
References DBG, E1000_COLD_SHIFT, E1000_COLLISION_DISTANCE, E1000_TCTL_COLD, e1e_flush, er32, and ew32.
Referenced by igbvf_configure_tx().
|
static |
igbvf_configure_tx - Configure Transmit Unit after Reset @adapter: board private structure
Configure the Tx unit of the MAC after a reset.
Definition at line 358 of file igbvf_main.c.
References DBG, E1000_ADVTXD_DCMD_DEXT, E1000_ADVTXD_DCMD_EOP, E1000_ADVTXD_DCMD_IFCS, E1000_ADVTXD_DCMD_RS, E1000_ADVTXD_DTYP_DATA, E1000_COLLISION_THRESHOLD, E1000_CT_SHIFT, E1000_TCTL_CT, E1000_TCTL_EN, E1000_TCTL_PSP, E1000_TCTL_RTLC, E1000_TXDCTL_QUEUE_ENABLE, e1e_flush, er32, ew32, igbvf_adapter::hw, igbvf_config_collision_dist(), mdelay(), igbvf_adapter::tx_base, igbvf_adapter::tx_fill_ctr, igbvf_adapter::tx_head, igbvf_adapter::tx_ring_size, igbvf_adapter::tx_tail, igbvf_adapter::txd_cmd, and virt_to_bus().
Referenced by igbvf_open().
void igbvf_reset | ( | struct igbvf_adapter * | adapter | ) |
Definition at line 426 of file igbvf_main.c.
References e1000_mac_info::addr, DBG, ETH_ALEN, igbvf_adapter::hw, net_device::hw_addr, is_valid_ether_addr(), mac, e1000_hw::mac, memcpy(), netdev, and igbvf_adapter::netdev.
Referenced by igbvf_close(), igbvf_open(), igbvf_probe(), and igbvf_remove().
void igbvf_init_function_pointers_vf | ( | struct e1000_hw * | hw | ) |
igbvf_init_function_pointers_vf - Inits function pointers @hw: pointer to the HW structure
Definition at line 83 of file igbvf_vf.c.
References DEBUGFUNC, igbvf_init_mac_params_vf(), and igbvf_init_mbx_params_vf().
Referenced by igbvf_sw_init().
|
static |
igbvf_sw_init - Initialize general software structures (struct igbvf_adapter) @adapter: board private structure to initialize
igbvf_sw_init initializes the Adapter private data structure. Fields are initialized based on PCI device information and OS network device settings (MTU size).
Definition at line 453 of file igbvf_main.c.
References DBG, pci_device::device, ETH_FCS_LEN, ETH_HLEN, ETH_ZLEN, igbvf_adapter::hw, igbvf_init_function_pointers_vf(), igbvf_irq_disable(), e1000_mac_operations::init_params, e1000_mbx_operations::init_params, e1000_hw::mac, igbvf_adapter::max_frame_size, MAXIMUM_ETHERNET_VLAN_SIZE, e1000_hw::mbx, igbvf_adapter::min_frame_size, e1000_mac_info::ops, e1000_mbx_info::ops, PCI_COMMAND, pci_read_config_byte(), pci_read_config_word(), PCI_REVISION, igbvf_adapter::pdev, rc, and pci_device::vendor.
Referenced by igbvf_probe().
|
static |
igbvf_setup_srrctl - configure the receive control registers @adapter: Board private structure
Definition at line 496 of file igbvf_main.c.
References DBG, E1000_SRRCTL_BSIZEHDR_MASK, E1000_SRRCTL_BSIZEPKT_MASK, E1000_SRRCTL_BSIZEPKT_SHIFT, E1000_SRRCTL_DESCTYPE_ADV_ONEBUF, E1000_SRRCTL_DESCTYPE_MASK, E1000_SRRCTL_DROP_EN, ew32, and igbvf_adapter::hw.
Referenced by igbvf_open().
|
static |
igbvf_configure_rx - Configure 8254x Receive Unit after Reset @adapter: board private structure
Configure the Rx unit of the MAC after a reset.
Definition at line 523 of file igbvf_main.c.
References DBG, E1000_RXDCTL_QUEUE_ENABLE, er32, ew32, igbvf_adapter::hw, igbvf_rlpml_set_vf(), IGBVF_RX_HTHRESH, IGBVF_RX_PTHRESH, IGBVF_RX_WTHRESH, igbvf_adapter::max_frame_size, msleep, NUM_RX_DESC, igbvf_adapter::rx_base, igbvf_adapter::rx_curr, igbvf_adapter::rx_ring_size, and virt_to_bus().
Referenced by igbvf_open().
int igbvf_setup_rx_resources | ( | struct igbvf_adapter * | adapter | ) |
igbvf_setup_rx_resources - allocate Rx resources (Descriptors)
adapter | e1000 private structure |
Definition at line 564 of file igbvf_main.c.
References alloc_iob(), io_buffer::data, DBG, ENOMEM, e1000_adv_rx_desc::hdr_addr, malloc_phys(), MAXIMUM_ETHERNET_VLAN_SIZE, memset(), NUM_RX_DESC, e1000_adv_rx_desc::pkt_addr, e1000_adv_rx_desc::read, igbvf_adapter::rx_base, igbvf_adapter::rx_iobuf, igbvf_adapter::rx_ring_size, e1000_adv_rx_desc::upper, virt_to_bus(), and e1000_adv_rx_desc::wb.
Referenced by igbvf_open().
|
static |
igbvf_open - Called when a network interface is made active @netdev: network interface device structure
Returns 0 on success, negative value on failure
The open entry point is called when a network interface is made active by the system (IFF_UP). At this point all resources needed for transmit and receive operations are allocated, the interrupt handler is registered with the OS, the watchdog timer is started, and the stack is notified that the interface is ready.
Definition at line 613 of file igbvf_main.c.
References e1000_mac_info::addr, DBG, ETH_ALEN, igbvf_adapter::hw, igbvf_configure_rx(), igbvf_configure_tx(), igbvf_free_tx_resources(), igbvf_reset(), igbvf_setup_rx_resources(), igbvf_setup_srrctl(), igbvf_setup_tx_resources(), net_device::ll_addr, e1000_hw::mac, memcpy(), netdev, and netdev_priv().
|
static |
igbvf_close - Disables a network interface @netdev: network interface device structure
Returns 0, this is not allowed to fail
The close entry point is called when an interface is de-activated by the OS. The hardware is still under the drivers control, but needs to be disabled. A global MAC reset is issued to stop the hardware, and all transmit and receive resources are freed.
Definition at line 668 of file igbvf_main.c.
References DBG, E1000_RXDCTL_QUEUE_ENABLE, er32, ew32, igbvf_adapter::hw, igbvf_free_rx_resources(), igbvf_free_tx_resources(), igbvf_irq_disable(), igbvf_reset(), mdelay(), netdev, and netdev_priv().
|
static |
igbvf_transmit - Transmit a packet
netdev | Network device |
iobuf | I/O buffer |
rc | Returns 0 on success, negative on failure |
Definition at line 699 of file igbvf_main.c.
References e1000_adv_tx_desc::buffer_addr, e1000_adv_tx_desc::cmd_type_len, io_buffer::data, DBG, DBGP, E1000_ADVTXD_PAYLEN_SHIFT, e1e_flush, ENOBUFS, ew32, igbvf_adapter::hw, iob_len(), netdev, netdev_priv(), NUM_TX_DESC, e1000_adv_tx_desc::olinfo_status, e1000_adv_tx_desc::read, igbvf_adapter::tx_base, igbvf_adapter::tx_fill_ctr, igbvf_adapter::tx_iobuf, igbvf_adapter::tx_tail, igbvf_adapter::txd_cmd, and virt_to_bus().
void igbvf_get_hw_control | ( | struct igbvf_adapter * | adapter | ) |
igbvf_get_hw_control - get control of the h/w from f/w @adapter: address of board private structure
igb_get_hw_control sets CTRL_EXT:DRV_LOAD bit. For ASF and Pass Through versions of f/w this means that the driver is loaded.
Definition at line 765 of file igbvf_main.c.
References E1000_CTRL_EXT_DRV_LOAD, er32, ew32, and igbvf_adapter::hw.
Referenced by igbvf_probe().
int igbvf_probe | ( | struct pci_device * | pdev | ) |
igbvf_probe - Device Initialization Routine @pdev: PCI device information struct @ent: entry in igbvf_pci_tbl
Returns 0 on success, negative on failure
igbvf_probe initializes an adapter identified by a pci_dev structure. The OS initialization, configuring of the adapter private structure, and a hardware reset occur.
Definition at line 786 of file igbvf_main.c.
References e1000_mac_info::addr, adjust_pci_device(), alloc_etherdev(), e1000_hw::back, DBG, pci_device::dev, net_device::dev, pci_device::device, EIO, ENOMEM, ETH_ALEN, ETH_FCS_LEN, ETH_FRAME_LEN, eth_random_addr(), ETH_ZLEN, igbvf_adapter::hw, e1000_hw::hw_addr, net_device::hw_addr, igbvf_get_hw_control(), igbvf_operations, igbvf_reset(), igbvf_sw_init(), e1000_hw::io_base, pci_device::ioaddr, igbvf_adapter::ioaddr, iounmap(), pci_device::irq, igbvf_adapter::irqno, is_valid_ether_addr(), e1000_hw::mac, igbvf_adapter::max_hw_frame_size, memcpy(), memset(), igbvf_adapter::min_frame_size, netdev, igbvf_adapter::netdev, netdev_init(), netdev_link_up(), netdev_priv(), netdev_put(), NUM_RX_DESC, NUM_TX_DESC, pci_bar_size(), pci_bar_start(), PCI_BASE_ADDRESS_0, pci_ioremap(), pci_set_drvdata(), igbvf_adapter::pdev, register_netdev(), igbvf_adapter::rx_base, igbvf_adapter::rx_ring_size, igbvf_adapter::tx_base, igbvf_adapter::tx_ring_size, and pci_device::vendor.
void igbvf_remove | ( | struct pci_device * | pdev | ) |
igbvf_remove - Device Removal Routine @pdev: PCI device information struct
igbvf_remove is called by the PCI subsystem to alert the driver that it should release a PCI device. The could be caused by a Hot-Plug event, or because the driver is going to be removed from memory.
Definition at line 924 of file igbvf_main.c.
References DBG, e1000_hw::flash_address, igbvf_adapter::hw, e1000_hw::hw_addr, igbvf_reset(), iounmap(), netdev, netdev_nullify(), netdev_priv(), netdev_put(), pci_get_drvdata(), and unregister_netdev().
|
static |
igbvf net device operations
Definition at line 748 of file igbvf_main.c.
Referenced by igbvf_probe().
|
static |
struct pci_driver igbvf_driver __pci_driver |
Definition at line 948 of file igbvf_main.c.