Changes in uspace/drv/nic/e1k/e1k.c [e55d2c1:60744cb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/e1k/e1k.c
re55d2c1 r60744cb 49 49 #include <nic.h> 50 50 #include <ops/nic.h> 51 #include <pcapdump_iface.h>52 51 #include "e1k.h" 53 52 … … 175 174 /** Lock for EEPROM access */ 176 175 fibril_mutex_t eeprom_lock; 177 178 176 } e1000_t; 179 177 … … 1191 1189 if (frame != NULL) { 1192 1190 memcpy(frame->data, e1000->rx_frame_virt[next_tail], frame_size); 1193 1194 1191 nic_received_frame(nic, frame); 1195 1192 } else { … … 1247 1244 * 1248 1245 * @param icall IPC call structure 1249 * @param dev E1000 device 1250 * 1251 */ 1252 static void e1000_interrupt_handler(ipc_call_t *icall, 1253 ddf_dev_t *dev) 1246 * @param arg Argument (nic_t *) 1247 * 1248 */ 1249 static void e1000_interrupt_handler(ipc_call_t *icall, void *arg) 1254 1250 { 1255 1251 uint32_t icr = (uint32_t) ipc_get_arg2(icall); 1256 nic_t *nic = NIC_DATA_DEV(dev);1252 nic_t *nic = (nic_t *)arg; 1257 1253 e1000_t *e1000 = DRIVER_DATA_NIC(nic); 1258 1254 … … 1286 1282 1287 1283 errno_t rc = register_interrupt_handler(nic_get_ddf_dev(nic), e1000->irq, 1288 e1000_interrupt_handler, &e1000_irq_code, handle);1284 e1000_interrupt_handler, (void *)nic, &e1000_irq_code, handle); 1289 1285 1290 1286 fibril_mutex_unlock(&irq_reg_mutex); … … 2202 2198 goto err_fun_bind; 2203 2199 2204 rc = nic_fun_add_to_cats(fun); 2205 if (rc != EOK) { 2206 ddf_msg(LVL_ERROR, "Failed adding function to categories"); 2207 ddf_fun_unbind(fun); 2208 return rc; 2209 } 2200 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC); 2201 if (rc != EOK) 2202 goto err_add_to_cat; 2203 2210 2204 return EOK; 2211 2205 2212 //err_add_to_cat:2213 //ddf_fun_unbind(fun);2206 err_add_to_cat: 2207 ddf_fun_unbind(fun); 2214 2208 err_fun_bind: 2215 2209 err_rx_structure: … … 2371 2365 2372 2366 memcpy(e1000->tx_frame_virt[tdt], data, size); 2367 2373 2368 tx_descriptor_addr->phys_addr = PTR_TO_U64(e1000->tx_frame_phys[tdt]); 2374 2369 tx_descriptor_addr->length = size;
Note:
See TracChangeset
for help on using the changeset viewer.