Changeset 2ff9876 in mainline for uspace/drv/nic/rtl8169/driver.c
- Timestamp:
- 2014-08-12T21:44:45Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aa2f865
- Parents:
- 2f11e6c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8169/driver.c
r2f11e6c9 r2ff9876 328 328 } 329 329 330 static void rtl8169_dev_cleanup(ddf_dev_t *dev) 331 { 332 assert(dev); 333 334 if (ddf_dev_data_get(dev)) 335 nic_unbind_and_destroy(dev); 336 } 337 330 338 static int rtl8169_dev_initialize(ddf_dev_t *dev) 331 339 { … … 349 357 failed: 350 358 ddf_msg(LVL_ERROR, "The device initialization failed"); 351 // rtl8139_dev_cleanup(dev);359 rtl8169_dev_cleanup(dev); 352 360 return ret; 353 361 … … 464 472 err_pio: 465 473 err_destroy: 466 //rtl8169_dev_cleanup(dev);474 rtl8169_dev_cleanup(dev); 467 475 return rc; 468 476 … … 730 738 /* Configure Receive Control Register */ 731 739 uint32_t rcr = pio_read_32(rtl8169->regs + RCR); 732 rcr |= RCR_ACCEPT_ALL_PHYS | RCR_ACCEPT_PHYS_MATCH \ 733 | RCR_ACCEPT_BROADCAST | RCR_ACCEPT_ERROR \ 734 | RCR_ACCEPT_RUNT; 740 rcr |= RCR_ACCEPT_PHYS_MATCH | RCR_ACCEPT_ERROR | RCR_ACCEPT_RUNT; 735 741 pio_write_32(rtl8169->regs + RCR, rcr); 736 742 pio_write_16(rtl8169->regs + RMS, BUFFER_SIZE); … … 801 807 static int rtl8169_broadcast_set(nic_t *nic_data, nic_broadcast_mode_t mode) 802 808 { 809 rtl8169_t *rtl8169 = nic_get_specific(nic_data); 810 811 /* Configure Receive Control Register */ 812 uint32_t rcr = pio_read_32(rtl8169->regs + RCR); 813 rcr |= RCR_ACCEPT_BROADCAST; 814 pio_write_32(rtl8169->regs + RCR, rcr); 803 815 return EOK; 804 816 }
Note:
See TracChangeset
for help on using the changeset viewer.