| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Resolve a special case deadlock: When two or more threads are
simultaneously detaching kernel drivers on the same USB device we can
get stuck in the "usb_wait_pending_ref_locked()" function because the
conditions needed for allowing detach are not met.
While at it ensure that "flag_iserror" is only written when "priv_mtx"
is locked, which is protecting it.
Notes:
svn path=/stable/9/; revision=278291
|
| |
|
|
|
|
|
|
|
| |
Add 64-bit DMA support in the XHCI controller driver.
- Fix some comments and whitespaces while at it.
- Add support for PAE.
Notes:
svn path=/stable/9/; revision=278279
|
| |
|
|
|
|
|
| |
Rename driver name a bit to avoid unit number confusion in dmesg.
Notes:
svn path=/stable/9/; revision=269923
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Avoid the USB device disconnected and controller shutdown clutter on system
shutdown by putting the former under !rebooting and turning the latter into
debug messages.
Reviewed by: hps
Sponsored by: Bally Wulff Games & Entertainment GmbH
Notes:
svn path=/stable/9/; revision=267777
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Approved by: re, marius @
Notes:
svn path=/stable/9/; revision=267350
|
| |
|
|
|
|
|
|
| |
Improve the XHCI command timeout recovery handling code.
Fix some typos while at it.
Notes:
svn path=/stable/9/; revision=259602
|
| |
|
|
|
|
|
|
| |
Add convenience wrapper functions to run callbacks in the context of the
USB explore thread.
Notes:
svn path=/stable/9/; revision=250560
|
| |
|
|
|
|
|
|
|
|
|
| |
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
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.
Notes:
svn path=/stable/9/; revision=248085
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move scratch data from the USB bus structure to the USB device
structure so that simultaneous access cannot happen. Protect scratch
area using the enumeration lock.
- Reduce stack usage in usbd_transfer_setup() by moving some big stack
members to the scratch area. This saves around 200 bytes of stack.
- Fix a whitespace.
- Protect control requests using the USB device 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.
Notes:
svn path=/stable/9/; revision=247090
|
| |
|
|
|
|
|
|
|
|
|
| |
Add missing CTLFLAG_TUN flag to tunable sysctls in the USB stack.
Adjust timing parameters of FULL/LOW/HIGH speed USB enumeration
and make these timing parameters tunable. This patch will fix
enumeration with some USB devices.
Fix a typo.
Notes:
svn path=/stable/9/; revision=242775
|
| |
|
|
|
|
|
|
| |
Make sure that the USB system suspend event is executed synchronously
and not asynchronously.
Notes:
svn path=/stable/9/; revision=232870
|
| |
|
|
|
|
|
| |
Fix for USB suspend and resume.
Notes:
svn path=/stable/9/; revision=229369
|
| |
|
|
|
|
|
|
|
|
| |
- Add missing unlock of USB controller's lock, when
doing shutdown, suspend and resume.
- Add code to wait for USB shutdown to be executed at system shutdown.
- Add sysctl which can be used to skip this waiting.
Notes:
svn path=/stable/9/; revision=229100
|
| |
|
|
|
|
|
|
| |
Implement better support for USB controller suspend and resume.
Fix some build issues in avr32dci.c
Notes:
svn path=/stable/9/; revision=229096
|
| |
|
|
|
|
|
|
| |
MFC after: 3 days
Approved by: thompsa (mentor)
Notes:
svn path=/head/; revision=219048
|
| |
|
|
|
|
|
|
|
|
|
| |
- use device_printf() instead of printf() to give more accurate warnings.
- use memcpy() instead of bcopy().
- add missing #if's for non-FreeBSD compilation.
Approved by: thompsa (mentor)
Notes:
svn path=/head/; revision=218475
|
| |
|
|
|
|
|
| |
Approved by: thompsa (mentor)
Notes:
svn path=/head/; revision=217558
|
| |
|
|
|
|
|
|
|
| |
it internally contain nested includes.
Reviewed by: bde
Notes:
svn path=/head/; revision=217265
|
| |
|
|
| |
Notes:
svn path=/head/; revision=215846
|
| |
|
|
|
|
|
|
|
|
|
| |
(wrong unit number for a host controller) when the module is load /
unloaded repeatly. Attaching the USB pf is moved to usbus device's
attach.
Pointed by: yongari
Notes:
svn path=/head/; revision=215812
|
| |
|
|
|
|
|
|
|
|
| |
take all benefits whenever BPF code is improved.
Pointed by: jkim
Reviewed by: thompsa
Notes:
svn path=/head/; revision=215802
|
| |
|
|
|
|
|
|
|
|
|
|
| |
packets which go through each USB host controllers. Its implementations
are almost based on BPF code and very similar with it except it's
little bit customized for USB packet only. The userland program
usbdump(8) would be committed soon.
Discussed with: hps, thompsa, yongari
Notes:
svn path=/head/; revision=215649
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
Notes:
svn path=/head/; revision=213435
|
| |
|
|
|
|
|
|
|
| |
Add some more comments.
Approved by: thompsa (mentor)
Notes:
svn path=/head/; revision=213426
|
| |
|
|
|
|
|
|
|
| |
attach failures during boot. Fix this.
Approved by: thompsa (mentor)
Notes:
svn path=/head/; revision=213425
|
| |
|
|
|
|
|
| |
Submitted by: Hans Petter Selasky
Notes:
svn path=/head/; revision=208013
|
| |
|
|
|
|
|
| |
Submitted by: Giovanni Trematerra
Notes:
svn path=/head/; revision=205005
|
| |
|
|
|
|
|
|
|
| |
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.
Notes:
svn path=/head/; revision=199816
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
Notes:
svn path=/head/; revision=197553
|
| |
|
|
|
|
|
|
|
|
| |
setting a sysctl/tunable at boot
- remove some redundant initial explore code
Submitted by: hps
Notes:
svn path=/head/; revision=196488
|
| |
|
|
|
|
|
|
|
| |
reintroduced after HEAD is reopened for commits by re@.
Approved by: re (kib), attilio
Notes:
svn path=/head/; revision=196403
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
Notes:
svn path=/head/; revision=196037
|
| |
|
|
|
|
|
|
|
|
| |
- allow disabling "root_mount_hold()" by setting "hw.usb.no_boot_wait" sysctl
Submitted by: hps
Approved by: re
Notes:
svn path=/head/; revision=195965
|
| |
|
|
|
|
|
| |
- Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
Notes:
svn path=/head/; revision=194677
|
| |
|
|
| |
Notes:
svn path=/head/; revision=194228
|
| |
|
|
|
|
|
| |
USB_ADD_BYTES macro.
Notes:
svn path=/head/; revision=193074
|
| |
|
|
| |
Notes:
svn path=/head/; revision=193068
|
| |
|
|
| |
Notes:
svn path=/head/; revision=193045
|
| |
|
|
| |
Notes:
svn path=/head/; revision=192984
|
| |
|
|
|
|
|
| |
Submitted by: Hans Petter Selasky
Notes:
svn path=/head/; revision=192502
|
| |
|
|
| |
Notes:
svn path=/head/; revision=192500
|
| |
|
|
|
|
|
|
|
| |
Resolve possible device side mode deadlock by creating another thread.
Submitted by: Hans Petter Selasky
Notes:
svn path=/head/; revision=191400
|
| |
|
|
|
|
|
|
|
|
| |
The geom and CAM changes for root_hold are the wrong solution for USB design
quirks.
Requested by: scottl
Notes:
svn path=/head/; revision=190878
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor how we interface with the root HUB. This is achieved by making a
direct call from usb2_do_request to the host controller for root hub requests,
this call will perform the controller specific register read/writes and return
the error code.
This cuts out a lot of code in the host controller files and saves one thread
per USB bus.
Submitted by: Hans Petter Selasky
Notes:
svn path=/head/; revision=190754
|
| |
|
|
|
|
|
|
|
|
| |
Refactor how we interface with the root HUB. This cuts around 1200 lines of
code totally and saves one thread per USB bus.
Submitted by: Hans Petter Selasky
Notes:
svn path=/head/; revision=190735
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- make usb2_power_mask_t 16-bit
- remove "usb2_config_sub" structure from "usb2_config". To compensate for this
"usb2_config" has a new field called "usb_mode" which select for which mode
the current xfer entry is active. Options are: a) Device mode only b) Host
mode only (default-by-zero) c) Both modes. This change was scripted using
the following sed script: "s/\.mh\././g".
- the standard packet size table in "usb_transfer.c" is now a function, hence
the code for the function uses less memory than the table itself.
Submitted by: Hans Petter Selasky
Notes:
svn path=/head/; revision=190734
|
| |
|
|
|
|
|
|
|
|
|
| |
- memory usage reduction by only allocating the required USB pipes and USB
interfaces.
- cleanup some USB parsing functions to be more flexible.
Submitted by: Hans Petter Selasky
Notes:
svn path=/head/; revision=190730
|
| |
|
|
|
|
|
|
|
| |
Get rid of the last CALLOUT_RETURNUNLOCKED reference.
Submitted by: Hans Petter Selasky
Notes:
svn path=/head/; revision=190724
|
| |
|
|
|
|
|
| |
in situations where sleeping isnt allowed.
Notes:
svn path=/head/; revision=190676
|
| |
|
|
|
|
|
|
|
| |
Add ifdefs for making parts of usb conditional.
Submitted by: Hans Petter Selasky
Notes:
svn path=/head/; revision=190180
|