X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/blobdiff_plain/1a157d7de03aaf7887a59fae6fbd62eec854aede..41a1b398bf97d389f4542666b8498f4c45121060:/lincan/src/usbcan.c diff --git a/lincan/src/usbcan.c b/lincan/src/usbcan.c index 01d2f90..4492f61 100644 --- a/lincan/src/usbcan.c +++ b/lincan/src/usbcan.c @@ -1213,6 +1213,12 @@ int usbcan_kthread(void *data) INIT_LIST_HEAD(&dev->tx_pend_list); INIT_LIST_HEAD(&dev->tx_ready_list); + if (1) { + struct sched_param param = { .sched_priority = 1 }; + sched_setscheduler(current, SCHED_FIFO, ¶m); + } + + /* Prepare receive urbs */ for (i=0;iflags); + + mb(); + while(!list_empty(&dev->rx_ready_list)) { struct usbcan_message *m; m = list_first_entry(&dev->rx_ready_list, typeof(*m), list_node); @@ -1449,7 +1459,7 @@ static int usbcan_probe(struct usb_interface *interface, const struct usb_device /* save our data pointer in this interface device */ usb_set_intfdata(interface, usbdevs); - if (!(usbdevs->candev=register_usbdev("usbcan",(void *) usbdevs, usbcan_register_devs))) + if (!(usbdevs->candev=register_hotplug_dev("usbcan",(void *) usbdevs, usbcan_register_devs))) goto register_error; /* let the user know what node this device is now attached to */ @@ -1457,7 +1467,7 @@ static int usbcan_probe(struct usb_interface *interface, const struct usb_device return 0; register_error: - cleanup_usbdev(usbdevs->candev); + cleanup_hotplug_dev(usbdevs->candev); error: if (usbdevs){ if (usbdevs->devs){ @@ -1497,7 +1507,7 @@ static void usbcan_disconnect(struct usb_interface *interface) if (usbdevs->devs){ usb_put_dev((*usbdevs->devs)->udev); } - cleanup_usbdev(usbdevs->candev); + cleanup_hotplug_dev(usbdevs->candev); if (usbdevs->devs){ for (j=0;jcount;j++){ if (!usbdevs->devs[j]) continue;