iPXE
|
#include <stdint.h>
#include <byteswap.h>
#include <errno.h>
#include <ipxe/ethernet.h>
#include <ipxe/if_ether.h>
#include <ipxe/iobuf.h>
#include <ipxe/malloc.h>
#include <ipxe/netdevice.h>
#include <ipxe/nvo.h>
#include <ipxe/nvs.h>
#include <ipxe/pci.h>
#include <ipxe/timer.h>
#include "myri10ge_mcp.h"
Go to the source code of this file.
Data Structures | |
struct | myri10ge_dma_buffers |
struct | myri10ge_private |
Macros | |
#define | MYRI10GE_TRANSMIT_WRAP 1U |
#define | MYRI10GE_RECEIVE_WRAP 7U |
#define | MYRI10GE_RECEIVE_COMPLETION_WRAP 31U |
#define | DBG2_RINGS(priv) |
#define | VS_EEPROM_READ_ADDR ( vs + 0x04 ) |
#define | VS_EEPROM_READ_DATA ( vs + 0x08 ) |
#define | VS_EEPROM_WRITE ( vs + 0x0C ) |
#define | VS_ADDR ( vs + 0x18 ) |
#define | VS_DATA ( vs + 0x14 ) |
#define | VS_MODE ( vs + 0x10 ) |
#define | VS_MODE_READ32 0x3 |
#define | VS_MODE_LOCATE 0x8 |
#define | VS_LOCATE_STRING_SPECS 0x3 |
#define | VS_MODE_EEPROM_STREAM_WRITE 0xB |
#define | TRY(prefix, base, suffix) |
Variables | |
static struct pci_device_id | myri10ge_nics [] |
struct pci_driver myri10ge_driver | __pci_driver |
#define MYRI10GE_TRANSMIT_WRAP 1U |
Definition at line 115 of file myri10ge.c.
#define MYRI10GE_RECEIVE_WRAP 7U |
Definition at line 116 of file myri10ge.c.
#define MYRI10GE_RECEIVE_COMPLETION_WRAP 31U |
Definition at line 117 of file myri10ge.c.
#define DBG2_RINGS | ( | priv | ) |
Definition at line 201 of file myri10ge.c.
#define VS_EEPROM_READ_ADDR ( vs + 0x04 ) |
Definition at line 426 of file myri10ge.c.
#define VS_EEPROM_READ_DATA ( vs + 0x08 ) |
Definition at line 427 of file myri10ge.c.
#define VS_EEPROM_WRITE ( vs + 0x0C ) |
Definition at line 428 of file myri10ge.c.
#define VS_ADDR ( vs + 0x18 ) |
Definition at line 429 of file myri10ge.c.
#define VS_DATA ( vs + 0x14 ) |
Definition at line 430 of file myri10ge.c.
#define VS_MODE ( vs + 0x10 ) |
Definition at line 431 of file myri10ge.c.
#define VS_MODE_READ32 0x3 |
Definition at line 432 of file myri10ge.c.
#define VS_MODE_LOCATE 0x8 |
Definition at line 433 of file myri10ge.c.
#define VS_LOCATE_STRING_SPECS 0x3 |
Definition at line 434 of file myri10ge.c.
#define VS_MODE_EEPROM_STREAM_WRITE 0xB |
Definition at line 435 of file myri10ge.c.
FILE_LICENCE | ( | GPL2_ONLY | ) |
|
static |
Definition at line 774 of file myri10ge.c.
References adjust_pci_device(), alloc_etherdev(), DBG, DBGP, pci_device::dev, net_device::dev, ENOMEM, ENOTSUP, net_device::hw_addr, mac_address_from_string_specs(), myri10ge_net_close(), myri10ge_net_irq(), myri10ge_net_open(), myri10ge_net_poll(), myri10ge_net_transmit(), myri10ge_nv_init(), myri10ge_priv(), netdev, netdev_init(), netdev_nullify(), netdev_put(), net_device_operations::open, PCI_CAP_ID_VNDR, pci_find_capability(), pci_set_drvdata(), priv, rc, register_netdev(), strerror(), and unregister_netdev().
|
static |
Definition at line 870 of file myri10ge.c.
References DBGP, myri10ge_nv_fini(), myri10ge_priv(), netdev, netdev_nullify(), netdev_put(), pci_get_drvdata(), and unregister_netdev().
|
static |
Definition at line 894 of file myri10ge.c.
References data, DBG2_RINGS, DBGP, free_iob(), free_phys(), memset(), MXGEFW_CMD_RESET, myri10ge_command(), myri10ge_net_irq(), myri10ge_priv(), MYRI10GE_RECEIVE_WRAP, netdev, and priv.
Referenced by myri10ge_pci_probe().
|
static |
Definition at line 938 of file myri10ge.c.
References DBGP, net_device::dev, netdev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE, pci_read_config_word(), pci_write_config_word(), and val.
Referenced by myri10ge_net_close(), myri10ge_net_open(), and myri10ge_pci_probe().
|
static |
Definition at line 966 of file myri10ge.c.
References alloc_iob(), data, DBG, DBG2_RINGS, DBGP, net_device::dev, ENOMEM, EPROTO, ETH_FRAME_LEN, free_iob(), free_phys(), iob_reserve, net_device::ll_addr, MAC_ADDRESS, malloc_phys(), pci_device::membase, memset(), MXGEFW_CMD_SET_INTRQ_SIZE_FLAG_NO_STRICT_SIZE_CHECK, MXGEFW_ETH_CMD, MXGEFW_PAD, myri10ge_net_irq(), myri10ge_post_receive(), myri10ge_priv(), MYRI10GE_RECEIVE_WRAP, netdev, phys_to_virt(), priv, rc, RESET, strerror(), TRY, and virt_to_bus().
Referenced by myri10ge_pci_probe().
|
static |
Definition at line 1172 of file myri10ge.c.
References alloc_iob(), DBG, DBG2_RINGS, DBGP, dma(), ETH_FRAME_LEN, iob_put, iob_reserve, length, MXGEFW_PAD, myri10ge_interrupt_handler(), myri10ge_post_receive(), myri10ge_priv(), MYRI10GE_RECEIVE_COMPLETION_WRAP, MYRI10GE_RECEIVE_WRAP, netdev, netdev_rx(), ntohs, priv, replacement, and wmb().
Referenced by myri10ge_pci_probe().
|
static |
Definition at line 1251 of file myri10ge.c.
References mcp_kreq_ether_send::addr_high, mcp_kreq_ether_send::addr_low, io_buffer::data, DBG, DBG2, DBG2_HD, DBG2_RINGS, DBGP, ENOBUFS, ETH_ZLEN, htonl, iob_len(), iob_pad(), len, MXGEFW_FLAGS_FIRST, MXGEFW_FLAGS_NO_TSO, MXGEFW_FLAGS_SMALL, myri10ge_priv(), MYRI10GE_TRANSMIT_WRAP, netdev, priv, myri10ge_private::transmits_posted, virt_to_bus(), and wmb().
Referenced by myri10ge_pci_probe().
|
inlinestatic |
Definition at line 213 of file myri10ge.c.
Referenced by myri10ge_interrupt_handler(), myri10ge_net_close(), myri10ge_net_open(), myri10ge_net_poll(), myri10ge_net_transmit(), myri10ge_pci_probe(), and myri10ge_pci_remove().
|
inlinestatic |
Definition at line 227 of file myri10ge.c.
Referenced by myri10ge_nv_init(), myri10ge_nvs_read(), and myri10ge_nvs_write().
|
inlinestatic |
Definition at line 238 of file myri10ge.c.
References container_of, pci_device::dev, net_device::dev, and netdev.
Referenced by myri10ge_nvs_read(), and myri10ge_nvs_write().
|
static |
Definition at line 251 of file myri10ge.c.
References io_buffer::data, htonl, MYRI10GE_RECEIVE_WRAP, priv, request, virt_to_bus(), and wmb().
Referenced by myri10ge_net_open(), and myri10ge_net_poll().
|
static |
Definition at line 281 of file myri10ge.c.
References cmd, command, data, mcp_cmd_response::data, DBG, DBGP, EIO, ETIMEDOUT, htonl, ntohl, priv, result, mcp_cmd_response::result, rmb, udelay(), virt_to_bus(), and wmb().
Referenced by myri10ge_net_close().
|
static |
Definition at line 340 of file myri10ge.c.
References DBG2, htonl, mcp_irq_data::link_up, mb(), MXGEFW_LINK_UP, myri10ge_priv(), MYRI10GE_TRANSMIT_WRAP, netdev, netdev_link_down(), netdev_link_up(), netdev_tx_complete(), ntohl, priv, rmb, mcp_irq_data::stats_updated, mcp_irq_data::valid, and wmb().
Referenced by myri10ge_net_poll().
|
static |
Definition at line 447 of file myri10ge.c.
References addr, DBG, DBG2, ENOTSUP, len, limit, mac, memcmp(), memcpy(), ntohl, pci_read_config_dword(), pci_write_config_byte(), pci_write_config_dword(), strtoul(), tmp, VS_ADDR, VS_DATA, VS_LOCATE_STRING_SPECS, VS_MODE, VS_MODE_LOCATE, and VS_MODE_READ32.
Referenced by myri10ge_pci_probe().
|
static |
Definition at line 539 of file myri10ge.c.
References addr, container_of, data, DBGP, DBGP_HDA, len, myri10ge_netdev(), myri10ge_pcidev(), myri10ge_private::nvs, pci_read_config_dword(), pci_write_config_byte(), priv, VS_EEPROM_READ_ADDR, and VS_EEPROM_READ_DATA.
Referenced by myri10ge_nv_init().
|
static |
Definition at line 617 of file myri10ge.c.
References addr, container_of, DBGP, DBGP_HDA, len, myri10ge_netdev(), myri10ge_pcidev(), myri10ge_private::nvs, pci_read_config_byte(), pci_write_config_byte(), pci_write_config_dword(), priv, VS_ADDR, VS_DATA, VS_EEPROM_READ_ADDR, VS_EEPROM_READ_DATA, VS_EEPROM_WRITE, VS_MODE, and VS_MODE_EEPROM_STREAM_WRITE.
Referenced by myri10ge_nv_init().
|
static |
Definition at line 668 of file myri10ge.c.
References DBG, DBG2, DBGP, hdr, myri10ge_netdev(), myri10ge_nvs_read(), myri10ge_nvs_write(), netdev_settings(), ntohl, NULL, nvo_init(), priv, rc, register_nvo(), and version.
Referenced by myri10ge_pci_probe().
void myri10ge_nv_fini | ( | struct myri10ge_private * | priv | ) |
Definition at line 750 of file myri10ge.c.
References priv, and unregister_nvo().
Referenced by myri10ge_pci_remove().
|
static |
Definition at line 1318 of file myri10ge.c.
struct pci_driver myri10ge_driver __pci_driver |
Definition at line 1323 of file myri10ge.c.