proper solution which is to not use the TERMINATE pointer, but rather
link to a halted TD. The initial fix was due to a misunderstanding
about how the EHCI hardware works. Thanks to Alan Stern for clearing
this up. This patch can increase mass storage read performance
significantly when the IRQ rate is less than 8000 IRQ/s.
Approved by: thompsa (mentor)
mode in the USB core. The patch mostly consists of updating the USB
HUB code to support USB 3.0 HUBs. This patch also add some more USB
controller methods to support more active-alike USB controllers like
the XHCI which needs to be informed about various device state events.
USB 3.0 HUBs are not tested yet, due to lack of hardware, but are
believed to work.
After this update the initial device descriptor is only read twice
when we know that the bMaxPacketSize is too small for a single packet
transfer of this descriptor.
Approved by: thompsa (mentor)
scratch. This driver adds support for USB3.0 devices. The XHCI
interface is also backwards compatible to USB2.0 and USB1.0 and will
evntually replace the OHCI/UHCI and EHCI drivers.
There will be follow-up commits during the coming week to link the
driver into the default kernel build and add missing USB3.0
functionality in the USB core. Currently only the driver files are
committed.
Approved by: thompsa (mentor)
The following systems are involved:
- DB-88F5182
- DB-88F5281
- DB-88F6281
- DB-78100
- SheevaPlug
This overhaul covers the following major changes:
- All integrated peripherals drivers for Marvell ARM SoC, which are
currently in the FreeBSD source tree are reworked and adjusted so they
derive config data out of the device tree blob (instead of hard coded /
tabelarized values).
- Since the common FDT infrastrucutre (fdtbus, simplebus) is used we say
good by to obio / mbus drivers and numerous hard-coded config data.
Note that world needs to be built WITH_FDT for the affected platforms.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation.
microframe slot was not in the smask. The problem was that the EHCI driver was
then thinking that the transfer was immediately complete in some cases. Which
could lead to freeze-like situations, which can be recovered by unplugging the
USB device.
Reported by: Richard Kolkovich
Submitted by: Hans Petter Selasky
Andrew Turner. The kernel supports the LN2410SBC evaluation board,
and likely others. These parts (or similar ones) are in some open
hardware designs for phones.
Submitted by: Andrew Turner
message has been printed is enough to get someones attention. Also remove the
line number for DPRINTF/DPRINTFN, it already prints the funtion name and a
unique message.
Some EHCI chips from VIA / ATI seem to trigger interrupts before writing back
the qTD status, or miss signalling occasionally under heavy load. If the host
machine is too fast, we can miss transaction completion - when we scan the
active list the transaction still seems to be active. This generally exhibits
itself as a umass stall that never recovers.
We work around this behaviour by setting up this callback after any softintr
that completes with transactions still pending, giving us another chance to
check for completion after the writeback has taken place
Submitted by: Alexander Nedotsuko
MFC after: 3 days
all host controllers at the same time, we avoid problems where the BIOS will
actually write to the USB registers of all the USB host controllers every time
we handover one of them, and consequently reset the OS programmed values.
Submitted by: avg
Reviewed by: jhb
The EHCI HW can use the qtd_next field instead of qtd_altnext when a short
packet is received. This contradicts what is stated in the EHCI datasheet.
Also the total-bytes field in the status field of the following TD gets
corrupted upon reception of a short packet! We work this around in software by
not queueing more than one job/TD at a time of up to 16Kbytes! The bug has been
seen on multiple INTEL based EHCI chips. Other vendors have not been tested
yet.
- Applications using /dev/usb/X.Y.Z, where Z is non-zero are affected, but not
applications using LibUSB v0.1, v1.2 and v2.0.
- Mass Storage (umass) is affected.
Submitted by: Hans Petter Selasky
MFC after: 3 days
- Add quirk for ATI SB600 and SB700 to free SMB controller
- Correct schedule sleep time to 10us on the VIA ehci controller
Reported by: Dorian B<FC>ttner, Andriy Gapon
Submitted by: Hans Petter Selasky
- clean up USB detach logic. There seems to be some problems detaching multiple
USB HUBs connected in series from the root.
- after this patch the rule is:
1) Always use device_detach() on the USB HUB first.
2) Never just device_delete_child() on the USB HUB, because that function
will traverse to all the device leaves and free them first, and then the USB
stack will free the devices twice which doesn't work very well.
- make sure the did DMA delay gets set after the timeout has elapsed to make
logic more clear. There is no functional difference.
Submitted by: Hans Petter Selasky
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.
Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.
For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.
Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.
Bump __FreeBSD_version in order to reflect the newbus lock introduction.
Reviewed by: ed, hps, jhb, imp, mav, scottl
No answer by: ariff, thompsa, yongari
Tested by: pho,
G. Trematerra <giovanni dot trematerra at gmail dot com>,
Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by: Yahoo! Incorporated
Approved by: re (ksmith)