| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Defer USB enumeration until the SI_SUB_KICK_SCHEDULER is executed to avoid
boot panics in conjunction with the recently added EARLY_AP_STARTUP feature.
The panics happen due to using kernel facilities like callouts too early.
Tested by: jhb @
|
|
|
|
|
| |
Improve the realtime properties of USB transfers for embedded systems
like RPI-B and RPI-2.
|
|
|
|
|
|
|
|
| |
Add ugen keyword to USB pnpinfo. Remove extra space from existing pnpinfo.
PR: 198015
PR: 198019
PR: 198026
|
|
|
|
| |
Reduce boot verbosity.
|
|
|
|
|
| |
Add support for disabling USB enumeration or USB port power
in general or on selected USB HUBs.
|
|
|
|
|
|
|
|
|
| |
Fix the ordering of the arguments to printf in
uhub_child_location_string(). This produced bogus information in
dev.<USB driver>.<id>.%location
output from sysctl.
|
|
|
|
|
|
|
|
|
| |
Resolve a deadlock setting the USB configuration index from userspace
on USB HUBs by moving the code into the USB explore threads. The
deadlock happens because child devices of the USB HUB don't have the
expected reference count when called from outside the explore
thread. Only the HUB device itself, which the IOCTL interface locks,
gets the correct reference count.
|
|
|
|
|
|
|
|
|
|
| |
- Separate I/O errors from reception of STALL PID.
- Implement better error recovery for Transaction Translators, TTs,
found in High Speed USB HUBs which translate from High Speed USB into
FULL or LOW speed USB. In some rare cases SPLIT transactions might get
lost, which might leave the TT in an unknown state. Whenever we detect
such an error try to issue either a clear TT buffer request, or if
that is not possible reset the whole TT.
|
|
|
|
|
|
|
|
| |
Fix a deadlock when trying to power off a USB device. The deadlock
happens because the code in question is trying to modify the parent
USB port registers outside the USB explore thread.
Approved by: re (glebius)
|
|
|
|
|
|
|
|
| |
mode is ON and suspend is detected. This confuses iPads running in USB
host mode at least.
MFC after: 1 week
Approved by: re (hrs)
|
|
|
|
|
|
|
|
|
|
|
| |
Linux targets without breaking the existing IOCTL API.
- Remove some not-needed header file inclusions.
- Wrap a long line.
MFC after: 1 week
Reported by: Damjan Jovanovic <damjan.jov@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
in reduced memory systems.
- Split allocation and freeing of the configuration descriptor into a separate
function, so that the configuration descriptor can be made fixed size
to save memory allocations. This applies for both device and host mode.
|
|
|
|
|
|
|
|
|
| |
enumeration lock. Make sure all callers of usbd_enum_lock() check the return
value. Remove the control transfer specific lock. Bump the FreeBSD version
number, hence external USB modules may need to be recompiled due to a USB
device structure change.
MFC after: 1 week
|
|
|
|
| |
USB stack. This is useful for non-kernel purposes, like the loader.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems
or embedded platforms. This is also useful for out of the system compilation
of the FreeBSD USB stack for various purposes. The USB kernel files can
now optionally include a global header file which should include all needed
definitions required to compile the FreeBSD USB stack. When the global USB
header file is included, no other USB header files will be included by
default.
Add new file containing the USB stack configuration for the
FreeBSD loader build.
Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all
USB files follow the same style.
Use cases:
- console in loader via USB
- loading kernel via USB
Discussed with: Hiroki Sato, hrs @ EuroBSDCon
|
|
|
|
|
|
|
|
| |
Rearrange the tunables and belonging sysctl declarations, so
that they are next to eachother.
Submitted by: n_hibma @
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
Also update the port reset time from 250ms to 50ms. Some USB devices
have a hard limit in hardware at 222ms for the port reset time and will
not enumerate unless this delay is closer to the usb.org defined value.
This patch can fix enumeration with some USB devices.
Tested by: Guido van Rooij
Submitted by: Nick Hibma
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
| |
Only RootHUB ports can be dual mode. Disallow OTG ports on external HUBs.
This simplifies some checks in the USB controller drivers.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in SUPER-speed mode, USB 3.0.
This feature has not been tested yet, due to lack of hardware.
This feature is useful when implementing protocols like UASP,
USB attached SCSI which promises higher USB mass storage throughput.
This patch also implements support for hardware processing of endpoints
for increased performance. The switching to hardware processing
of an endpoint is done via a callback to the USB controller driver. The
stream feature is implemented like a variant of a hardware USB protocol.
USB controller drivers implementing device mode needs to be updated to
implement the new "xfer_stall" USB controller method and remove the
"xfer" argument from the "set_stall" method.
The API's toward existing USB drivers are preserved. To setup a USB transfer
in stream mode, set the "stream_id" field of the USB config structure to
the desired value.
The maximum number of BULK streams is currently hardcoded and limited to 8
via a define in usb_freebsd.h.
All USB drivers should be re-compiled after this change.
LibUSB will be updated next week to support streams mode. A new IOCTL to
setup BULK streams as already been implemented. The ugen device nodes
currently only supports stream ID zero.
The FreeBSD version has been bumped.
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
| |
This will give you more bandwidth for isochronous
FULL speed applications connected through a
High Speed HUB.
This patch has been tested with XHCI and EHCI.
MFC after: 1 week
|
|
|
|
|
|
| |
when USB modules are compiled with WARNS=9.
MFC after: 1 weeks
|
|
|
|
|
|
| |
should do a warm reset instead of the default reset.
MFC after: 5 days
|
|
|
|
|
|
|
| |
hence it was overlapping the USB 3.0 root HUB's speed bits.
Reported by: Kohji Okuno
MFC after: 1 week
|
|
|
|
|
|
| |
- Try to fix support for USB 3.0 suspend and resume.
MFC after: 1 week
|
|
|
|
|
|
|
| |
configuration on USB HUBs.
PR: kern/163091
MFC after: 1 week
|
|
|
|
|
|
| |
The SYSCTL_NODE macro defines a list that stores all child-elements of
that node. If there's no SYSCTL_DECL macro anywhere else, there's no
reason why it shouldn't be static.
|
|
|
|
|
|
|
| |
in the generic XHCI driver. There appears to be some minor
logic missing for this feature to work.
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
is now required by bus_autoconf.
- Allow interface class matching even if device class is vendor specific.
- Update bus_autoconf tool to not generate system and subsystem match lines
for the nomatch event.
PR: misc/157903
MFC after: 14 days
|
|
|
|
|
|
|
|
|
| |
High-speed USB HUB by resetting the transaction translator (TT)
before trying re-enumeration. Also when clear-stall fails multiple times
try a re-enumeration.
Suggested by: Trevor Blackwell
MFC after: 14 days
|
|
|
|
|
|
| |
it internally contain nested includes.
Reviewed by: bde
|
|
|
|
|
| |
Submitted by: Nick Hibma
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)
|
|
|
|
|
|
|
| |
This patch can solve problems when multiple USB devices are
re-enumerated at the same time on the same bus.
Approved by: thompsa (mentor)
|
|
|
|
|
|
| |
the product, manufacturer and serial strings.
Submitted by: Hans Petter Selasky
|
|
|
|
|
|
| |
power saving.
Submitted by: Hans Petter Selasky
|
|
|
|
|
|
|
| |
embedded hardware needs to know exactly which device is in question before it
exactly can decide the required delay.
Submitted by: Hans Petter Selasky
|
|
|
|
|
|
|
|
| |
duplicate module loads.
PR: usb/125736
Submitted by: danger, mm
Reviewed by: hselasky
|
|
|
|
| |
Submitted by: Hans Petter Sekasky
|
|
|
|
|
|
|
|
|
|
| |
USB enumeration lock is locked, then the USB stack fails to resume the device
because locking the USB enumeration lock is part of the resume procedure. To
solve this issue a new lock is introduced which only protects the suspend and
resume callbacks, which can be dropped inside the usbd_do_request_flags()
function, to allow suspend and resume during so-called enumeration operations.
Submitted by: Hans Petter Selasky
|
|
|
|
| |
than default_*.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Submitted by: Andriy Gapon
|
|
|
|
|
|
| |
endpoint rather than per xfer and provide functions around get/free of resources.
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
being polled.
- Remove the need for Giant from the USB HUB driver.
- Leave device unconfigured instead of disabling the USB port
when Huawei Autoinstall disk detection triggers. This should
fix problems that the Huawei device is not detected after
Autoinstall eject is issued.
- Reported by: Nikolay Antsiferov
- Fix memory use after free race for USB character devices.
- Reported by: Lucius Windschuh
- Factor out the enumeration lock into three functions to make the
coming newbus lock conversion more easy.
- usbd_enum_lock
- usbd_enum_unlock
- usbd_enum_is_locked
Submitted by: hps
|
|
|
|
|
|
| |
reintroduced after HEAD is reopened for commits by re@.
Approved by: re (kib), attilio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|