aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_hub.c
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2015-08-14 12:57:53 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2015-08-14 12:57:53 +0000
commit43ea03d75697413359bd3b18e24152e1e6520141 (patch)
tree12297810bcaec77c250925fb8b4746d5b46faa4c /sys/dev/usb/usb_hub.c
parent997d864ce0052fb146a71d29be0a66118dd56d60 (diff)
Improve the realtime properties of USB transfers for embedded systems
like RPI-B and RPI-2. Description of problem: USB transfers can process data in their callbacks sometimes causing unacceptable latency for other USB transfers. Separate BULK completion callbacks from CONTROL, INTERRUPT and ISOCHRONOUS callbacks, and give BULK completion callbacks lesser execution priority than the others. This way USB audio won't be interfered by heavy USB ethernet usage for example. Further serve USB transfer completion in a round robin fashion, instead of only serving the most CPU hungry. This has been done by adding a third flag to USB transfer queue structure which keeps track of looping callbacks. The "command" callback function then decides what to do when looping. MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=286773
Diffstat (limited to 'sys/dev/usb/usb_hub.c')
-rw-r--r--sys/dev/usb/usb_hub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/usb_hub.c b/sys/dev/usb/usb_hub.c
index 2f1459c696b3..a54fa2e0c838 100644
--- a/sys/dev/usb/usb_hub.c
+++ b/sys/dev/usb/usb_hub.c
@@ -346,7 +346,7 @@ uhub_tt_buffer_reset_async_locked(struct usb_device *child, struct usb_endpoint
}
up->req_reset_tt = req;
/* get reset transfer started */
- usb_proc_msignal(USB_BUS_NON_GIANT_PROC(udev->bus),
+ usb_proc_msignal(USB_BUS_TT_PROC(udev->bus),
&hub->tt_msg[0], &hub->tt_msg[1]);
}
#endif
@@ -1579,7 +1579,7 @@ uhub_detach(device_t dev)
#if USB_HAVE_TT_SUPPORT
/* Make sure our TT messages are not queued anywhere */
USB_BUS_LOCK(bus);
- usb_proc_mwait(USB_BUS_NON_GIANT_PROC(bus),
+ usb_proc_mwait(USB_BUS_TT_PROC(bus),
&hub->tt_msg[0], &hub->tt_msg[1]);
USB_BUS_UNLOCK(bus);
#endif