usbfs is bugged with >2.6.32.9 and <=2.6.33 (breaks VMWare, Qemu, sane scanners, ...)
Bug #544527 reported by
MarkusRechberger
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Invalid
|
Undecided
|
Unassigned | ||
Virtualbox |
Fix Committed
|
Undecided
|
Unassigned | ||
sane-backends |
Fix Committed
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: tvtime
There's a problem with isochronous and usbfs, suse tried to improve usbfs but it end up that it broke usbfs.
For isochronous the entire packet needs to be copied and not only a part of it.
http://
http://
please merge this bugfix asap.
ProblemType: Bug
Architecture: amd64
Date: Mon Mar 22 21:09:00 2010
DistroRelease: Ubuntu 10.04
LiveMediaBuild: Ubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100322)
Package: tvtime 1.0.2-5ubuntu2
ProcEnviron:
LANG=de_DE.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: tvtime
Uname: Linux 2.6.32-16-generic x86_64
Changed in tvtime (Ubuntu): | |
status: | New → Confirmed |
affects: | tvtime (Ubuntu) → linux (Ubuntu) |
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in sane-backends: | |
status: | New → Fix Committed |
Changed in virtualbox: | |
status: | New → Fix Committed |
Changed in tvtime: | |
status: | New → Fix Committed |
Changed in qemu: | |
status: | New → Fix Committed |
Changed in linux (Ubuntu): | |
status: | Fix Committed → Fix Released |
Changed in qemu: | |
status: | Fix Committed → Invalid |
no longer affects: | tvtime |
To post a comment you must log in.
This bugfix is incomplete. Isochronous transfers are still broken, when running 32-bit software on a 64-bit kernel. Function processcompl_ compat( ) in devio.c needs a similar fix to the fix that was applied to processcompl(). Looking at processcompl_ compat( ) I see:
if (as->userbuffer && urb->actual_length) user(as- >userbuffer, urb->transfer_ buffer, >actual_ length) )
if (copy_to_
urb-
return -EFAULT;
correct code would be something like
if (as->userbuffer && urb->actual_length) { of_packets > 0) /* Isochronous */ buffer_ length; user(as- >userbuffer, urb->transfer_ buffer, i))
if (urb->number_
i = urb->transfer_
else /* Non-Isoc */
i = urb->actual_length;
if (copy_to_
goto err_out;
}
(note the difference between urb->actual_length and urb->transfer_ buffer_ length) .
With kernel 2.6.32-23-generic x86_64 on Ubuntu 10.04, using proprietary USB-hardware hooked up to the USB bus (with software compiled for 32-bit), I can directly observe how isochronous transfers retrieved via ioctl(.. USBDEVFS_REAPURB ..) are too short, i.e. the kernel does not write the end of the data packet to the supplied buffer. Booting on the 2.6.31 kernel still present from before I upgraded from Ubuntu 9.10, the same software runs flawlessly.
As a workaround I'll use the older kernel for now (also I could compile for 64-bit, actually...).
cheers,
David