Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/if_em.h
/****************************************************************************** | /****************************************************************************** | ||||
Copyright (c) 2001-2011, Intel Corporation | Copyright (c) 2001-2015, Intel Corporation | ||||
All rights reserved. | All rights reserved. | ||||
Redistribution and use in source and binary forms, with or without | Redistribution and use in source and binary forms, with or without | ||||
modification, are permitted provided that the following conditions are met: | modification, are permitted provided that the following conditions are met: | ||||
1. Redistributions of source code must retain the above copyright notice, | 1. Redistributions of source code must retain the above copyright notice, | ||||
this list of conditions and the following disclaimer. | this list of conditions and the following disclaimer. | ||||
▲ Show 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | |||||
#define MAX_NUM_MULTICAST_ADDRESSES 128 | #define MAX_NUM_MULTICAST_ADDRESSES 128 | ||||
#define PCI_ANY_ID (~0U) | #define PCI_ANY_ID (~0U) | ||||
#define ETHER_ALIGN 2 | #define ETHER_ALIGN 2 | ||||
#define EM_FC_PAUSE_TIME 0x0680 | #define EM_FC_PAUSE_TIME 0x0680 | ||||
#define EM_EEPROM_APME 0x400; | #define EM_EEPROM_APME 0x400; | ||||
#define EM_82544_APME 0x0004; | #define EM_82544_APME 0x0004; | ||||
#define EM_QUEUE_IDLE 0 | /* | ||||
#define EM_QUEUE_WORKING 1 | * Driver state logic for the detection of a hung state | ||||
#define EM_QUEUE_HUNG 2 | * in hardware. Set TX_HUNG whenever a TX packet is used | ||||
* (data is sent) and clear it when txeof() is invoked if | |||||
* andy descriptors from the ring are cleaned/reclaimed. | |||||
* Increment internal counter if no descriptors are cleaned | |||||
* and compare to TX_MAXTRIES. When counter > TX_MAXTRIES, | |||||
* reset adapter. | |||||
*/ | |||||
#define EM_TX_IDLE 0x00000000 | |||||
#define EM_TX_HUNG 0x80000000 | |||||
#define EM_TX_MAXTRIES 10 | |||||
/* | /* | ||||
* TDBA/RDBA should be aligned on 16 byte boundary. But TDLEN/RDLEN should be | * TDBA/RDBA should be aligned on 16 byte boundary. But TDLEN/RDLEN should be | ||||
* multiple of 128 bytes. So we align TDBA/RDBA on 128 byte boundary. This will | * multiple of 128 bytes. So we align TDBA/RDBA on 128 byte boundary. This will | ||||
* also optimize cache line size effect. H/W supports up to cache line size 128. | * also optimize cache line size effect. H/W supports up to cache line size 128. | ||||
*/ | */ | ||||
#define EM_DBA_ALIGN 128 | #define EM_DBA_ALIGN 128 | ||||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
struct tx_ring { | struct tx_ring { | ||||
struct adapter *adapter; | struct adapter *adapter; | ||||
struct mtx tx_mtx; | struct mtx tx_mtx; | ||||
char mtx_name[16]; | char mtx_name[16]; | ||||
u32 me; | u32 me; | ||||
u32 msix; | u32 msix; | ||||
u32 ims; | u32 ims; | ||||
int queue_status; | int busy; | ||||
int watchdog_time; | |||||
struct em_dma_alloc txdma; | struct em_dma_alloc txdma; | ||||
struct e1000_tx_desc *tx_base; | struct e1000_tx_desc *tx_base; | ||||
struct task tx_task; | struct task tx_task; | ||||
struct taskqueue *tq; | struct taskqueue *tq; | ||||
u32 next_avail_desc; | u32 next_avail_desc; | ||||
u32 next_to_clean; | u32 next_to_clean; | ||||
struct em_buffer *tx_buffers; | struct em_buffer *tx_buffers; | ||||
volatile u16 tx_avail; | volatile u16 tx_avail; | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | struct adapter { | ||||
u32 ivars; | u32 ivars; | ||||
struct ifmedia media; | struct ifmedia media; | ||||
struct callout timer; | struct callout timer; | ||||
int msix; | int msix; | ||||
int if_flags; | int if_flags; | ||||
int max_frame_size; | int max_frame_size; | ||||
int min_frame_size; | int min_frame_size; | ||||
int pause_frames; | |||||
struct mtx core_mtx; | struct mtx core_mtx; | ||||
int em_insert_vlan_header; | int em_insert_vlan_header; | ||||
u32 ims; | u32 ims; | ||||
bool in_detach; | bool in_detach; | ||||
/* Task for FAST handling */ | /* Task for FAST handling */ | ||||
struct task link_task; | struct task link_task; | ||||
struct task que_task; | struct task que_task; | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |