Changeset cbfece7 in mainline for uspace/drv/nic/e1k/e1k.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/e1k/e1k.c
r96e368a rcbfece7 33 33 */ 34 34 35 /* XXX Fix this */36 #define _DDF_DATA_IMPLANT37 38 35 #include <assert.h> 39 36 #include <stdio.h> … … 42 39 #include <align.h> 43 40 #include <byteorder.h> 44 #include <sysinfo.h> 45 #include <ipc/irc.h> 46 #include <ipc/ns.h> 41 #include <irc.h> 42 #include <as.h> 47 43 #include <ddi.h> 48 #include <as.h>49 44 #include <ddf/log.h> 50 45 #include <ddf/interrupt.h> … … 1758 1753 e1000_enable_interrupts(e1000); 1759 1754 1760 nic_enable_interrupt(nic, e1000->irq); 1755 int rc = irc_enable_interrupt(e1000->irq); 1756 if (rc != EOK) { 1757 e1000_disable_interrupts(e1000); 1758 fibril_mutex_unlock(&e1000->ctrl_lock); 1759 fibril_mutex_unlock(&e1000->tx_lock); 1760 fibril_mutex_unlock(&e1000->rx_lock); 1761 return rc; 1762 } 1761 1763 1762 1764 e1000_clear_rx_ring(e1000); … … 1796 1798 e1000_disable_rx(e1000); 1797 1799 1798 nic_disable_interrupt(nic,e1000->irq);1800 irc_disable_interrupt(e1000->irq); 1799 1801 e1000_disable_interrupts(e1000); 1800 1802 … … 2148 2150 nic_set_ddf_fun(nic, fun); 2149 2151 ddf_fun_set_ops(fun, &e1000_dev_ops); 2150 ddf_fun_data_implant(fun, nic);2151 2152 2152 2153 rc = e1000_register_int_handler(nic); 2153 2154 if (rc != EOK) 2154 2155 goto err_fun_create; 2155 2156 rc = nic_connect_to_services(nic);2157 if (rc != EOK)2158 goto err_irq;2159 2156 2160 2157 rc = e1000_initialize_rx_structure(nic); … … 2379 2376 int main(void) 2380 2377 { 2381 int rc = nic_driver_init(NAME); 2382 if (rc != EOK) 2383 return rc; 2378 printf("%s: HelenOS E1000 network adapter driver\n", NAME); 2379 2380 if (nic_driver_init(NAME) != EOK) 2381 return 1; 2384 2382 2385 2383 nic_driver_implement(&e1000_driver_ops, &e1000_dev_ops, … … 2387 2385 2388 2386 ddf_log_init(NAME); 2389 ddf_msg(LVL_NOTE, "HelenOS E1000 driver started");2390 2387 return ddf_driver_main(&e1000_driver); 2391 2388 }
Note:
See TracChangeset
for help on using the changeset viewer.