| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
No functional change.
Reviewed by: hselasky
|
|
|
|
|
| |
We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use driver settable callbacks for handling of:
- core post reset
- reading actual port speed
Typically, OTG enabled EHCI cores wants setting of USBMODE register,
but this register is not defined in EHCI specification and different
cores can have it on different offset.
Also, for cores with TT extension, actual port speed must be determinable.
But again, EHCI specification not covers this so this patch provides
function for two most common variant of speed bits layout.
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D5088
|
|
|
|
|
|
|
|
| |
Fix some device_printf's that were missing '\n' at the end or had
speling errors.
PR: 145319
Submitted by: rozhuk.im gmail.com
|
| |
|
|
|
|
|
|
|
|
|
|
| |
These changes prevent sysctl(8) from returning proper output,
such as:
1) no output from sysctl(8)
2) erroneously returning ENOMEM with tools like truss(1)
or uname(1)
truss: can not get etype: Cannot allocate memory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.
Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks
Sponsored by: Mellanox Technologies
|
|
|
|
|
|
|
|
|
| |
should fix DMA descriptor caching issues seen with the EHCI controller
found in Google Chromebook C720 during removal and insertion of USB
devices.
MFC after: 1 week
Reported by: Matthew Dillon at DragonFlyBSD
|
|
|
|
|
|
| |
controllers need more time than others.
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
| |
after previous transfers.
MFC after: 1 week
|
|
|
|
|
| |
constant and does not need to be modified. This also saves a small
amount of RAM.
|
|
|
|
|
| |
MFC after: 1 week
Reported by: aseem.jolly@gmail.com
|
|
|
|
|
|
| |
for ATI based USB controllers.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
controller hardware most likely present on UHCI chipsets aswell. The
bug manifests itself when issuing isochronous transfers and bulk
transfers towards the same device simultaneously. From time to time it
happens that either the completion IRQ was missing or that the
completion IRQ was happening before the ITD/SITD was completely
written back to memory. The workaround assumes that double buffered
isochronous transfers are used, and that a second interrupt is
generated at the beginning of the next isochronous transfer to
complete the previous one. Possibly skipping the interrupt at the last
isochronous frame is possible, but will then break single buffered
isochronous transfers. For now we can live with some extra interrupts.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
by adding the missing bits. See ehci_fsl.c for their use.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
for FULL speed SPLIT transactions works fully.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
This patch should remove the need for kldunload of USB
controller drivers at suspend and kldload of USB controller
drivers at resume.
This patch also fixes some build issues in avr32dci.c
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Make it easier to port the USB code to other platforms by only using
one set of memory functions for clearing and copying memory. None of
the memory copies are overlapping. This means using bcopy() is not
required.
- Fix a compile warning when USB_HAVE_BUSDMA=0
- Add missing semicolon in avr32dci.
- Update some comments.
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.
|
|
|
|
|
|
| |
Reported by: Mike Tancsa
MFC after: 3 days
Approved by: thompsa (mentor)
|
|
|
|
|
|
| |
Reported by: Luiz Otavio O Souza
MFC after: 14 days
Approved by: thompsa (mentor)
|
|
|
|
|
|
| |
Reported by: Garrett Cooper
MFC after: 14 days
Approved by: thompsa (mentor)
|
|
|
|
|
|
| |
Reported by: gavin
MFC after: 14 days
Approved by: thompsa (mentor)
|
|
|
|
|
|
|
|
| |
value is updated after that we read it in the queue-head. This patch can
fix problems with BULK timeouts. The issue was found on a Nvidia chipset.
MFC after: 14 days
Approved by: thompsa (mentor)
|
|
|
|
|
|
| |
it internally contain nested includes.
Reviewed by: bde
|
|
|
|
|
|
|
| |
within the first 4 bytes of the EHCI memory space. For controllers that
use big-endian MMIO, reading them with 1- and 2-byte reads would then
return the wrong values. Instead, read the combined register with a 4-byte
read and mask out the interesting quantities.
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
errors from the applications. Only use endless retransmission while in the
non-addressed state on a High-Speed device.
Approved by: thompsa (mentor)
|
|
|
|
| |
Approved by: thompsa (mentor)
|
|
|
|
| |
Approved by: thompsa (mentor)
|
|
|
|
|
|
|
| |
embedded hardware needs to know exactly which device is in question before it
exactly can decide the required delay.
Submitted by: Hans Petter Selasky
|
|
|
|
|
|
| |
USB 2.0 standard, though some USB devices use it anyway.
Submitted by: Hans Petter Selasky
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
the illusion of a tunable setting but was always turned on regardless.
MFC after: 1 week
|
|
|
|
|
|
| |
the hardware to stall.
Submitted by: Hans Petter Selasky
|
|
|
|
| |
Submitted by: Hans Petter Selasky
|
|
|
|
| |
Reviewed by: HPS
|
|
|
|
| |
Submitted by: Andriy Gapon
|
|
|
|
|
|
| |
endpoint rather than per xfer and provide functions around get/free of resources.
Submitted by: Hans Petter Selasky
|
|
|
|
|
|
| |
but needs intervalling 1:2, 1:4 or 1:8
Submitted by: Hans Petter Selasky
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|