Changes in uspace/drv/nic/e1k/e1k.c [071a1ddb:d51838f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/e1k/e1k.c
r071a1ddb rd51838f 33 33 */ 34 34 35 #include <async.h>36 35 #include <assert.h> 37 36 #include <stdio.h> … … 39 38 #include <adt/list.h> 40 39 #include <align.h> 40 #include <thread.h> 41 41 #include <byteorder.h> 42 42 #include <as.h> … … 372 372 fibril_mutex_unlock(&e1000->ctrl_lock); 373 373 374 async_usleep(10);374 thread_usleep(10); 375 375 376 376 fibril_mutex_lock(&e1000->ctrl_lock); … … 1237 1237 /** Handle device interrupt 1238 1238 * 1239 * @param iid IPC call id 1239 1240 * @param icall IPC call structure 1240 1241 * @param dev E1000 device 1241 1242 * 1242 1243 */ 1243 static void e1000_interrupt_handler(ipc_call _t *icall,1244 static void e1000_interrupt_handler(ipc_callid_t iid, ipc_call_t *icall, 1244 1245 ddf_dev_t *dev) 1245 1246 { … … 1259 1260 * @param nic Driver data 1260 1261 * 1261 * @param[out] handle IRQ capability handle if the handler was registered 1262 * 1262 * @return IRQ capability handle if the handler was registered 1263 1263 * @return Negative error code otherwise 1264 1264 * 1265 1265 */ 1266 inline static int e1000_register_int_handler(nic_t *nic , cap_handle_t *handle)1266 inline static int e1000_register_int_handler(nic_t *nic) 1267 1267 { 1268 1268 e1000_t *e1000 = DRIVER_DATA_NIC(nic); … … 1275 1275 e1000_irq_code.cmds[2].addr = e1000->reg_base_phys + E1000_IMC; 1276 1276 1277 int rc= register_interrupt_handler(nic_get_ddf_dev(nic), e1000->irq,1278 e1000_interrupt_handler, &e1000_irq_code , handle);1277 int cap = register_interrupt_handler(nic_get_ddf_dev(nic), e1000->irq, 1278 e1000_interrupt_handler, &e1000_irq_code); 1279 1279 1280 1280 fibril_mutex_unlock(&irq_reg_mutex); 1281 return rc;1281 return cap; 1282 1282 } 1283 1283 … … 1725 1725 1726 1726 /* Wait for the reset */ 1727 async_usleep(20);1727 thread_usleep(20); 1728 1728 1729 1729 /* check if RST_BIT cleared */ … … 1813 1813 * transfers to descriptors. 1814 1814 */ 1815 async_usleep(100);1815 thread_usleep(100); 1816 1816 1817 1817 return EOK; … … 2165 2165 ddf_fun_set_ops(fun, &e1000_dev_ops); 2166 2166 2167 int irq_cap ;2168 rc = e1000_register_int_handler(nic, &irq_cap);2169 if (rc != EOK) {2167 int irq_cap = e1000_register_int_handler(nic); 2168 if (irq_cap < 0) { 2169 rc = irq_cap; 2170 2170 goto err_fun_create; 2171 2171 } … … 2239 2239 uint32_t eerd = E1000_REG_READ(e1000, E1000_EERD); 2240 2240 while ((eerd & e1000->info.eerd_done) == 0) { 2241 async_usleep(1);2241 thread_usleep(1); 2242 2242 eerd = E1000_REG_READ(e1000, E1000_EERD); 2243 2243 }
Note:
See TracChangeset
for help on using the changeset viewer.