⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sitsang_eth_info.h

📁 Intel XScale PXA255 引导Linux的Redboot 版bootloader源代码!
💻 H
字号:
#include "lan91c96.h"// ------------------------------------------------------------------------////                      DEVICES AND PACKET QUEUES//// ------------------------------------------------------------------------// The system seems to work OK with as few as 8 of RX and TX descriptors.// It limps very painfully with only 4.// Performance is better with more than 8.// But the size of non-cached (so useless for anything else)// memory window is 1Mb, so we might as well use it all.//// 128 for these uses the whole 1Mb, near enough.#ifndef MAX_RX_DESCRIPTORS#ifdef CYGPKG_REDBOOT#define MAX_RX_DESCRIPTORS	4       // number of Rx descriptors#else#define MAX_RX_DESCRIPTORS	128     // number of Rx descriptors#endif#endif#ifndef MAX_TX_DESCRIPTORS#ifdef CYGPKG_REDBOOT#define MAX_TX_DESCRIPTORS	4       // number of Tx descriptors#else#define MAX_TX_DESCRIPTORS	128     // number of Tx descriptors#endif#endiftypedef struct LAN91c96T {    cyg_uint8                           // (split up for atomic byte access)        found:1,                        // was hardware discovered?        mac_addr_ok:1,                  // can we bring up?        active:1,                       // has this if been brung up?        spare1:5;     cyg_uint8        spare2:8;     cyg_uint8        tx_in_progress:1,               // transmit in progress flag        tx_queue_full:1,                // all Tx descriptors used flag        spare3:6;     cyg_uint8  index;                   // 0 or 1 or whatever    cyg_uint32 devid;                   // PCI device id    cyg_uint32 memory_address;          // PCI memory address    cyg_uint32 io_address;              // memory mapped I/O address    cyg_uint8  mac_address[6];          // mac (hardware) address    void *ndp;                          // Network Device Pointer    int next_rx_descriptor;             // descriptor index for RFDs    struct rfd *rx_ring[MAX_RX_DESCRIPTORS]; // location of Rx descriptors    int tx_descriptor_add;              // descriptor index for additions    int tx_descriptor_active;           // descriptor index for active tx    int tx_descriptor_remove;           // descriptor index for remove    struct txcb *tx_ring[MAX_TX_DESCRIPTORS];  // location of Tx descriptors    unsigned long tx_keys[MAX_TX_DESCRIPTORS];                                        // keys for tx q management    // Interrupt handling stuff    cyg_vector_t    vector;             // interrupt vector    cyg_handle_t    interrupt_handle;   // handle for int.handler    cyg_interrupt   interrupt_object;#ifdef KEEP_STATISTICS    void *p_statistics;                 // pointer to statistical counters#endif} LAN91c96;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -