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