/* TX Mode */ #define PCH_GBE_TM_NO_RTRY 0x80000000 /* No Retransmission */ #define PCH_GBE_TM_LONG_PKT 0x40000000 /* Long Packt TX Enable */ #define PCH_GBE_TM_ST_AND_FD 0x20000000 /* Stare and Forward */ #define PCH_GBE_TM_SHORT_PKT 0x10000000 /* Short Packet TX Enable */ #define PCH_GBE_TM_LTCOL_RETX 0x08000000 /* Retransmission at Late Collision */ /* Frame Start Threshold */ #define PCH_GBE_TM_TH_TX_STRT_4 0x00000000 /* 4 words */ #define PCH_GBE_TM_TH_TX_STRT_8 0x00004000 /* 8 words */ #define PCH_GBE_TM_TH_TX_STRT_16 0x00008000 /* 16 words */ #define PCH_GBE_TM_TH_TX_STRT_32 0x0000C000 /* 32 words */ /* Transmit Almost Empty Threshold */ #define PCH_GBE_TM_TH_ALM_EMP_4 0x00000000 /* 4 words */ #define PCH_GBE_TM_TH_ALM_EMP_8 0x00000800 /* 8 words */ #define PCH_GBE_TM_TH_ALM_EMP_16 0x00001000 /* 16 words */ #define PCH_GBE_TM_TH_ALM_EMP_32 0x00001800 /* 32 words */ #define PCH_GBE_TM_TH_ALM_EMP_64 0x00002000 /* 64 words */ #define PCH_GBE_TM_TH_ALM_EMP_128 0x00002800 /* 128 words */ #define PCH_GBE_TM_TH_ALM_EMP_256 0x00003000 /* 256 words */ #define PCH_GBE_TM_TH_ALM_EMP_512 0x00003800 /* 512 words */ /* Transmit Almost Full Threshold */ #define PCH_GBE_TM_TH_ALM_FULL_4 0x00000000 /* 4 words */ #define PCH_GBE_TM_TH_ALM_FULL_8 0x00000200 /* 8 words */ #define PCH_GBE_TM_TH_ALM_FULL_16 0x00000400 /* 16 words */ #define PCH_GBE_TM_TH_ALM_FULL_32 0x00000600 /* 32 words */
/* RX FIFO Status */ #define PCH_GBE_RF_ALM_FULL 0x80000000 /* RX FIFO is almost full. */ #define PCH_GBE_RF_ALM_EMP 0x40000000 /* RX FIFO is almost empty. */ #define PCH_GBE_RF_RD_TRG 0x20000000 /* Become more than RH_RD_TRG. */ #define PCH_GBE_RF_STRWD 0x1FFE0000 /* The word count of RX FIFO. */ #define PCH_GBE_RF_RCVING 0x00010000 /* Stored in RX FIFO. */
/* MAC Address Mask */ #define PCH_GBE_BUSY 0x80000000
/* Number of Transmit and Receive Descriptors must be a multiple of 8 */ #define PCH_GBE_TX_DESC_MULTIPLE 8 #define PCH_GBE_RX_DESC_MULTIPLE 8
/* Read/Write operation is done through MII Management IF */ #define PCH_GBE_HAL_MIIM_READ ((u32)0x00000000) #define PCH_GBE_HAL_MIIM_WRITE ((u32)0x04000000)
/** * struct pch_gbe_mac_info - MAC information * @addr[6]: Store the MAC address * @fc: Mode of flow control * @fc_autoneg: Auto negotiation enable for flow control setting * @tx_fc_enable: Enable flag of Transmit flow control * @max_frame_size: Max transmit frame size * @min_frame_size: Min transmit frame size * @autoneg: Auto negotiation enable * @link_speed: Link speed * @link_duplex: Link duplex
*/ struct pch_gbe_mac_info {
u8 addr[6];
u8 fc;
u8 fc_autoneg;
u8 tx_fc_enable;
u32 max_frame_size;
u32 min_frame_size;
u8 autoneg;
u16 link_speed;
u16 link_duplex;
};
/** * struct pch_gbe_rx_desc - Receive Descriptor * @buffer_addr: RX Frame Buffer Address * @tcp_ip_status: TCP/IP Accelerator Status * @rx_words_eob: RX word count and Byte position * @gbec_status: GMAC Status * @dma_status: DMA Status * @reserved1: Reserved * @reserved2: Reserved
*/ struct pch_gbe_rx_desc {
u32 buffer_addr;
u32 tcp_ip_status;
u16 rx_words_eob;
u16 gbec_status;
u8 dma_status;
u8 reserved1;
u16 reserved2;
};
/** * struct pch_gbe_tx_desc - Transmit Descriptor * @buffer_addr: TX Frame Buffer Address * @length: Data buffer length * @reserved1: Reserved * @tx_words_eob: TX word count and Byte position * @tx_frame_ctrl: TX Frame Control * @dma_status: DMA Status * @reserved2: Reserved * @gbec_status: GMAC Status
*/ struct pch_gbe_tx_desc {
u32 buffer_addr;
u16 length;
u16 reserved1;
u16 tx_words_eob;
u16 tx_frame_ctrl;
u8 dma_status;
u8 reserved2;
u16 gbec_status;
};
/** * struct pch_gbe_buffer - Buffer information * @skb: pointer to a socket buffer * @dma: DMA address * @time_stamp: time stamp * @length: data size
*/ struct pch_gbe_buffer { struct sk_buff *skb;
dma_addr_t dma; unsignedchar *rx_buffer; unsignedlong time_stamp;
u16 length; bool mapped;
};
/** * struct pch_gbe_tx_ring - tx ring information * @desc: pointer to the descriptor ring memory * @dma: physical address of the descriptor ring * @size: length of descriptor ring in bytes * @count: number of descriptors in the ring * @next_to_use: next descriptor to associate a buffer with * @next_to_clean: next descriptor to check for DD status bit * @buffer_info: array of buffer information structs
*/ struct pch_gbe_tx_ring { struct pch_gbe_tx_desc *desc;
dma_addr_t dma; unsignedint size; unsignedint count; unsignedint next_to_use; unsignedint next_to_clean; struct pch_gbe_buffer *buffer_info;
};
/** * struct pch_gbe_rx_ring - rx ring information * @desc: pointer to the descriptor ring memory * @dma: physical address of the descriptor ring * @size: length of descriptor ring in bytes * @count: number of descriptors in the ring * @next_to_use: next descriptor to associate a buffer with * @next_to_clean: next descriptor to check for DD status bit * @buffer_info: array of buffer information structs
*/ struct pch_gbe_rx_ring { struct pch_gbe_rx_desc *desc;
dma_addr_t dma; unsignedchar *rx_buff_pool;
dma_addr_t rx_buff_pool_logic; unsignedint rx_buff_pool_size; unsignedint size; unsignedint count; unsignedint next_to_use; unsignedint next_to_clean; struct pch_gbe_buffer *buffer_info;
};
/** * struct pch_gbe_hw_stats - Statistics counters collected by the MAC * @rx_packets: total packets received * @tx_packets: total packets transmitted * @rx_bytes: total bytes received * @tx_bytes: total bytes transmitted * @rx_errors: bad packets received * @tx_errors: packet transmit problems * @rx_dropped: no space in Linux buffers * @tx_dropped: no space available in Linux * @multicast: multicast packets received * @collisions: collisions * @rx_crc_errors: received packet with crc error * @rx_frame_errors: received frame alignment error * @rx_alloc_buff_failed: allocate failure of a receive buffer * @tx_length_errors: transmit length error * @tx_aborted_errors: transmit aborted error * @tx_carrier_errors: transmit carrier error * @tx_timeout_count: Number of transmit timeout * @tx_restart_count: Number of transmit restert * @intr_rx_dsc_empty_count: Interrupt count of receive descriptor empty * @intr_rx_frame_err_count: Interrupt count of receive frame error * @intr_rx_fifo_err_count: Interrupt count of receive FIFO error * @intr_rx_dma_err_count: Interrupt count of receive DMA error * @intr_tx_fifo_err_count: Interrupt count of transmit FIFO error * @intr_tx_dma_err_count: Interrupt count of transmit DMA error * @intr_tcpip_err_count: Interrupt count of TCP/IP Accelerator
*/ struct pch_gbe_hw_stats {
u32 rx_packets;
u32 tx_packets;
u32 rx_bytes;
u32 tx_bytes;
u32 rx_errors;
u32 tx_errors;
u32 rx_dropped;
u32 tx_dropped;
u32 multicast;
u32 collisions;
u32 rx_crc_errors;
u32 rx_frame_errors;
u32 rx_alloc_buff_failed;
u32 tx_length_errors;
u32 tx_aborted_errors;
u32 tx_carrier_errors;
u32 tx_timeout_count;
u32 tx_restart_count;
u32 intr_rx_dsc_empty_count;
u32 intr_rx_frame_err_count;
u32 intr_rx_fifo_err_count;
u32 intr_rx_dma_err_count;
u32 intr_tx_fifo_err_count;
u32 intr_tx_dma_err_count;
u32 intr_tcpip_err_count;
};
/** * struct pch_gbe_privdata - PCI Device ID driver data * @phy_tx_clk_delay: Bool, configure the PHY TX delay in software * @phy_disable_hibernate: Bool, disable PHY hibernation * @platform_init: Platform initialization callback, called from * probe, prior to PHY initialization.
*/ struct pch_gbe_privdata { bool phy_tx_clk_delay; bool phy_disable_hibernate; int (*platform_init)(struct pci_dev *pdev);
};
/** * struct pch_gbe_adapter - board specific private data structure * @stats_lock: Spinlock structure for status * @ethtool_lock: Spinlock structure for ethtool * @irq_sem: Semaphore for interrupt * @netdev: Pointer of network device structure * @pdev: Pointer of pci device structure * @polling_netdev: Pointer of polling network device structure * @napi: NAPI structure * @hw: Pointer of hardware structure * @stats: Hardware status * @reset_task: Reset task * @mii: MII information structure * @watchdog_timer: Watchdog timer list * @wake_up_evt: Wake up event * @config_space: Configuration space * @msg_enable: Driver message level * @led_status: LED status * @tx_ring: Pointer of Tx descriptor ring structure * @rx_ring: Pointer of Rx descriptor ring structure * @rx_buffer_len: Receive buffer length * @tx_queue_len: Transmit queue length * @pch_gbe_privdata: PCI Device ID driver_data
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.