Changeset cbfece7 in mainline for uspace/drv/nic/ne2k/ne2k.c
- Timestamp:
- 2014-07-21T22:10:18Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1f1fa64
- Parents:
- 96e368a (diff), 54a1ca7 (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/drv/nic/ne2k/ne2k.c
r96e368a rcbfece7 38 38 */ 39 39 40 /* XXX Fix this */41 #define _DDF_DATA_IMPLANT42 43 40 #include <stdio.h> 44 41 #include <errno.h> 42 #include <irc.h> 45 43 #include <stdlib.h> 46 44 #include <str_error.h> … … 256 254 if (!ne2k->up) { 257 255 int rc = ne2k_up(ne2k); 256 if (rc != EOK) 257 return rc; 258 259 rc = irc_enable_interrupt(ne2k->irq); 258 260 if (rc != EOK) { 261 ne2k_down(ne2k); 259 262 return rc; 260 263 } 261 262 nic_enable_interrupt(nic_data, ne2k->irq);263 264 } 264 265 return EOK; … … 269 270 ne2k_t *ne2k = (ne2k_t *) nic_get_specific(nic_data); 270 271 271 nic_disable_interrupt(nic_data,ne2k->irq);272 (void) irc_disable_interrupt(ne2k->irq); 272 273 ne2k->receive_configuration = RCR_AB | RCR_AM; 273 274 ne2k_down(ne2k); … … 396 397 } 397 398 398 rc = nic_connect_to_services(nic_data);399 if (rc != EOK) {400 ne2k_dev_cleanup(dev);401 return rc;402 }403 404 399 fun = ddf_fun_create(nic_get_ddf_dev(nic_data), fun_exposed, "port0"); 405 400 if (fun == NULL) { … … 407 402 return ENOMEM; 408 403 } 404 409 405 nic_set_ddf_fun(nic_data, fun); 410 406 ddf_fun_set_ops(fun, &ne2k_dev_ops); 411 ddf_fun_data_implant(fun, nic_data);412 407 413 408 rc = ddf_fun_bind(fun); … … 443 438 int main(int argc, char *argv[]) 444 439 { 440 printf("%s: HelenOS NE 2000 network adapter driver\n", NAME); 441 445 442 nic_driver_init(NAME); 446 443 nic_driver_implement(&ne2k_driver_ops, &ne2k_dev_ops, &ne2k_nic_iface);
Note:
See TracChangeset
for help on using the changeset viewer.