Changeset 869d936 in mainline for uspace/drv/nic/rtl8139/driver.c
- Timestamp:
- 2014-07-18T08:11:34Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e5424e9
- Parents:
- fc6abbe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/rtl8139/driver.c
rfc6abbe r869d936 35 35 #include <byteorder.h> 36 36 #include <libarch/barrier.h> 37 38 37 #include <as.h> 39 38 #include <ddf/log.h> … … 42 41 #include <nic.h> 43 42 #include <pci_dev_iface.h> 44 45 #include <ipc/irc.h> 46 #include <sysinfo.h> 47 #include <ipc/ns.h> 48 43 #include <irc.h> 44 #include <stdio.h> 49 45 #include <str.h> 50 46 … … 960 956 rtl8139->int_mask = RTL_DEFAULT_INTERRUPTS; 961 957 rtl8139_hw_int_enable(rtl8139); 962 nic_enable_interrupt(nic_data,rtl8139->irq);958 irc_enable_interrupt(rtl8139->irq); 963 959 964 960 ddf_msg(LVL_DEBUG, "Device activated, interrupt %d registered", rtl8139->irq); … … 1325 1321 goto err_pio; 1326 1322 1327 rc = nic_connect_to_services(nic_data);1328 if (rc != EOK) {1329 ddf_msg(LVL_ERROR, "Failed to connect to services (%d)", rc);1330 goto err_irq;1331 }1332 1333 1323 fun = ddf_fun_create(nic_get_ddf_dev(nic_data), fun_exposed, "port0"); 1334 1324 if (fun == NULL) { … … 1361 1351 ddf_fun_destroy(fun); 1362 1352 err_srv: 1363 /* XXX Disconnect from services */1364 err_irq:1365 1353 unregister_interrupt_handler(dev, rtl8139->irq); 1366 1354 err_pio: … … 2180 2168 int main(void) 2181 2169 { 2170 printf("%s: HelenOS RTL8139 network adapter driver\n", NAME); 2171 2172 if (irc_init() != EOK) { 2173 printf("%s: Failed connecting IRC service\n", NAME); 2174 return 1; 2175 } 2176 2182 2177 int rc = nic_driver_init(NAME); 2183 2178 if (rc != EOK) 2184 2179 return rc; 2185 nic_driver_implement( 2186 &rtl8139_driver_ops, &rtl8139_dev_ops, &rtl8139_nic_iface); 2180 2181 nic_driver_implement(&rtl8139_driver_ops, &rtl8139_dev_ops, 2182 &rtl8139_nic_iface); 2187 2183 2188 2184 ddf_log_init(NAME); 2189 ddf_msg(LVL_NOTE, "HelenOS RTL8139 driver started");2190 2185 return ddf_driver_main(&rtl8139_driver); 2191 2186 }
Note:
See TracChangeset
for help on using the changeset viewer.