Changeset 3d5e190 in mainline for uspace/srv/hw/netif/dp8390/ne2000.c
- Timestamp:
- 2011-01-06T23:50:48Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7c34b28f, 854151c, ae1f70e
- Parents:
- ba21938 (diff), 7922dea (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/dp8390/ne2000.c
rba21938 r3d5e190 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 93 83 int ne_probe(dpeth_t *dep) 94 84 { … … 136 126 137 127 if (dep->de_16bit) { 138 loc1 = NE2000_START;139 loc2 = NE2000_START + NE2000_SIZE - 4;140 f = test_16;128 loc1 = NE2000_START; 129 loc2 = NE2000_START + NE2000_SIZE - 4; 130 f = test_16; 141 131 } else { 142 loc1 = NE1000_START;143 loc2 = NE1000_START + NE1000_SIZE - 4;144 f = test_8;132 loc1 = NE1000_START; 133 loc2 = NE1000_START + NE1000_SIZE - 4; 134 f = test_8; 145 135 } 146 136 … … 149 139 f(dep, loc2, pat0) && f(dep, loc2, pat1) && 150 140 f(dep, loc2, pat2) && f(dep, loc2, pat3)) { 151 dep->de_initf = ne_init;152 dep->de_stopf = ne_stop;153 141 return 1; 154 142 } … … 158 146 } 159 147 148 /** Initializes the NE2000 network interface. 149 * 150 * @param[in,out] dep The network interface structure. 151 * 152 */ 160 153 void ne_init(dpeth_t *dep) 161 154 { … … 206 199 dep->de_stoppage = dep->de_offset_page + dep->de_ramsize / DP_PAGESIZE; 207 200 208 printf(" %s:Novell NE%d000 ethernet card at I/O address "201 printf("Novell NE%d000 ethernet card at I/O address " 209 202 "%#lx, memory size %#lx, irq %d\n", 210 dep->de_ name, dep->de_16bit ? 2 : 1,211 dep->de_ base_port, dep->de_ramsize, dep->de_irq);203 dep->de_16bit ? 2 : 1, dep->de_base_port, dep->de_ramsize, 204 dep->de_irq); 212 205 } 213 206 … … 235 228 236 229 if (i == N) { 237 printf(" %s: NE1000 remote DMA test failed\n", dep->de_name);230 printf("NE1000 remote DMA test failed\n"); 238 231 return 0; 239 232 } … … 274 267 275 268 if (i == N) { 276 printf(" %s: NE2000 remote DMA test failed\n", dep->de_name);269 printf("NE2000 remote DMA test failed\n"); 277 270 return 0; 278 271 } … … 290 283 } 291 284 292 static void ne_stop(dpeth_t *dep) 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) 293 291 { 294 292 /* Reset the ethernet card */
Note:
See TracChangeset
for help on using the changeset viewer.