turn ends our usb process. This means the proc pointer becomes invalid and will
panic if a new kthread is added. Count the number of threads and clear the proc
pointer on the last one.
Suggested by: julian
MFC after: 3 days
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
enable the ones we want. This has been changed to better
match the ADMtek's reference design to avoid setting the
power-down configuration line of the PHY at the same time
it is reset.
Submitted by: John Hood via hps
direction even if the actual device is opened for read and
write. Fix fflags check so that the UFM and URIO drivers work.
Reported by: Krassimir Slavchev
Submitted by: hps
keys are pressed.
- Reported by: Various people
- add sysctl to disable keyboard led control request
- Reported by: Yoshihiro Ota
- Save system CPU usage: Patch to stop keyboard timer when no
keys are pressed.
Submitted by: hps
MFC after: 3 days
- usb_pc_cpu_invalidate() is called between [consecutive] reads from a device,
so a sequence of BUS_DMASYNC_POSTREAD and _PREREAD should be used. Note we
cannot use or'ed shorthand ( _POSTREAD | _PREREAD) for BUS_DMASYNC flags, as
the low level bus dma sync operation is implementation dependent and we
cannot assume the required order of operations to be guaranteed.
- usb_pc_cpu_flush() is called before writing to a device, so
BUS_DMASYNC_PREWRITE should be used.
Submitted by: Grzegorz Bernacki
Reviewed by: HPS, arm@, usb@ ML
Tested by: HPS, Mike Tancsa
Approved by: re (kib)
Obtained from: Semihalf
cosmetic change to reduce cruft in the proc table.
Also change the idle wait message to `-` like how taskqueues are.
Reviewed by: julian
Approved by: re (kib)
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)
USB core:
- add support for defragging of written device data.
- improve handling of alternate settings in device side mode.
- correct return value from usbd_get_no_alts() function.
- reported by: HPS
- P4 ID: 166156, 166168
- report USB device release information to devd and pnpinfo.
- reported by: MIHIRA Sanpei Yoshiro
- P4 ID: 166221
Submitted by: hps
Approved by: re
See PR description for more info. Patch is
implemented differently than suggested, but
having the same result.
PR: usb/137188
Submitted by: hps
Approved by: re
- add support for defragging of written device data.
- improve handling of alternate settings in device side mode.
- correct return value from usbd_get_no_alts() function.
- reported by: HPS
- P4 ID: 166156, 166168
- report USB device release information to devd and pnpinfo.
- reported by: MIHIRA Sanpei Yoshiro
- P4 ID: 166221
Submitted by: hps
Approved by: re
- Add minimum polling support to drive UMASS
and UKBD in case of panic.
- Add extra check to ukbd probe to fix problem about
mouse devices attaching like keyboards.
- P4 ID: 166148
Submitted by: hps
Approved by: re
- add support for setting the UMS polling rate through -F option
passed to moused.
- requested by Alexander Best
- P4 ID: 166075
PR: usb/125264
Submitted by: hps
Approved by: re
USB CORE: busdma improvement
For single segment allocations the boundary field
of the BUSDMA tag should be zero. Currently all
single segment allocations are less than or equal
to 4096 bytes, so the limit does not kick in. If
any single segment USB allocations would be greater
than 4K, then it would be a problem.
Approved by: re (kensmith)
Obtained from: HPS
Giant was only used here to lock down a bit mask of allocated unit
numbers. Change the code to use its own mutex.
Reviewed by: hselasky
Approved by: re (kib)
- Add support for devices that handle set and clear stall in hardware.
- Add missing get timestamp function
- Add more xfer flags
Submitted by: Hans Petter Selasky
Approved by: re (kib)
IF_ADDR_UNLOCK() across network device drivers when accessing the
per-interface multicast address list, if_multiaddrs. This will
allow us to change the locking strategy without affecting our driver
programming interface or binary interface.
For two wireless drivers, remove unnecessary locking, since they
don't actually access the multicast address list.
Approved by: re (kib)
MFC after: 6 weeks
Note that I also added the usbdev to the list, because the 8813 version
is not yet known there. I might have twisted the sorting there but because
8813 comes before 8818, I added it before that (with _8813 to differentiate)
the item.
PR: 135628
Submitted by: Yoshikazu GOTO <goto at on-link dot jp>
Approved by: imp (mentor, implicit)