summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
Commit message (Collapse)AuthorAgeFilesLines
* MFC r310242:hselasky2017-01-092-1/+27
| | | | | | | | 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 @
* MFC r307902:trasz2016-12-191-4/+5
| | | | | | Make the USB attach strings in dmesg include product name. MFC after: 1 month
* MFC r308730:hselasky2016-11-281-2/+4
| | | | | | Make sure MAC address is reprogrammed when if_init() callback is invoked. Else promiscious mode must be used to pass traffic. While at it fix a debug print macro.
* MFC r308464, r308471: Add some device IDs found in my new laptop.mav2016-11-161-0/+2
|
* MFC r307518:hselasky2016-11-0714-81/+1
| | | | | | | | | | | | | | | | | | | | | Fix device delete child function. When detaching device trees parent devices must be detached prior to detaching its children. This is because parent devices can have pointers to the child devices in their softcs which are not invalidated by device_delete_child(). This can cause use after free issues and panic(). Device drivers implementing trees, must ensure its detach function detaches or deletes all its children before returning. While at it remove now redundant device_detach() calls before device_delete_child() and device_delete_children(), mostly in the USB controller drivers. Tested by: Jan Henrik Sylvester <me@janh.de> Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D8070
* MFC r308144 and r308165:hselasky2016-11-071-3/+9
| | | | | | | | | | | | | Fixes for virtual T-axis buttons. Make sure the virtual T-axis buttons gets cleared for USB mice which has less than 6 buttons. Make sure the virtual T-axis buttons generate button release event(s) for continuous tilting. PR: 213919 PR: 213957
* MFC 304973,304975,304976,304979,305044-305048sephe2016-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 304973 hyperv/hn: Switch to new RNDIS query for link status extraction. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7654 304975 hyperv/hn: Switch to new RNDIS query for RSS capabilities extraction. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7656 304976 hyperv/hn: Fix # of channels setting, if RSS is not available. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7657 304979 hyperv/hn: Switch to new RNDIS set for RSS parameters. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7658 305044 hyperv/hn: Move OIDs to net/rndis.h; they are standard NDIS OIDs. Actually all OIDs defined in net/rndis.h are standard NDIS OIDs. While I'm here, use the verbose macro name as in NDIS spec. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7679 305045 hyperv/hn: Indentation and field comment fixup for ndis.h. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7680 305046 net/rndis: Packet types are defined by NDIS; not RNDIS specific. Reviewed by: hps Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7681 305047 hyperv/hn: Switch to new RNDIS set for RX filters. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7683 305048 hyperv/hn: Remove unused function Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7684
* MFC 304654,304722,304723sephe2016-10-132-272/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | 304654 net: Split RNDIS protocol structs/macros out of dev/usb/net/if_urndisreg.h So that Hyper-V can leverage them instead of rolling its own definition. Discussed with: hps Reviewed by: hps Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7592 304722 net/rndis: Add canonical RNDIS major/minor version as of today. Reviewed by: hps Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7593 304723 net/rndis: Fix RNDIS_STATUS_PENDING definition. While I'm here, sort the RNDIS status in ascending order. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7594
* MFC r306478:hselasky2016-10-102-5/+7
| | | | | | | | | Add new USB ID. While at it remove some whitespaces. Submitted by: Jose Luis Duran <jlduran@gmail.com> PR: 213110
* MFC r306205:loos2016-09-272-0/+2
| | | | | | | Add the ID for the Huawei ME909S LTE modem. Submitted by: svenauhagen at github Sponsored by: Rubicon Communications, LLC (Netgate)
* MFC r305590:hselasky2016-09-151-2/+2
| | | | | | | | Correctly map the USB mouse tilt delta values into buttons 5 and 6 instead of 3 and 4 which is used for the scroll wheel, according to X.org. PR: 170358
* MFC r305421:hselasky2016-09-127-27/+60
| | | | | | | | | | | | | | | | | | | | | | | Resolve deadlock between device_detach() and usbd_do_request_flags() by reviving the SX control request lock and refining which lock protects the common scratch area in "struct usb_device". The SX control request lock was removed by r246759 because it caused a lock order reversal with the USB enumeration lock inside usbd_transfer_setup() as a function of r246616. It was thought that reducing the number of locks would resolve the LOR, but because some USB device drivers use usbd_do_request_flags() inside callback functions, like in taskqueues, a deadlock may occur when these are drained from device_detach(). By restoring the SX control request lock usbd_do_request_flags() is allowed to complete its execution when a USB device driver is detaching. By using the SX control request lock to protect the scratch area, the LOR introduced by r246616 is also resolved. Bump the FreeBSD version while at it to force recompilation of all USB kernel modules. Found by: avos@
* MFC r304571:hselasky2016-09-091-8/+39
| | | | | | | | Make the UKBD USB transfers double buffered and set them up one by one, so they are memory independent which allows for handling panics triggered by the keyboard driver itself, typically via CTRL+ALT+ESC sequences. Or if the USB keyboard driver was processing a key at the moment of panic. Allow UKBD to be attached while keyboard polling is active.
* MFC r303891, r303892:pfg2016-09-081-6/+6
| | | | | | | | sys: replace comma with semicolon when pertinent. Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone.
* MFC r281499:hselasky2016-09-083-3/+3
| | | | | | | | | | | Modify the return value of the uhci/ehci/xhci PCI probe routines to 'BUS_PROBE_DEFAULT'. This allows bhyve's 'ppt' driver to claim ownership of the device and pass it through to the guest. In the common case where there are no competing drivers for USB controllers this change is a no-op. PR: 212256
* MFC r305388:dim2016-09-071-2/+2
| | | | | | | | | | | | | | | | | With clang 3.9.0, compiling uplcom results in the following warnings: sys/dev/usb/serial/uplcom.c:543:29: error: implicit conversion from 'int' to 'int8_t' (aka 'signed char') changes value from 192 to -64 [-Werror,-Wconstant-conversion] if (uplcom_pl2303_do(udev, UT_READ_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 0x8484, 0, 1) ~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~ sys/dev/usb/usb.h:179:53: note: expanded from macro 'UT_READ_VENDOR_DEVICE' #define UT_READ_VENDOR_DEVICE (UT_READ | UT_VENDOR | UT_DEVICE) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ This is because UT_READ is 0x80, so the int8_t argument is wrapped to a negative value. Fix this by using uint8_t instead. Reviewed by: imp, hselasky Differential Revision: https://reviews.freebsd.org/D7776
* MFC r304629:hselasky2016-08-291-0/+4
| | | | | | | | | | Don't separate the status stage of the XHCI USB control transfers into its own job because this breaks the simplified QEMU XHCI TRB parser, which expects the complete USB control transfer as a series of back to back TRBs. The old behaviour is kept under #ifdef in case this change breaks enumeration of any USB devices. PR: 212021
* MFC r304597:hselasky2016-08-291-6/+8
| | | | | | | | | | Fix for invalid use of bits in input context. Basically split configuring of EP0 and non-EP0 into xhci_cmd_evaluate_ctx() and xhci_cmd_configure_ep() respectivly. This resolves some errors when using XHCI under QEMU and gets is more in line with the XHCI specification. PR: 212021
* MFC r303765:hselasky2016-08-151-1/+11
| | | | | | | | Keep a reference count on USB keyboard polling to allow recursive cngrab() during a panic for example, similar to what the AT-keyboard driver is doing. Found by: Bruce Evans <brde@optusnet.com.au>
* MFC r303806:cy2016-08-131-0/+1
| | | | Add Logitech Unifying receiver.
* MFC r302371:hselasky2016-08-121-1/+1
| | | | | Fix regression issue with XHCI on 32-bit ARMv7 Armada-38x. Make sure "struct xhci_dev_ctx_addr" fits into a single 4K page until further.
* MFC r302336:hselasky2016-07-111-16/+18
| | | | | | | Fix interrupt loop when switching from USB device to USB host mode by clearing all endpoint interrupt bits. PR: 210736
* MFC r302306:hselasky2016-07-111-1/+4
| | | | | | | | Fix detection of USB device disconnects in USB host mode when the USB device is connected directly to the USB port of the DWC OTG, in this case a RPI-zero. PR: 210695
* MFC r302076:hselasky2016-06-293-7/+8
| | | | | | | | Update the definition for number of scratch pages to match the latest version of the XHCI specification. Make sure the code can handle the maximum number of allowed scratch pages. Submitted by: Shichun_Ma@Dell.com
* MFC r301206:pfg2016-06-051-1/+3
| | | | | | | | usb/uhso: Don't bail out on first USB error. CID: 1305680 Submitted by: hselasky MFC after: 3 days
* MFC r300667:hselasky2016-06-033-2/+32
| | | | | | Check for signals when locking the USB enumeration thread from userspace, so that USB applications can be killed if an enumeration thread should be stuck for various reasons.
* MFC r299060:hselasky2016-06-031-1/+3
| | | | | | Extend the UQ_NO_STRINGS quirk to also cover the USB language string descriptor. This fixes enumeration of some older Samsung Galaxy S3 phones.
* MFC r298983: Add some device IDs from Intel Sunrise Point chipsets.mav2016-05-201-0/+2
|
* MFC r297696 and r298424:hselasky2016-04-292-0/+9
| | | | | | | | | Add new USB quirks. Submitted by: AJ <aleksanderlothe@live.com> PR: 208623 Submitted by: Naram Qashat <cyberbotx@cyberbotx.com> PR: 208642
* MFC r297387: Add some device IDs found on AMD FCH shipsets.mav2016-04-123-1/+7
|
* MFC r296342:hselasky2016-04-071-2/+0
| | | | | | | Allow for overlapping quirk device ranges. Prior to this patch only the first device entry matching the USB vendor, product and revision would be searched for quirks. After this patch all device entries will be searched for quirks.
* r297229 (by hselasky): Add more UHCI PCI IDs.mav2016-03-291-0/+6
|
* MFC r297049: Add IDs for Intel Wellsburg USB controllers.mav2016-03-282-0/+6
|
* MFC r295463 (by hselasky): Correct PCI device description.mav2016-03-281-1/+1
|
* MFC r275137 (by adrian): Add PCI ID for Intel Lynx Point LP controller.mav2016-03-281-0/+2
| | | | PR: kern/195398
* MFC r295928:hselasky2016-03-072-0/+14
| | | | | | | | | | | Configure the correct bMaxPacketSize for control endpoints before requesting the initial complete device descriptor and not as part of the subsequent babble error recovery. Babble means that the received USB packet was bigger than than configured maximum packet size. This only affects enumeration of FULL speed USB devices which use a bMaxPacketSize different from 8 bytes. This patch might help fix enumeration of USB devices which exhibit USB I/O errors in dmesg during boot.
* MFC r295923:hselasky2016-03-071-1/+2
| | | | | | Be more verbose when truncating number of HID items. Suggested by: Larry Rosenman <ler@lerctr.org>
* MFC r295608:hselasky2016-03-071-1/+1
| | | | | Fix variable assignment inside if-clause in the smsc driver. Found by D5245 / PVS.
* MFC r294235:ian2016-01-231-21/+24
| | | | | | | | | | | | Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783. Previously the polarity was for TTL levels, which are the reverse of RS-232. Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl value, the same as was recently added to uart(4), so that people using TTL level connections can request a logical inverting of the signal. Use the named constants from the new dev/uart/uart_ppstypes.h for the pps capture modes and option bits.
* MFC r293192:hselasky2016-01-121-6/+21
| | | | Fix for directly connected FULL or LOW speed USB devices.
* MFC 292366: Flag the first port on a Sheevaplug ftdi serial device as jtag.ian2016-01-051-1/+1
|
* MFC r291199:hselasky2016-01-041-1/+1
| | | | Fix compile warning about shifting signed negative constant.
* MFC: r285909, r285913 (partial)marius2015-12-271-71/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | - Probe UICLASS_CDC/UISUBCLASS_ABSTRACT_CONTROL_MODEL/0xff again. This variant of Microsoft RNDIS, i. e. their unofficial version of CDC ACM, has been disabled in r261544 (r262363 in stable/10) for resolving a conflict with umodem(4). Eventually, in r275790 (r276243 in stable/10) that problem was dealt with in the right way. However, r275790 failed to put probing of RNDIS devices in question back. - Initialize the device prior to querying it, as required by the RNDIS specification. Otherwise already determining the MAC address may fail rightfully. - On detach, halt the device again. - Use UCDC_SEND_ENCAPSULATED_{COMMAND,RESPONSE}. While these macros are resolving to the same values as UR_{CLEAR_FEATURE,GET_STATUS}, the former set is way more appropriate in this context. - Report unknown - rather: unimplemented - events unconditionally and not just in debug mode. This ensures that we'll get some hint of what is going wrong instead of the driver silently failing. - Deal with the Microsoft ActiveSync requirement of using an input buffer the size of the expected reply or larger - except for variably sized replies - when querying a device. - Fix some pointless NULL checks, style bugs etc. This changes allow urndis(4) to communicate with a Microsoft-certified USB RNDIS test token.
* MFC r291953:hselasky2015-12-141-1/+1
| | | | | | | | | | | | When setting up VLANs on a Raspberry Pi ethernet port, the MTU drops from 1500 to 1496 bytes. The MTU should remain at 1500, extending the frame size as per IEEE 802.3. Adding IFCAP_VLAN_MTU to the if_capabilities field in the smsc driver solves the problem. The datasheet for the LAN9512 chip, section 3.2.3 states that the chip supports the extended frame. Submitted by: rpp@ci.com.au PR: 205050
* MFC r263985, r275646 and r289028:hselasky2015-12-143-3/+69
| | | | | | Add more USB IDs. PR: usb/188046
* MFC r291146:hselasky2015-11-241-2/+8
| | | | | | Add support for Kana and Eisu keys to the USB keyboard driver. PR: 204709
* MFC r290326:hselasky2015-11-241-2/+6
| | | | | | | Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising allocation of DMA bounce buffers. Discussed with: ian @
* MFC r277974:hselasky2015-11-231-3/+3
| | | | | | | Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by using __DECONST. No functional change. Differential Revision: https://reviews.freebsd.org/D1743
* MFC r290639:hselasky2015-11-192-106/+281
| | | | | | | | Update the wsp driver to support newer touch pads, like found in MacBookPro11,4 and MacBook12,1. This update adds support for the force touch parameter. PR: 204420
* MFC r290542:hselasky2015-11-192-39/+143
| | | | | | | Avoid using the bounce buffer when the source or destination buffer is 32-bits aligned. Merge the two bounce buffers into a single one. Some rough tests showed that the DWC OTG throughput on RPI2 increased by 10% after this patch.
OpenPOWER on IntegriCloud