Changeset d51838f in mainline for uspace/drv/nic/rtl8169/driver.c
- Timestamp:
- 2017-10-14T22:49:18Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 75911d24
- Parents:
- ce732e74
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8169/driver.c
rce732e74 rd51838f 31 31 #include <align.h> 32 32 #include <byteorder.h> 33 #include <irc.h>34 33 #include <libarch/barrier.h> 35 34 … … 38 37 #include <ddf/log.h> 39 38 #include <ddf/interrupt.h> 39 #include <device/hw_res.h> 40 #include <device/hw_res_parsed.h> 40 41 #include <io/log.h> 41 42 #include <nic.h> 42 43 #include <pci_dev_iface.h> 43 44 44 #include <ipc/irc.h>45 45 #include <sysinfo.h> 46 46 #include <ipc/ns.h> … … 396 396 rtl8169_t *rtl8169 = nic_get_specific(nic_data); 397 397 398 rtl8169->dev = dev; 399 rtl8169->parent_sess = ddf_dev_parent_sess_get(dev); 400 if (rtl8169->parent_sess == NULL) 401 return EIO; 402 398 403 /* Get PCI VID & PID */ 399 rc = pci_config_space_read_16( ddf_dev_parent_sess_get(dev),400 PCI_VENDOR_ID,&rtl8169->pci_vid);404 rc = pci_config_space_read_16(rtl8169->parent_sess, PCI_VENDOR_ID, 405 &rtl8169->pci_vid); 401 406 if (rc != EOK) 402 407 return rc; 403 408 404 rc = pci_config_space_read_16( ddf_dev_parent_sess_get(dev),405 PCI_DEVICE_ID,&rtl8169->pci_pid);409 rc = pci_config_space_read_16(rtl8169->parent_sess, PCI_DEVICE_ID, 410 &rtl8169->pci_pid); 406 411 if (rc != EOK) 407 412 return rc; … … 745 750 746 751 pio_write_16(rtl8169->regs + IMR, 0xffff); 747 irc_enable_interrupt(rtl8169->irq); 752 /* XXX Check return value */ 753 hw_res_enable_interrupt(rtl8169->parent_sess, rtl8169->irq); 748 754 749 755 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.