iPXE
|
NII driver. More...
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <ipxe/netdevice.h>
#include <ipxe/ethernet.h>
#include <ipxe/if_ether.h>
#include <ipxe/umalloc.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/efi_driver.h>
#include <ipxe/efi/efi_pci.h>
#include <ipxe/efi/efi_utils.h>
#include <ipxe/efi/Protocol/NetworkInterfaceIdentifier.h>
#include <ipxe/efi/IndustryStandard/Acpi10.h>
#include "nii.h"
Go to the source code of this file.
Data Structures | |
struct | nii_mapping |
An NII memory mapping. More... | |
struct | nii_nic |
An NII NIC. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | nii_pci_open (struct nii_nic *nii) |
Open PCI I/O protocol and identify BARs. More... | |
static void | nii_pci_close (struct nii_nic *nii) |
Close PCI I/O protocol. More... | |
static EFIAPI VOID | nii_io (UINT64 unique_id, UINT8 op, UINT8 len, UINT64 addr, UINT64 data) |
I/O callback. More... | |
static EFIAPI VOID | nii_map (UINT64 unique_id, UINT64 addr, UINT32 len, UINT32 dir, UINT64 mapped) |
Map callback. More... | |
static EFIAPI VOID | nii_unmap (UINT64 unique_id, UINT64 addr, UINT32 len, UINT32 dir __unused, UINT64 mapped) |
Unmap callback. More... | |
static EFIAPI VOID | nii_sync (UINT64 unique_id __unused, UINT64 addr, UINT32 len, UINT32 dir, UINT64 mapped) |
Sync callback. More... | |
static EFIAPI VOID | nii_delay (UINT64 unique_id __unused, UINTN microseconds) |
Delay callback. More... | |
static EFIAPI VOID | nii_block (UINT64 unique_id, UINT32 acquire) |
Block callback. More... | |
static int | nii_issue_cpb_db (struct nii_nic *nii, unsigned int op, void *cpb, size_t cpb_len, void *db, size_t db_len) |
Issue command with parameter block and data block. More... | |
static int | nii_issue_cpb (struct nii_nic *nii, unsigned int op, void *cpb, size_t cpb_len) |
Issue command with parameter block. More... | |
static int | nii_issue_db (struct nii_nic *nii, unsigned int op, void *db, size_t db_len) |
Issue command with data block. More... | |
static int | nii_issue (struct nii_nic *nii, unsigned int op) |
Issue command. More... | |
static int | nii_start_undi (struct nii_nic *nii) |
Start UNDI. More... | |
static void | nii_stop_undi (struct nii_nic *nii) |
Stop UNDI. More... | |
static int | nii_get_init_info (struct nii_nic *nii, struct net_device *netdev) |
Get initialisation information. More... | |
static int | nii_initialise_flags (struct nii_nic *nii, unsigned int flags) |
Initialise UNDI. More... | |
static int | nii_initialise_cable (struct nii_nic *nii) |
Initialise UNDI with cable detection. More... | |
static int | nii_initialise (struct nii_nic *nii) |
Initialise UNDI. More... | |
static void | nii_shutdown (struct nii_nic *nii) |
Shut down UNDI. More... | |
static int | nii_get_station_address (struct nii_nic *nii, struct net_device *netdev) |
Get station addresses. More... | |
static int | nii_set_station_address (struct nii_nic *nii, struct net_device *netdev) |
Set station address. More... | |
static int | nii_set_rx_filters (struct nii_nic *nii, unsigned int flags) |
Set receive filters. More... | |
static int | nii_enable_rx_filters (struct nii_nic *nii) |
Enable receive filters. More... | |
static int | nii_disable_rx_filters (struct nii_nic *nii) |
Disable receive filters. More... | |
static int | nii_transmit (struct net_device *netdev, struct io_buffer *iobuf) |
Transmit packet. More... | |
static void | nii_poll_tx (struct net_device *netdev, unsigned int stat) |
Poll for completed packets. More... | |
static void | nii_poll_rx (struct net_device *netdev) |
Poll for received packets. More... | |
static void | nii_poll_link (struct net_device *netdev, unsigned int stat) |
Check for link state changes. More... | |
static void | nii_poll (struct net_device *netdev) |
Poll for completed packets. More... | |
static int | nii_open (struct net_device *netdev) |
Open network device. More... | |
static void | nii_close (struct net_device *netdev) |
Close network device. More... | |
int | nii_start (struct efi_device *efidev) |
Attach driver to device. More... | |
void | nii_stop (struct efi_device *efidev) |
Detach driver from device. More... | |
Variables | |
static struct net_device_operations | nii_operations |
NII network device operations. More... | |
NII driver.
Definition in file nii.c.
#define EIO_INVALID_CDB __einfo_error ( EINFO_EIO_INVALID_CDB ) |
#define EINFO_EIO_INVALID_CDB |
#define EIO_INVALID_CPB __einfo_error ( EINFO_EIO_INVALID_CPB ) |
#define EINFO_EIO_INVALID_CPB |
#define EIO_BUSY __einfo_error ( EINFO_EIO_BUSY ) |
#define EINFO_EIO_BUSY |
#define EIO_QUEUE_FULL __einfo_error ( EINFO_EIO_QUEUE_FULL ) |
#define EINFO_EIO_QUEUE_FULL |
#define EIO_ALREADY_STARTED __einfo_error ( EINFO_EIO_ALREADY_STARTED ) |
#define EINFO_EIO_ALREADY_STARTED |
#define EIO_NOT_STARTED __einfo_error ( EINFO_EIO_NOT_STARTED ) |
#define EINFO_EIO_NOT_STARTED |
#define EIO_NOT_SHUTDOWN __einfo_error ( EINFO_EIO_NOT_SHUTDOWN ) |
#define EINFO_EIO_NOT_SHUTDOWN |
#define EIO_ALREADY_INITIALIZED __einfo_error ( EINFO_EIO_ALREADY_INITIALIZED ) |
#define EINFO_EIO_ALREADY_INITIALIZED |
#define EIO_NOT_INITIALIZED __einfo_error ( EINFO_EIO_NOT_INITIALIZED ) |
#define EINFO_EIO_NOT_INITIALIZED |
#define EIO_DEVICE_FAILURE __einfo_error ( EINFO_EIO_DEVICE_FAILURE ) |
#define EINFO_EIO_DEVICE_FAILURE |
#define EIO_NVDATA_FAILURE __einfo_error ( EINFO_EIO_NVDATA_FAILURE ) |
#define EINFO_EIO_NVDATA_FAILURE |
#define EIO_UNSUPPORTED __einfo_error ( EINFO_EIO_UNSUPPORTED ) |
#define EINFO_EIO_UNSUPPORTED |
#define EIO_BUFFER_FULL __einfo_error ( EINFO_EIO_BUFFER_FULL ) |
#define EINFO_EIO_BUFFER_FULL |
#define EIO_INVALID_PARAMETER __einfo_error ( EINFO_EIO_INVALID_PARAMETER ) |
#define EINFO_EIO_INVALID_PARAMETER |
#define EIO_INVALID_UNDI __einfo_error ( EINFO_EIO_INVALID_UNDI ) |
#define EINFO_EIO_INVALID_UNDI |
#define EIO_IPV4_NOT_SUPPORTED __einfo_error ( EINFO_EIO_IPV4_NOT_SUPPORTED ) |
#define EINFO_EIO_IPV4_NOT_SUPPORTED |
#define EIO_IPV6_NOT_SUPPORTED __einfo_error ( EINFO_EIO_IPV6_NOT_SUPPORTED ) |
#define EINFO_EIO_IPV6_NOT_SUPPORTED |
#define EIO_NOT_ENOUGH_MEMORY __einfo_error ( EINFO_EIO_NOT_ENOUGH_MEMORY ) |
#define EINFO_EIO_NOT_ENOUGH_MEMORY |
#define EIO_NO_DATA __einfo_error ( EINFO_EIO_NO_DATA ) |
#define EINFO_EIO_NO_DATA |
#define EIO_STAT | ( | stat | ) |
#define PCI_MAX_BAR 6 |
#define NII_RX_QUOTA 4 |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Open PCI I/O protocol and identify BARs.
nii | NII NIC |
rc | Return status code |
Definition at line 208 of file nii.c.
References acpi, ACPI_ADDRESS_SPACE_TYPE_IO, ACPI_ADDRESS_SPACE_TYPE_MEM, EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, DBGC, desc, nii_nic::dev, efi_device::device, EEFI, efi_image_handle, efi_locate_device(), EFI_OPEN_PROTOCOL_GET_PROTOCOL, efi_pci_io_protocol_guid, efi_systab, EFI_UNSUPPORTED, nii_nic::efidev, EFI_BOOT_SERVICES::FreePool, _EFI_PCI_IO_PROTOCOL::GetBarAttributes, nii_nic::io_bar, nii_nic::mem_bar, device::name, NULL, EFI_BOOT_SERVICES::OpenProtocol, nii_nic::pci_device, nii_nic::pci_io, PCI_MAX_BAR, rc, and strerror().
Referenced by nii_start().
|
static |
Close PCI I/O protocol.
nii | NII NIC |
rc | Return status code |
Definition at line 296 of file nii.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, DBGC, nii_nic::dev, efi_device::device, efi_image_handle, efi_pci_io_protocol_guid, efi_systab, nii_nic::efidev, free, nii_mapping::list, list_del, list_for_each_entry_safe, map, nii_nic::mappings, device::name, nii_nic::pci_device, nii_nic::pci_io, tmp, and _EFI_PCI_IO_PROTOCOL::Unmap.
Referenced by nii_start(), and nii_stop().
|
static |
I/O callback.
unique_id | NII NIC |
op | Operations |
len | Length of data |
addr | Address |
data | Data buffer |
Definition at line 324 of file nii.c.
References addr, data, DBGC, EEFI, fls, len, nii_nic::nii, op, PXE_IO_WRITE, PXE_MEM_READ, PXE_MEM_WRITE, rc, EFI_PCI_IO_PROTOCOL_ACCESS::Read, strerror(), and EFI_PCI_IO_PROTOCOL_ACCESS::Write.
Referenced by nii_start_undi().
|
static |
Map callback.
unique_id | NII NIC |
addr | Address of memory to be mapped |
len | Length of memory to be mapped |
dir | Direction of data flow |
mapped | Device mapped address to fill in |
Definition at line 370 of file nii.c.
References addr, count, DBGC, DBGC2, nii_nic::dev, EEFI, EfiPciIoOperationBusMasterCommonBuffer, EfiPciIoOperationBusMasterRead, EfiPciIoOperationBusMasterWrite, free, FROM_DEVICE, len, list_add, list_del, map, _EFI_PCI_IO_PROTOCOL::Map, nii_nic::mappings, device::name, nii_nic::nii, op, nii_nic::pci_io, phys, rc, strerror(), TO_AND_FROM_DEVICE, TO_DEVICE, and zalloc().
Referenced by nii_start_undi().
|
static |
Unmap callback.
unique_id | NII NIC |
addr | Address of mapped memory |
len | Length of mapped memory |
dir | Direction of data flow |
mapped | Device mapped address |
Definition at line 440 of file nii.c.
References addr, DBGC, DBGC2, nii_nic::dev, free, len, nii_mapping::list, list_del, list_for_each_entry, map, nii_nic::mappings, device::name, nii_nic::nii, nii_nic::pci_io, and _EFI_PCI_IO_PROTOCOL::Unmap.
Referenced by nii_start_undi().
|
static |
Sync callback.
unique_id | NII NIC |
addr | Address of mapped memory |
len | Length of mapped memory |
dir | Direction of data flow |
mapped | Device mapped address |
Definition at line 472 of file nii.c.
References addr, FROM_DEVICE, len, memcpy(), and src.
Referenced by nii_start_undi().
Delay callback.
unique_id | NII NIC |
microseconds | Delay in microseconds |
Definition at line 500 of file nii.c.
References udelay().
Referenced by nii_start_undi().
Block callback.
unique_id | NII NIC |
acquire | Acquire lock |
Definition at line 511 of file nii.c.
References EFI_SYSTEM_TABLE::BootServices, efi_systab, nii_nic::nii, EFI_BOOT_SERVICES::RaiseTPL, EFI_BOOT_SERVICES::RestoreTPL, and TPL_NOTIFY.
Referenced by nii_start_undi().
|
static |
Issue command with parameter block and data block.
nii | NII NIC |
op | Operation |
cpb | Command parameter block, or NULL |
cpb_len | Command parameter block length |
db | Data block, or NULL |
db_len | Data block length |
stat | Status flags, or negative status code |
Definition at line 563 of file nii.c.
References EFI_SYSTEM_TABLE::BootServices, s_pxe_cdb::CPBaddr, s_pxe_cdb::CPBsize, db, s_pxe_cdb::DBaddr, DBGC2, DBGC2_HD, s_pxe_cdb::DBsize, efi_internal_tpl, efi_systab, _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL::IfNum, s_pxe_cdb::IFnum, memset(), nii_nic::nii, NII_OPCODE, NII_OPFLAGS, op, s_pxe_cdb::OpCode, s_pxe_cdb::OpFlags, PXE_STATCODE_SUCCESS, PXE_STATFLAGS_STATUS_MASK, EFI_BOOT_SERVICES::RaiseTPL, and EFI_BOOT_SERVICES::RestoreTPL.
Referenced by nii_initialise_flags(), nii_issue(), nii_issue_cpb(), nii_issue_db(), and nii_poll_rx().
|
static |
Issue command with parameter block.
nii | NII NIC |
op | Operation |
cpb | Command parameter block, or NULL |
cpb_len | Command parameter block length |
stat | Status flags, or negative status code |
Definition at line 612 of file nii.c.
References nii_nic::nii, nii_issue_cpb_db(), NULL, and op.
Referenced by nii_set_station_address(), nii_start_undi(), and nii_transmit().
Issue command with data block.
nii | NII NIC |
op | Operation |
db | Data block, or NULL |
db_len | Data block length |
stat | Status flags, or negative status code |
Definition at line 627 of file nii.c.
References db, nii_nic::nii, nii_issue_cpb_db(), NULL, and op.
Referenced by nii_get_init_info(), nii_get_station_address(), and nii_poll().
|
static |
Issue command.
nii | NII NIC |
op | Operation |
stat | Status flags, or negative status code |
Definition at line 641 of file nii.c.
References nii_nic::nii, nii_issue_cpb_db(), NULL, and op.
Referenced by nii_set_rx_filters(), nii_shutdown(), and nii_stop_undi().
|
static |
Start UNDI.
nii | NII NIC |
rc | Return status code |
Definition at line 652 of file nii.c.
References s_pxe_cpb_start_31::Block, DBGC, s_pxe_cpb_start_31::Delay, EIO_STAT, s_pxe_cpb_start_31::Map_Mem, s_pxe_cpb_start_31::Mem_IO, memset(), nii_nic::nii, nii_block(), nii_delay(), nii_io(), nii_issue_cpb(), nii_map(), nii_sync(), nii_unmap(), PXE_OPCODE_START, rc, strerror(), s_pxe_cpb_start_31::Sync_Mem, s_pxe_cpb_start_31::Unique_ID, and s_pxe_cpb_start_31::UnMap_Mem.
Referenced by nii_start().
|
static |
Stop UNDI.
nii | NII NIC |
Definition at line 684 of file nii.c.
References DBGC, EIO_STAT, nii_nic::nii, nii_issue(), PXE_OPCODE_STOP, rc, and strerror().
Referenced by nii_start(), and nii_stop().
|
static |
Get initialisation information.
nii | NII NIC |
netdev | Network device to fill in |
rc | Return status code |
Definition at line 705 of file nii.c.
References assert(), db, DBGC, EIO_STAT, ENOTSUP, ll_protocol::hw_addr_len, ll_protocol::ll_addr_len, ll_protocol::ll_header_len, net_device::ll_protocol, net_device::max_pkt_len, netdev, nii_nic::nii, nii_issue_db(), PXE_IFTYPE_ETHERNET, PXE_OPCODE_GET_INIT_INFO, PXE_STATFLAGS_GET_STATUS_NO_MEDIA_SUPPORTED, rc, and strerror().
Referenced by nii_start().
|
static |
Initialise UNDI.
nii | NII NIC |
flags | Flags |
rc | Return status code |
Definition at line 752 of file nii.c.
References db, DBGC, EIO_STAT, ENOMEM, flags, s_pxe_cpb_initialize::MemoryAddr, s_pxe_cpb_initialize::MemoryLength, memset(), nii_nic::nii, nii_issue_cpb_db(), NII_OP, op, PXE_OPCODE_INITIALIZE, rc, strerror(), ufree(), and umalloc().
Referenced by nii_initialise(), and nii_initialise_cable().
|
static |
Initialise UNDI with cable detection.
nii | NII NIC |
rc | Return status code |
Definition at line 798 of file nii.c.
References flags, nii_nic::nii, nii_initialise_flags(), and PXE_OPFLAGS_INITIALIZE_DETECT_CABLE.
Referenced by nii_open().
|
static |
Initialise UNDI.
nii | NII NIC |
rc | Return status code |
Definition at line 812 of file nii.c.
References flags, nii_nic::nii, nii_initialise_flags(), and PXE_OPFLAGS_INITIALIZE_DO_NOT_DETECT_CABLE.
Referenced by nii_get_station_address(), and nii_open().
|
static |
Shut down UNDI.
nii | NII NIC |
Definition at line 825 of file nii.c.
References DBGC, EIO_STAT, nii_nic::nii, nii_issue(), PXE_OPCODE_SHUTDOWN, rc, strerror(), and ufree().
Referenced by nii_close(), nii_get_station_address(), and nii_open().
|
static |
Get station addresses.
nii | NII NIC |
netdev | Network device to fill in |
rc | Return status code |
Definition at line 849 of file nii.c.
References db, DBGC, EIO_STAT, net_device::hw_addr, ll_protocol::hw_addr_len, net_device::ll_addr, ll_protocol::ll_addr_len, net_device::ll_protocol, memcpy(), netdev, nii_nic::nii, nii_initialise(), nii_issue_db(), NII_OP, nii_shutdown(), op, PXE_OPCODE_STATION_ADDRESS, PXE_OPFLAGS_STATION_ADDRESS_READ, rc, and strerror().
Referenced by nii_start().
|
static |
Set station address.
nii | NII NIC |
netdev | Network device |
rc | Return status code |
Definition at line 891 of file nii.c.
References DBGC, EIO_STAT, ENOTSUP, implementation, net_device::ll_addr, ll_protocol::ll_addr_len, net_device::ll_protocol, memcpy(), memset(), netdev, nii_nic::nii, nii_issue_cpb(), NII_OP, op, PXE_OPCODE_STATION_ADDRESS, PXE_OPFLAGS_STATION_ADDRESS_WRITE, PXE_ROMID_IMP_STATION_ADDR_SETTABLE, rc, s_pxe_cpb_station_address::StationAddr, and strerror().
Referenced by nii_open().
|
static |
Set receive filters.
nii | NII NIC |
flags | Flags |
rc | Return status code |
Definition at line 928 of file nii.c.
References DBGC, EIO_STAT, flags, implementation, nii_nic::nii, nii_issue(), NII_OP, op, PXE_OPCODE_RECEIVE_FILTERS, PXE_OPFLAGS_RECEIVE_FILTER_ALL_MULTICAST, PXE_OPFLAGS_RECEIVE_FILTER_BROADCAST, PXE_OPFLAGS_RECEIVE_FILTER_DISABLE, PXE_OPFLAGS_RECEIVE_FILTER_ENABLE, PXE_OPFLAGS_RECEIVE_FILTER_PROMISCUOUS, PXE_OPFLAGS_RECEIVE_FILTER_UNICAST, PXE_ROMID_IMP_BROADCAST_RX_SUPPORTED, PXE_ROMID_IMP_PROMISCUOUS_MULTICAST_RX_SUPPORTED, PXE_ROMID_IMP_PROMISCUOUS_RX_SUPPORTED, rc, and strerror().
Referenced by nii_disable_rx_filters(), and nii_enable_rx_filters().
|
static |
Enable receive filters.
nii | NII NIC |
rc | Return status code |
Definition at line 965 of file nii.c.
References nii_nic::nii, nii_set_rx_filters(), and PXE_OPFLAGS_RECEIVE_FILTER_ENABLE.
Referenced by nii_open().
|
static |
Disable receive filters.
nii | NII NIC |
rc | Return status code |
Definition at line 976 of file nii.c.
References nii_nic::nii, nii_set_rx_filters(), and PXE_OPFLAGS_RECEIVE_FILTER_DISABLE.
Referenced by nii_open().
|
static |
Transmit packet.
netdev | Network device |
iobuf | I/O buffer |
rc | Return status code |
Definition at line 988 of file nii.c.
References io_buffer::data, s_pxe_cpb_transmit::DataLen, DBGC, EIO_STAT, ETH_ZLEN, s_pxe_cpb_transmit::FrameAddr, iob_len(), iob_pad(), memset(), netdev, netdev_tx_defer(), nii_nic::nii, nii_issue_cpb(), NII_OP, op, net_device::priv, PXE_OPCODE_TRANSMIT, PXE_OPFLAGS_TRANSMIT_DONT_BLOCK, PXE_OPFLAGS_TRANSMIT_WHOLE, rc, and strerror().
|
static |
Poll for completed packets.
netdev | Network device |
stat | Status flags |
Definition at line 1034 of file nii.c.
References netdev, netdev_tx_complete(), nii_nic::nii, NULL, net_device::priv, PXE_STATFLAGS_GET_STATUS_NO_TXBUFS_WRITTEN, and nii_nic::txbuf.
Referenced by nii_poll().
|
static |
Poll for received packets.
netdev | Network device |
Definition at line 1057 of file nii.c.
References alloc_iob(), s_pxe_cpb_receive::BufferAddr, s_pxe_cpb_receive::BufferLen, db, DBGC, EIO_STAT, iob_put, iob_tailroom(), memset(), netdev, netdev_rx(), netdev_rx_err(), nii_nic::nii, nii_issue_cpb_db(), NII_RX_QUOTA, NULL, net_device::priv, PXE_OPCODE_RECEIVE, PXE_STATCODE_NO_DATA, rc, and strerror().
Referenced by nii_poll().
|
static |
Check for link state changes.
netdev | Network device |
stat | Status flags |
Definition at line 1114 of file nii.c.
References netdev, netdev_link_down(), netdev_link_ok(), netdev_link_up(), and PXE_STATFLAGS_GET_STATUS_NO_MEDIA.
Referenced by nii_poll().
|
static |
Poll for completed packets.
netdev | Network device |
Definition at line 1129 of file nii.c.
References db, DBGC, EIO_STAT, memset(), netdev, nii_nic::nii, nii_issue_db(), NII_OP, nii_poll_link(), nii_poll_rx(), nii_poll_tx(), op, net_device::priv, PXE_OPCODE_GET_STATUS, PXE_OPFLAGS_GET_INTERRUPT_STATUS, PXE_OPFLAGS_GET_MEDIA_STATUS, PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS, rc, and strerror().
|
static |
Open network device.
netdev | Network device |
rc | Return status code |
Definition at line 1168 of file nii.c.
References DBGC, netdev, nii_nic::nii, nii_disable_rx_filters(), nii_enable_rx_filters(), nii_initialise(), nii_initialise_cable(), nii_set_station_address(), nii_shutdown(), net_device::priv, rc, and strerror().
|
static |
Close network device.
netdev | Network device |
Definition at line 1239 of file nii.c.
References ECANCELED, free_iob(), netdev, netdev_tx_complete_err(), nii_nic::nii, nii_shutdown(), NULL, and net_device::priv.
int nii_start | ( | struct efi_device * | efidev | ) |
Attach driver to device.
efidev | EFI device |
rc | Return status code |
Definition at line 1272 of file nii.c.
References alloc_netdev(), EFI_SYSTEM_TABLE::BootServices, device::children, EFI_BOOT_SERVICES::CloseProtocol, DBGC, DBGC_EFI_OPENERS, efi_device::dev, net_device::dev, efi_device::device, EEFI, efi_device_info(), efi_handle_name(), efi_image_handle, efi_nii31_protocol_guid, EFI_OPEN_PROTOCOL_BY_DRIVER, EFI_OPEN_PROTOCOL_EXCLUSIVE, efi_systab, nii_nic::efidev, efidev_set_drvdata(), ENODEV, ENOMEM, ENOTSUP, _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL::Id, INIT_LIST_HEAD, list_add, list_del, net_device::ll_broadcast, _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL::MajorVer, _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL::MinorVer, net_device::name, netdev, netdev_init(), netdev_link_up(), netdev_nullify(), netdev_put(), nii_nic::nii, nii_get_init_info(), nii_get_station_address(), nii_operations, nii_pci_close(), nii_pci_open(), nii_start_undi(), nii_stop_undi(), EFI_BOOT_SERVICES::OpenProtocol, net_device::priv, PXE_ROMID_IMP_HW_UNDI, PXE_ROMID_IMP_SW_VIRT_ADDR, rc, register_netdev(), strerror(), and unregister_netdev().
void nii_stop | ( | struct efi_device * | efidev | ) |
Detach driver from device.
efidev | EFI device |
Definition at line 1391 of file nii.c.
References EFI_SYSTEM_TABLE::BootServices, EFI_BOOT_SERVICES::CloseProtocol, efi_device::device, efi_image_handle, efi_nii31_protocol_guid, efi_systab, nii_nic::efidev, efidev_get_drvdata(), list_del, netdev, netdev_nullify(), netdev_put(), nii_nic::nii, nii_pci_close(), nii_stop_undi(), net_device::priv, and unregister_netdev().
|
static |
NII network device operations.
Definition at line 1259 of file nii.c.
Referenced by nii_start().