mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 02:34:23 +08:00
cc62a7eb63
There are cases, when 80% max isochronous bandwidth is too limiting. For example I have two USB video capture cards which stream uncompressed video, and to stream full NTSC + PAL videos we'd need NTSC 640x480 YUV422 @30fps ~17.6 MB/s PAL 720x576 YUV422 @25fps ~19.7 MB/s isoc bandwidth. Now, due to limited alt settings in capture devices NTSC one ends up streaming with max_pkt_size=2688 and PAL with max_pkt_size=2892, both with interval=1. In terms of microframe time allocation this gives NTSC ~53us PAL ~57us and together ~110us > 100us == 80% of 125us uframe time. So those two devices can't work together simultaneously because the'd over allocate isochronous bandwidth. 80% seemed a bit arbitrary to me, and I've tried to raise it to 90% and both devices started to work together, so I though sometimes it would be a good idea for users to override hardcoded default of max 80% isoc bandwidth. After all, isn't it a user who should decide how to load the bus? If I can live with 10% or even 5% bulk bandwidth that should be ok. I'm a USB newcomer, but that 80% set in stone by USB 2.0 specification seems to be chosen pretty arbitrary to me, just to serve as a reasonable default. NOTE 1 ~~~~~~ for two streams with max_pkt_size=3072 (worst case) both time allocation would be 60us+60us=120us which is 96% periodic bandwidth leaving 4% for bulk and control. Alan Stern suggested that bulk then would be problematic (less than 300*8 bittimes left per microframe), but I think that is still enough for control traffic. NOTE 2 ~~~~~~ Sarah Sharp expressed concern that maxing out periodic bandwidth could lead to vendor-specific hardware bugs on host controllers, because > It's entirely possible that you'll run into > vendor-specific bugs if you try to pack the schedule with isochronous > transfers. I don't think any hardware designer would seriously test or > validate their hardware with a schedule that is basically a violation of > the USB bus spec (more than 80% for periodic transfers). So far I've only tested this patch on my HP Mini 5103 with N10 chipset kirr@mini:~$ lspci 00:00.0 Host bridge: Intel Corporation N10 Family DMI Bridge 00:02.0 VGA compatible controller: Intel Corporation N10 Family Integrated Graphics Controller 00:02.1 Display controller: Intel Corporation N10 Family Integrated Graphics Controller 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02) 00:1c.3 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 4 (rev 02) 00:1d.0 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2) 00:1f.0 ISA bridge: Intel Corporation NM10 Family LPC Controller (rev 02) 00:1f.2 SATA controller: Intel Corporation N10/ICH7 Family SATA AHCI Controller (rev 02) 01:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01) 02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8059 PCI-E Gigabit Ethernet Controller (rev 11) and the system works stable with 110us/uframe (~88%) isoc bandwith allocated for above-mentioned isochronous transfers. NOTE 3 ~~~~~~ This feature is off by default. I mean max periodic bandwidth is set to 100us/uframe by default exactly as it was before the patch. So only those of us who need the extreme settings are taking the risk - normal users who do not alter uframe_periodic_max sysfs attribute should not see any change at all. NOTE 4 ~~~~~~ I've tried to update documentation in Documentation/ABI/ thoroughly, but only "TBD" was put into Documentation/usb/ehci.txt -- the text there seems to be outdated and much needing refreshing, before it could be amended. Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
||
---|---|---|
.. | ||
whci | ||
ehci-ath79.c | ||
ehci-atmel.c | ||
ehci-au1xxx.c | ||
ehci-cns3xxx.c | ||
ehci-dbg.c | ||
ehci-fsl.c | ||
ehci-fsl.h | ||
ehci-grlib.c | ||
ehci-hcd.c | ||
ehci-hub.c | ||
ehci-ixp4xx.c | ||
ehci-lpm.c | ||
ehci-mem.c | ||
ehci-msm.c | ||
ehci-mxc.c | ||
ehci-octeon.c | ||
ehci-omap.c | ||
ehci-orion.c | ||
ehci-pci.c | ||
ehci-pmcmsp.c | ||
ehci-ppc-of.c | ||
ehci-ps3.c | ||
ehci-q.c | ||
ehci-s5p.c | ||
ehci-sched.c | ||
ehci-sh.c | ||
ehci-spear.c | ||
ehci-sysfs.c | ||
ehci-tegra.c | ||
ehci-vt8500.c | ||
ehci-w90x900.c | ||
ehci-xilinx-of.c | ||
ehci.h | ||
fhci-dbg.c | ||
fhci-hcd.c | ||
fhci-hub.c | ||
fhci-mem.c | ||
fhci-q.c | ||
fhci-sched.c | ||
fhci-tds.c | ||
fhci.h | ||
fsl-mph-dr-of.c | ||
hwa-hc.c | ||
imx21-dbg.c | ||
imx21-hcd.c | ||
imx21-hcd.h | ||
isp116x-hcd.c | ||
isp116x.h | ||
isp1362-hcd.c | ||
isp1362.h | ||
isp1760-hcd.c | ||
isp1760-hcd.h | ||
isp1760-if.c | ||
Kconfig | ||
Makefile | ||
octeon2-common.c | ||
ohci-at91.c | ||
ohci-ath79.c | ||
ohci-au1xxx.c | ||
ohci-cns3xxx.c | ||
ohci-da8xx.c | ||
ohci-dbg.c | ||
ohci-ep93xx.c | ||
ohci-hcd.c | ||
ohci-hub.c | ||
ohci-jz4740.c | ||
ohci-mem.c | ||
ohci-octeon.c | ||
ohci-omap3.c | ||
ohci-omap.c | ||
ohci-pci.c | ||
ohci-pnx4008.c | ||
ohci-pnx8550.c | ||
ohci-ppc-of.c | ||
ohci-ppc-soc.c | ||
ohci-ps3.c | ||
ohci-pxa27x.c | ||
ohci-q.c | ||
ohci-s3c2410.c | ||
ohci-sa1111.c | ||
ohci-sh.c | ||
ohci-sm501.c | ||
ohci-spear.c | ||
ohci-ssb.c | ||
ohci-tmio.c | ||
ohci.h | ||
oxu210hp-hcd.c | ||
oxu210hp.h | ||
pci-quirks.c | ||
pci-quirks.h | ||
r8a66597-hcd.c | ||
r8a66597.h | ||
sl811_cs.c | ||
sl811-hcd.c | ||
sl811.h | ||
u132-hcd.c | ||
uhci-debug.c | ||
uhci-grlib.c | ||
uhci-hcd.c | ||
uhci-hcd.h | ||
uhci-hub.c | ||
uhci-pci.c | ||
uhci-q.c | ||
xhci-dbg.c | ||
xhci-ext-caps.h | ||
xhci-hub.c | ||
xhci-mem.c | ||
xhci-pci.c | ||
xhci-ring.c | ||
xhci.c | ||
xhci.h |