Changes in uspace/drv/nic/virtio-net/virtio-net.c [e55d2c1:60744cb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/virtio-net/virtio-net.c
re55d2c1 r60744cb 43 43 44 44 #include <virtio-pci.h> 45 #include <pcapdump_iface.h>46 45 47 46 #define NAME "virtio-net" … … 71 70 }; 72 71 73 static void virtio_net_irq_handler(ipc_call_t *icall, ddf_dev_t *dev) 74 { 75 nic_t *nic = ddf_dev_data_get(dev); 72 /** VirtIO net IRQ handler. 73 * 74 * @param icall IRQ event notification 75 * @param arg Argument (nic_t *) 76 */ 77 static void virtio_net_irq_handler(ipc_call_t *icall, void *arg) 78 { 79 nic_t *nic = (nic_t *)arg; 76 80 virtio_net_t *virtio_net = nic_get_specific(nic); 77 81 virtio_dev_t *vdev = &virtio_net->virtio_dev; … … 165 169 166 170 return register_interrupt_handler(dev, virtio_net->irq, 167 virtio_net_irq_handler, &irq_code, &virtio_net->irq_handle); 171 virtio_net_irq_handler, (void *)nic, &irq_code, 172 &virtio_net->irq_handle); 168 173 } 169 174 … … 423 428 } 424 429 425 rc = nic_fun_add_to_cats(fun);430 rc = ddf_fun_add_to_category(fun, DEVICE_CATEGORY_NIC); 426 431 if (rc != EOK) { 427 ddf_msg(LVL_ERROR, "Failed adding function to categories"); 428 ddf_fun_unbind(fun); 429 return rc; 432 ddf_msg(LVL_ERROR, "Failed adding function to category"); 433 goto unbind; 430 434 } 431 435 … … 435 439 return EOK; 436 440 437 //unbind:438 //ddf_fun_unbind(fun);441 unbind: 442 ddf_fun_unbind(fun); 439 443 destroy: 440 444 ddf_fun_destroy(fun);
Note:
See TracChangeset
for help on using the changeset viewer.