aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Adapt merge of r361581 to 9-stable to unbreak kernel compilation.Hans Petter Selasky2020-06-091-2/+1
| | | | | | | | | This is a direct commit. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=361989
* MFC r361827:Hans Petter Selasky2020-06-081-26/+26
| | | | | | | | | | | | | | | | | | USB HID descriptors may push/pop the current state to allow description of items residing in a so-called union. FreeBSD currently only supports 4 such push levels. If the push level is not restored within the processing of the same HID item, an invalid memory location may be used for subsequent HID item processing. Verify that the push level is always valid when processing HID items. Reported by: Andy Nguyen (Google) Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=361922
* MFC r361581:Hans Petter Selasky2020-06-082-0/+78
| | | | | | | | | | Implement helper function, usbd_get_max_frame_length(), which allows kernel device drivers to correctly predict the default USB transfer frame length. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=361913
* MFC r361577:Hans Petter Selasky2020-06-081-1/+1
| | | | | | | | | | Don't allow USB device drivers to parent own interface. It will prevent proper USB device detach. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=361909
* MFC r360075:Hans Petter Selasky2020-04-261-17/+0
| | | | | | | | | | | | | | Set the maximum exit latency to 0 for XHCI USB 3.0 devices, because we don't implement link power management, LPM. This fixes error code XHCI_TRB_ERROR_BANDWIDTH for isochronous USB 3.0 transactions. Submitted by: Horse Ma <Shichun.Ma@dell.com> Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=360336
* MFC r359120:Hans Petter Selasky2020-03-262-6/+52
| | | | | | | | | | Correctly implement support for remote wakeup for USB 3.0 device. Submitted by: Horse Ma <Shichun.Ma@dell.com> Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=359319
* Define USB_FS_OPEN_STREAM, even if not supported.Hans Petter Selasky2020-03-131-0/+1
| | | | | | | | | This is a direct commit. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=358944
* MFC r358629:Hans Petter Selasky2020-03-114-21/+20
| | | | | | | | | | | | | | | | | | Implement a detaching flag for the sound(4) subsystem to take appropriate actions when we are trying to detach an audio device, but cannot because someone is using it. This avoids applications having to wait for the DSP read data timeout before they receive any error indication. Tested with virtual_oss(8). Remove some unused definitions while at it. PR: 194727 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=358880
* MFC r358738:Hans Petter Selasky2020-03-112-9/+6
| | | | | | | | | | | | | | | Remove the power bit from the super speed root hub port status register because it clobbers the super speed link status when a device is in super speed mode. Currently the power bit is not needed for anything in the USB hub driver. This fixes USB warm reset for super speed devices. Tested by: Shichun.Ma@dell.com Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=358876
* MFC r348631:Hans Petter Selasky2019-06-101-4/+47
| | | | | | | | | | | | | In usb(4) fix a lost completion event issue towards libusb(3). It may happen if a USB transfer is cancelled that we need to fake a completion event. Implement missing support in ugen_fs_copy_out() to handle this. This fixes issues with webcamd(8) and firefox. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=348858
* MFC r342549:Hans Petter Selasky2019-01-032-0/+5
| | | | | | | | | | Add USB quirk for SPL Crimson Rev 1. PR: 234380 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=342729
* MFC r342456:Hans Petter Selasky2019-01-031-7/+46
| | | | | | | | | | | | Fix reading of USB sample rate descriptor for SPL Crimson Rev 1. Read first one entry, then try to read the full rate descriptor table. PR: 234380 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=342728
* MFC r340248:Hans Petter Selasky2018-11-111-1/+11
| | | | | | | | | | Don't read the USB audio sync endpoint when we don't use it to save isochronous bandwidth. Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=340353
* MFC r339366David C Somayajulu2018-10-293-35/+372
| | | | | | | | | Add support for Error Recovery Submitted by:Vaishali.Kulkarni@cavium.com Notes: svn path=/stable/9/; revision=339887
* MFC r338734David C Somayajulu2018-10-291-8/+10
| | | | | | | | | | | Fixed isses: State check before enqueuing transmit task in bxe_link_attn() routine. State check before invoking bxe_nic_unload in bxe_shutdown(). Submitted by:Vaishali.Kulkarni@cavium.com Notes: svn path=/stable/9/; revision=339885
* MFC r339587:Hans Petter Selasky2018-10-291-35/+182
| | | | | | | | | | | | | | | Added support for formula-based arbitrary baud rates, in contrast to the current fixed values, which enables use of rates above 1 Mbps. Improved the detection of HXD chips, and the status flag handling as well. Submitted by: Gabor Simon <gabor.simon75@gmail.com> PR: 225932 Differential revision: https://reviews.freebsd.org/D16639 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=339854
* MFC r339582:Hans Petter Selasky2018-10-251-2/+15
| | | | | | | | | | | Drop sequencer mutex around uiomove() and make sure we don't move more bytes than is available, else a panic might happen. Found by: Peter Holm <peter@holm.cc> Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=339722
* MFC r339581:Hans Petter Selasky2018-10-251-1/+1
| | | | | | | | | | Fix off-by-one which can lead to panics. Found by: Peter Holm <peter@holm.cc> Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=339716
* MFC r338200: Adding device ID for Terratec SiXPack 5.1+.Tai-hwa Liang2018-10-101-0/+1
| | | | Notes: svn path=/stable/9/; revision=339295
* MFC r338038: Extending the delay cycles to give the codec more time to pump ↵Tai-hwa Liang2018-08-261-1/+1
| | | | | | | | | | | | | | | | ADC data across the AC-link. Without this patch, some CS4614 cards will need users to reload the driver manually or the hardware won't be initialised properly. Something like: # kldload snd_csa # kldunload snd_csa # kldload snd_csa Tested with: Terratec SiXPack 5.1+ Notes: svn path=/stable/9/; revision=338327
* MFC r336438David C Somayajulu2018-08-091-13/+29
| | | | | | | | | | | | | Fixes for the following issues: 1. Fix taskqueues drain/free to fix panic seen when interface is being bought down and in parallel asynchronous link events happening. 2. Fix bxe_ifmedia_status() Submitted by:Vaishali.Kulkarni@cavium.com and Anand.Khoje@cavium.com Notes: svn path=/stable/9/; revision=337512
* MFC r336632:Hans Petter Selasky2018-07-301-0/+1
| | | | | | | | | Update modify counter when setting a mixer control. PR: 229969 Notes: svn path=/stable/9/; revision=336891
* MFC r335700:Hans Petter Selasky2018-07-301-2/+27
| | | | | | | | | | | Improve the kernel's USB descriptor reading function. Some USB devices does not allow a partial descriptor readout. Found by: bz@ Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=336888
* MFC r333004David C Somayajulu2018-05-091-5/+6
| | | | | | | | | | | Fix Issue with adding MUltiCast Addresses. When multicast addresses are added/deleted, the delete the multicast addresses previously programmed in HW and reprogram the new set of multicast addresses. Submitted by:Vaishali.Kulkarni@cavium.com Notes: svn path=/stable/9/; revision=333432
* MFC r333003David C Somayajulu2018-05-095-148720/+148782
| | | | | | | Upgraded FW Related Files to version 5.4.67 Notes: svn path=/stable/9/; revision=333423
* MFC r331739David C Somayajulu2018-04-056-10/+52
| | | | | | | | | 1. Add additional debug prints. 2. Break transmit when IFF_DRV_RUNNING is OFF. 3. set desc_count=0 for default case in switch in ql_rcv_isr() Notes: svn path=/stable/9/; revision=332054
* MFC r329855David C Somayajulu2018-03-0613-170/+805
| | | | | | | | | | | | | | | | | | 1. Added support to offline a port if is error recovery on successful. 2. Sysctls to enable/disable driver_state_dump and error_recovery. 3. Sysctl to control the delay between hw/fw reinitialization and restarting the fastpath. 4. Stop periodic stats retrieval if interface has IFF_DRV_RUNNING flag off. 5. Print contents of PEG_HALT_STATUS1 and PEG_HALT_STATUS2 on heartbeat failure. 6. Speed up slowpath shutdown during error recovery. 7. link_state update using atomic_store. 8. Added timestamp information on driver state and minidump captures. 9. Added support for Slowpath event logging 10.Added additional failure injection types to simulate failures. Notes: svn path=/stable/9/; revision=330557
* MFC r324538David C Somayajulu2017-10-197-3/+311
| | | | | | | Added support driver state capture/retrieval Notes: svn path=/stable/9/; revision=324766
* MFC r324535David C Somayajulu2017-10-192-0/+25
| | | | | | | | | Add sanity checks in ql_hw_send() qla_send() to ensure that empty slots in Tx Ring map to empty slot in Tx_buf array before Transmits. If the checks fail further Transmission on that Tx Ring is prevented. Notes: svn path=/stable/9/; revision=324765
* MFC r324065David C Somayajulu2017-10-051-0/+1
| | | | | | | | Tx Ring Shadow Consumer Index Register needs to be cleared prior to passing it's physical address to the FW during Tx Create Context. Notes: svn path=/stable/9/; revision=324333
* MFC r324026David C Somayajulu2017-10-053-3/+15
| | | | | | | | | Fix delete all multicast addresses Submitted by: Anand.Khoje@cavium.com Notes: svn path=/stable/9/; revision=324332
* MFC r323824David C Somayajulu2017-09-262-4/+19
| | | | | | | | | | | | | | | | | 1. ql_hw.c: In ql_hw_send() return EINVAL when TSO framelength exceeds max supported length by HW.(davidcs) 2. ql_os.c: In qla_send() call bus_dmamap_unload before freeing mbuf or recreating dmmamap.(davidcs) In qla_fp_taskqueue() Add additional checks for IFF_DRV_RUNNING Fix qla_clear_tx_buf() call bus_dmamap_sync() before freeing mbuf. Submitted by: David.Bachu@netapp.com Notes: svn path=/stable/9/; revision=324036
* MFC r323782David C Somayajulu2017-09-262-1/+10
| | | | | | | Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval Notes: svn path=/stable/9/; revision=324035
* MFC r323781David C Somayajulu2017-09-261-34/+34
| | | | | | | Update minidump template for version 5.4.66 Notes: svn path=/stable/9/; revision=324034
* MFC r322530 and r323220:Hans Petter Selasky2017-09-202-1/+3
| | | | | | | | | | | Add new USB quirk(s). PR: 221775 PR: 221328 Sponsored by: Mellanox Technologies Notes: svn path=/stable/9/; revision=323810
* MFC 322771David C Somayajulu2017-08-2815-149056/+149554
| | | | | | | | | | | | Upgrade FW to 5.4.66 sysctls to display stats, stats polled every 2 seconds Modify QLA_LOCK()/QLA_UNLOCK() to not sleep after acquiring mtx_lock Add support to turn OFF/ON error recovery following heartbeat failure for debug purposes. Set default max values to 32 Tx/Rx/SDS rings Notes: svn path=/stable/9/; revision=322973
* MFC 321233David C Somayajulu2017-07-264-5/+14
| | | | | | | | | | Raise the watchdog timer interval to 2 ticks, there by guaranteeing that it fires between 1ms and 2ms. ` Treat two consecutive occurrences of Heartbeat failures as a legitimate Heartbeat failure Notes: svn path=/stable/9/; revision=321503
* MFC 320705David C Somayajulu2017-07-261-1/+7
| | | | | | | | Release mtx hw_lock before calling pause() in qla_stop() and qla_error_recovery() Notes: svn path=/stable/9/; revision=321501
* MFC 320694David C Somayajulu2017-07-262-5/+5
| | | | | | | Allow MTU changes without ifconfig down/up Notes: svn path=/stable/9/; revision=321500
* MFC r320175David C Somayajulu2017-06-262-0/+3
| | | | | | | Add pkts_cnt_oversized to stats. Notes: svn path=/stable/9/; revision=320371
* MFC r318860:Hans Petter Selasky2017-05-281-0/+1
| | | | | | | | Declare the "snd_fxdiv_table" once. This shaves around 24Kbytes of binary data from sound.ko and the kernel. Notes: svn path=/stable/9/; revision=319067
* MFC r318820:Hans Petter Selasky2017-05-271-4/+4
| | | | | | | | | | | | Increase the allowed maximum number of audio channels from 31 to 127 in the PCM feeder mixer. Without this change a value of 32 channels is treated like zero, due to using a mask of 0x1f, causing a kernel assert when trying to playback bitperfect 32-channel audio. Also update the AWK script which is generating the division tables to handle more than 18 channels. This commit complements r282650. Notes: svn path=/stable/9/; revision=318980
* MFC r317996David C Somayajulu2017-05-152-14/+13
| | | | | | | | Fix bug where MTX_DEF lock was held while taskqueue_drain() was invoked. Check IFF_DRV_RUNNING flag is set prior to calling ql_hw_set_multi() Notes: svn path=/stable/9/; revision=318309
* MFC r317180David C Somayajulu2017-05-084-60/+63
| | | | | | | | | Cleanup QLA_LOCK/QLA_UNLOCK macros remove unused QLA_TX_LOCK/QLA_TX_UNLOCK macros format qla_error_recovery() Notes: svn path=/stable/9/; revision=317992
* MFC r316183David C Somayajulu2017-04-204-148905/+148310
| | | | | | | Upgrade firmware and other related files to version 5.4.64 Notes: svn path=/stable/9/; revision=317184
* MFC r316309David C Somayajulu2017-04-194-5/+151
| | | | | | | Add support for optional Soft LRO Notes: svn path=/stable/9/; revision=317113
* MFC r314365David C Somayajulu2017-03-245-83/+315
| | | | | | | | | | | | | | 1. state checks in bxe_tx_mq_start_locked() and bxe_tx_mq_start() to sync threads during interface down or detach. 2. add sysctl to set pause frame parameters 3. increase max segs for TSO packets to BXE_TSO_MAX_SEGMENTS (32) 4. add debug messages for PHY 5. HW LRO support restricted to FreeBSD versions 8.x and above. Submitted by: Vaishali.Kulkarni@cavium.com Notes: svn path=/stable/9/; revision=315883
* MFC r314328:Hans Petter Selasky2017-03-141-5/+29
| | | | | | | | | | | | | | | | Fix startup race initialising ACPI CM battery structures on MacBookPro. During acpi_cmbat_attach() the acpi_cmbat_init_battery() notification handler is registered. It has been observed this notification handler can be called instantly, before the attach routine has returned. In the notification handler there is a call to device_is_attached() which returns false. Because the softc is set we know an attach is in progress and the fix is simply to wait and try again in this case. Reviewed by: avg @ Notes: svn path=/stable/9/; revision=315265
* MFC r312424:Hans Petter Selasky2017-03-143-16/+35
| | | | | | | | | | | | | | Fix problem with suspend and resume when using Skylake chipsets. Make sure the XHCI controller is reset after halting it. The problem is clearly a BIOS bug as the suspend and resume is failing without loading the XHCI driver. The same happens when using Linux and the XHCI driver is not loaded. Submitted by: Yanko Yankulov <yanko.yankulov@gmail.com> PR: 216261 Notes: svn path=/stable/9/; revision=315253
* MFC r312338:Hans Petter Selasky2017-03-144-0/+66
| | | | | | | | | | Add USB audio support for S/PDIF output with C-Media CM6206 devices. Submitted by: Julien Nadeau <vedge@hypertriton.com> PR: 216131 Notes: svn path=/stable/9/; revision=315250