Changes in uspace/srv/hw/netif/dp8390/ne2000.c [7922dea:e0854e3] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/ne2000.c
r7922dea re0854e3 81 81 static int test_16(dpeth_t *dep, int pos, uint8_t *pat); 82 82 83 /** Stops the NE2000 network interface. 84 * @param[in,out] dep The network interface structure. 85 */ 86 static void ne_stop(dpeth_t *dep); 87 88 /** Initializes the NE2000 network interface. 89 * @param[in,out] dep The network interface structure. 90 */ 91 void ne_init(struct dpeth *dep); 92 83 93 int ne_probe(dpeth_t *dep) 84 94 { … … 126 136 127 137 if (dep->de_16bit) { 128 loc1 129 loc2 130 f 138 loc1= NE2000_START; 139 loc2= NE2000_START + NE2000_SIZE - 4; 140 f= test_16; 131 141 } else { 132 loc1 133 loc2 134 f 142 loc1= NE1000_START; 143 loc2= NE1000_START + NE1000_SIZE - 4; 144 f= test_8; 135 145 } 136 146 … … 139 149 f(dep, loc2, pat0) && f(dep, loc2, pat1) && 140 150 f(dep, loc2, pat2) && f(dep, loc2, pat3)) { 151 dep->de_initf = ne_init; 152 dep->de_stopf = ne_stop; 141 153 return 1; 142 154 } … … 146 158 } 147 159 148 /** Initializes the NE2000 network interface.149 *150 * @param[in,out] dep The network interface structure.151 *152 */153 160 void ne_init(dpeth_t *dep) 154 161 { … … 199 206 dep->de_stoppage = dep->de_offset_page + dep->de_ramsize / DP_PAGESIZE; 200 207 201 printf(" Novell NE%d000 ethernet card at I/O address "208 printf("%s: Novell NE%d000 ethernet card at I/O address " 202 209 "%#lx, memory size %#lx, irq %d\n", 203 dep->de_ 16bit ? 2 : 1, dep->de_base_port, dep->de_ramsize,204 dep->de_ irq);210 dep->de_name, dep->de_16bit ? 2 : 1, 211 dep->de_base_port, dep->de_ramsize, dep->de_irq); 205 212 } 206 213 … … 228 235 229 236 if (i == N) { 230 printf(" NE1000 remote DMA test failed\n");237 printf("%s: NE1000 remote DMA test failed\n", dep->de_name); 231 238 return 0; 232 239 } … … 267 274 268 275 if (i == N) { 269 printf(" NE2000 remote DMA test failed\n");276 printf("%s: NE2000 remote DMA test failed\n", dep->de_name); 270 277 return 0; 271 278 } … … 283 290 } 284 291 285 /** Stop the NE2000 network interface. 286 * 287 * @param[in,out] dep The network interface structure. 288 * 289 */ 290 void ne_stop(dpeth_t *dep) 292 static void ne_stop(dpeth_t *dep) 291 293 { 292 294 /* Reset the ethernet card */
Note:
See TracChangeset
for help on using the changeset viewer.