Changes in uspace/srv/hw/netif/dp8390/dp8390.h [7922dea:e0854e3] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/dp8390.h
r7922dea re0854e3 89 89 90 90 /** Page 1, read/write */ 91 #define DP_PAR0 0x01 /**< Physical Address Register 0*/92 #define DP_PAR1 0x02 /**< Physical Address Register 1*/93 #define DP_PAR2 0x03 /**< Physical Address Register 2*/94 #define DP_PAR3 0x04 /**< Physical Address Register 3*/95 #define DP_PAR4 0x05 /**< Physical Address Register 4*/96 #define DP_PAR5 0x06 /**< Physical Address Register 5*/97 #define DP_CURR 0x07 /**< Current Page Register*/98 #define DP_MAR0 0x08 /**< Multicast Address Register 0*/99 #define DP_MAR1 0x09 /**< Multicast Address Register 1*/100 #define DP_MAR2 0x0a /**< Multicast Address Register 2*/101 #define DP_MAR3 0x0b /**< Multicast Address Register 3*/102 #define DP_MAR4 0x0c /**< Multicast Address Register 4*/103 #define DP_MAR5 0x0d /**< Multicast Address Register 5*/104 #define DP_MAR6 0x0e /**< Multicast Address Register 6*/105 #define DP_MAR7 0x0f /**< Multicast Address Register 7*/91 #define DP_PAR0 0x1 /* Physical Address Register 0 */ 92 #define DP_PAR1 0x2 /* Physical Address Register 1 */ 93 #define DP_PAR2 0x3 /* Physical Address Register 2 */ 94 #define DP_PAR3 0x4 /* Physical Address Register 3 */ 95 #define DP_PAR4 0x5 /* Physical Address Register 4 */ 96 #define DP_PAR5 0x6 /* Physical Address Register 5 */ 97 #define DP_CURR 0x7 /* Current Page Register */ 98 #define DP_MAR0 0x8 /* Multicast Address Register 0 */ 99 #define DP_MAR1 0x9 /* Multicast Address Register 1 */ 100 #define DP_MAR2 0xA /* Multicast Address Register 2 */ 101 #define DP_MAR3 0xB /* Multicast Address Register 3 */ 102 #define DP_MAR4 0xC /* Multicast Address Register 4 */ 103 #define DP_MAR5 0xD /* Multicast Address Register 5 */ 104 #define DP_MAR6 0xE /* Multicast Address Register 6 */ 105 #define DP_MAR7 0xF /* Multicast Address Register 7 */ 106 106 107 107 /* Bits in dp_cr */ … … 245 245 #define outb_reg1(dep, reg, data) (outb(dep->de_dp8390_port + reg, data)) 246 246 247 /* Software interface to the dp8390 driver */ 248 249 struct dpeth; 250 251 typedef void (*dp_initf_t)(struct dpeth *dep); 252 typedef void (*dp_stopf_t)(struct dpeth *dep); 253 typedef void (*dp_user2nicf_t)(struct dpeth *dep, void *buf, size_t offset, int nic_addr, size_t size); 254 typedef void (*dp_nic2userf_t)(struct dpeth *dep, int nic_addr, void *buf, size_t offset, size_t size); 255 typedef void (*dp_getblock_t)(struct dpeth *dep, int page, size_t offset, size_t size, void *dst); 256 247 257 #define SENDQ_NR 2 /* Maximum size of the send queue */ 248 258 #define SENDQ_PAGES 6 /* 6 * DP_PAGESIZE >= 1514 bytes */ … … 254 264 * routine knows the irq and/or memory address because they are 255 265 * hardwired in the board, the probe should modify these fields. 266 * Futhermore, the probe routine should also fill in de_initf and 267 * de_stopf fields with the appropriate function pointers. 256 268 */ 257 269 port_t de_base_port; 258 270 int de_irq; 259 271 dp_initf_t de_initf; 272 dp_stopf_t de_stopf; 273 char de_name[sizeof("dp8390#n")]; 274 275 /* 276 * The initf function fills the following fields. Only cards that do 277 * programmed I/O fill in the de_pata_port field. 278 * In addition, the init routine has to fill in the sendq data 279 * structures. 280 */ 260 281 ether_addr_t de_address; 261 282 port_t de_dp8390_port; … … 279 300 280 301 /* Fields for internal use by the dp8390 driver. */ 302 int de_flags; 303 int de_mode; 281 304 eth_stat_t de_stat; 282 283 /* Driver flags */ 284 bool up; 285 bool enabled; 286 bool stopped; 287 bool sending; 288 bool send_avail; 305 dp_user2nicf_t de_user2nicf; 306 dp_nic2userf_t de_nic2userf; 307 dp_getblock_t de_getblockf; 289 308 } dpeth_t; 290 309 310 #define DEF_EMPTY 0x000 311 #define DEF_PACK_SEND 0x001 312 #define DEF_SEND_AVAIL 0x004 313 #define DEF_PROMISC 0x040 314 #define DEF_MULTI 0x080 315 #define DEF_BROAD 0x100 316 #define DEF_ENABLED 0x200 317 #define DEF_STOPPED 0x400 318 319 #define DEM_DISABLED 0x0 320 #define DEM_ENABLED 0x2 321 291 322 #endif 292 323
Note:
See TracChangeset
for help on using the changeset viewer.