aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* MFC r338200: Adding device ID for Terratec SiXPack 5.1+.Tai-hwa Liang2018-12-261-0/+1
| | | | Notes: svn path=/stable/8/; revision=342468
* 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/8/; revision=339723
* 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/8/; revision=339718
* 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/8/; revision=338328
* 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/8/; revision=337513
* MFC r333004David C Somayajulu2018-05-091-5/+5
| | | | | | | | | | | 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/8/; revision=333437
* 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/8/; revision=319068
* 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/8/; revision=318981
* MFC r314365David C Somayajulu2017-03-245-86/+339
| | | | | | | | | | | | | | 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/8/; revision=315884
* 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/8/; revision=315266
* MFC r309400:Hans Petter Selasky2016-12-191-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for endless recursion in the ACPI GPE handler during boot. When handling a GPE ACPI interrupt object the EcSpaceHandler() function can be called which checks the EC_EVENT_SCI bit and then recurse on the EcGpeQueryHandler() function. If there are multiple GPE events pending the EC_EVENT_SCI bit will be set at the next call to EcSpaceHandler() causing it to recurse again via the EcGpeQueryHandler() function. This leads to a slow never ending recursion during boot which prevents proper system startup, because the EC_EVENT_SCI bit never gets cleared in this scenario. The behaviour is reproducible with the ALASKA AMI in combination with a newer Skylake based mainboard in the following way: Enter BIOS and adjust the clock one hour forward. Save and exit the BIOS. System fails to boot due to the above mentioned bug in EcGpeQueryHandler() which was observed recursing multiple times. This patch adds a simple recursion guard to the EcGpeQueryHandler() function and also also adds logic to detect if new GPE events occurred during the execution of EcGpeQueryHandler() and then loop on this function instead of recursing. Reviewed by: jhb Notes: svn path=/stable/8/; revision=310256
* MFC r308437 and r308461:Hans Petter Selasky2016-11-121-2/+16
| | | | | | | | | | | | | | Range check the jitter values to avoid bogus sample rate adjustments. The expected deviation should not be more than 1Hz per second. The USB v2.0 specification also mandates this requirement. Refer to chapter 5.12.4.2 about feedback. Allow higher sample rates to have more jitter than lower ones. PR: 208791 Notes: svn path=/stable/8/; revision=308574
* MFC r307518:Hans Petter Selasky2016-11-0711-59/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/stable/8/; revision=308404
* MFC r308144 and r308165:Hans Petter Selasky2016-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 Notes: svn path=/stable/8/; revision=308397
* MFC r306478:Hans Petter Selasky2016-10-102-5/+7
| | | | | | | | | | | | Add new USB ID. While at it remove some whitespaces. Submitted by: Jose Luis Duran <jlduran@gmail.com> PR: 213110 Notes: svn path=/stable/8/; revision=306959
* MFC r305590:Hans Petter Selasky2016-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 Notes: svn path=/stable/8/; revision=305831
* MFC r305421:Hans Petter Selasky2016-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@ Notes: svn path=/stable/8/; revision=305736
* MFC r303765 and r304571:Hans Petter Selasky2016-09-091-7/+47
| | | | | | | | | | | | | | | 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. 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. Notes: svn path=/stable/8/; revision=305647
* MFC r304629:Hans Petter Selasky2016-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 Notes: svn path=/stable/8/; revision=305001
* MFC r304597:Hans Petter Selasky2016-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 Notes: svn path=/stable/8/; revision=304995
* MFC 298950: Fix an off by one error when remapping MSI-X vectors.John Baldwin2016-08-201-2/+2
| | | | | | | | | | | pci_remap_msix() can be used to alter the mapping of allocated MSI-X vectors to the MSI-X table. The code had an off by one error when adding the IRQ resources after performing a remap. This was fatal for any vectors in the table that used the "last" valid IRQ as those vectors were assigned a garbage IRQ value. Notes: svn path=/stable/8/; revision=304511
* MFC r302371:Hans Petter Selasky2016-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. Notes: svn path=/stable/8/; revision=303999
* MFC r301039:Hans Petter Selasky2016-08-121-3/+19
| | | | | | | | | | | Add support for simplex USB MIDI devices, which only provide BULK or INTERRUPT endpoints for moving data in one direction, like the KeyRig 49 from M-Audio. Requested by: Ivan Klymenko <fidaj@ukr.net> Notes: svn path=/stable/8/; revision=303995
* MFC r302076:Hans Petter Selasky2016-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 Notes: svn path=/stable/8/; revision=302268
* MFC r300667:Hans Petter Selasky2016-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. Notes: svn path=/stable/8/; revision=301255
* MFC r299060:Hans Petter Selasky2016-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. Notes: svn path=/stable/8/; revision=301252
* MFC r298591David C Somayajulu2016-05-101-2/+2
| | | | | | | | 1. Removed -Wno-shift-negative-value from Makefile 2. Fixed warning its absence caused in bxe_elink.c Notes: svn path=/stable/8/; revision=299305
* MFC r298496David C Somayajulu2016-05-101-141/+0
| | | | | | | Remove Unused/Dead Code Notes: svn path=/stable/8/; revision=299304
* MFC r298294David C Somayajulu2016-05-103-67/+169
| | | | | | | | | | | | | | 1. modify fwdump (a.k.a grcdump) so that grcdump memory is allocated and freed on as needed basis. 2. grcdump can be taken at failure points by invoking bxe_grc_dump() when trigger_grcdump sysctl flag is set. When grcdump is taken grcdump_done sysctl flag is set. 3. grcdump_done can be monitored by the user to retrieve the grcdump Submitted by:vaishali.kulkarni@qlogic.com Notes: svn path=/stable/8/; revision=299303
* MFC r297884David C Somayajulu2016-04-193-5/+400
| | | | | | | | | Add support for Flash Update Submitted by:nrapendra.singh@qlogic.com;vaishali.kulkarni@qlogic.com;davidcs@freebsd.org Notes: svn path=/stable/8/; revision=298289
* MFC r297873David C Somayajulu2016-04-192-23/+63
| | | | | | | | | | | | 1. Process tx completions in bxe_periodic_callout_func() and restart transmissions if possible. 2. For SIOCSIFFLAGS call bxe_init_locked() only if !BXE_STATE_DISABLED 3. remove code not needed in bxe_init_internal_common() Submitted by:vaishali.kulkarni@qlogic.com;venkata.bhavaraju@qlogic.com Notes: svn path=/stable/8/; revision=298287
* MFC r296342:Hans Petter Selasky2016-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. Notes: svn path=/stable/8/; revision=297644
* MFC r297155David C Somayajulu2016-04-062-22/+68
| | | | | | | Modifications to achieve a common source base from FreeBSD7.x thru 10.x Notes: svn path=/stable/8/; revision=297624
* MFC r296579David C Somayajulu2016-03-141-27/+118
| | | | | | | | Fix code so that buf_ring allocation for Tx Queues and their mutexes is done during during bxe_attach() and freed during bxe_detach() Notes: svn path=/stable/8/; revision=296878
* MFC r296071David C Somayajulu2016-03-0919-90249/+103852
| | | | | | | | Upgrade the firmware carried in driver and loaded during hardware initialization (a.k.a STORM firmware) to version 7.13.1 (latest version) Notes: svn path=/stable/8/; revision=296582
* MFC r295928:Hans Petter Selasky2016-03-072-7/+25
| | | | | | | | | | | | | | 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. Notes: svn path=/stable/8/; revision=296448
* MFC r295830David C Somayajulu2016-02-254-1064/+110
| | | | | | | Remove dead code. Code Cleanup. Improve clarity in debug messages Notes: svn path=/stable/8/; revision=296046
* MFC r295823David C Somayajulu2016-02-252-42/+56
| | | | | | | | Modified the use of bxe_grc_dump() function so that it can be invoked directly at any potential error path, where a fwdump is needed. The fwdump (a.k.a grcdump) is stored in a driver buffer. The sysctl grcdump_done indicates if a fwdump was taken and waiting to be retrieved. The sysctl trigger_grcdump can be used to manually trigger a fwdump. Notes: svn path=/stable/8/; revision=296045
* MFC r292639David C Somayajulu2016-01-135-2/+2782
| | | | | | | Add support for firmware dump (a.k.a grcdump) Notes: svn path=/stable/8/; revision=293795
* MFC r292638David C Somayajulu2016-01-133-4/+23
| | | | | | | | | | | | | Check for packet_length is greater than 60 bytes as well as packet_length is greater than len_on_bd, before invoking the routine to handle jumbo over SGL (bxe_service_rxsgl()). Add counters for number of jumbo_over_SGL packets (rx_bxe_service_rxsgl) and erroneous jumbo_over_SGL packets (rx_erroneous_jumbo_sge_pkts) Fix formatting in bxe_sysctl_state() Notes: svn path=/stable/8/; revision=293794
* MFC r289199David C Somayajulu2016-01-131-1/+4
| | | | | | | Add support for reading device temperature Notes: svn path=/stable/8/; revision=293793
* MFC r291199:Hans Petter Selasky2016-01-041-1/+1
| | | | | | | Fix compile warning about shifting signed negative constant. Notes: svn path=/stable/8/; revision=293148
* MFC r291146:Hans Petter Selasky2015-11-241-2/+8
| | | | | | | | | Add support for Kana and Eisu keys to the USB keyboard driver. PR: 204709 Notes: svn path=/stable/8/; revision=291256
* MFC r290326:Hans Petter Selasky2015-11-241-2/+6
| | | | | | | | | | Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising allocation of DMA bounce buffers. Discussed with: ian @ Notes: svn path=/stable/8/; revision=291252
* MFC r284722 and r284724:Hans Petter Selasky2015-11-231-1/+1
| | | | | | | Fix endless recursion in ti(4)'s ti_ifmedia_upd(), found by clang 3.7.0. Notes: svn path=/stable/8/; revision=291204
* MFC r290441:Hans Petter Selasky2015-11-091-0/+1
| | | | | | | | | | | | | Fix for unaligned IP-header. The mbuf length fields must be set before m_adj() is called else m_adj() will not always adjust the mbuf and an unaligned read exception can trigger inside the network stack. This can happen on platforms where unaligned reads are not supported. Adjust a length check to include the 2-byte ethernet alignment while at it. Notes: svn path=/stable/8/; revision=290609
* MFC r286887: Using the error return code documented in the comment.Tai-hwa Liang2015-09-141-1/+1
| | | | | | | | | | | Though there is no direct midi_uninit() caller amongst existing drivers at this moment, a quick experiment indicates that EBUSY gives users more precise error message once drivers start to honour this result. For example, emu_midi_detach() should check the result of mpu401_uninit() and block module unloading if there is any MIDI I/O in progress. Notes: svn path=/stable/8/; revision=287786
* MFC r286886: Fixing typo as well as improving readability of a few comments.Tai-hwa Liang2015-09-091-6/+11
| | | | Notes: svn path=/stable/8/; revision=287588
* MFC r286799:Hans Petter Selasky2015-08-292-2/+8
| | | | | | | | | | Fix race in USB PF which can happen if we stop tracing exactly when the kernel is tapping an USB transfer. This leads to a NULL pointer access. The solution is to only trace while the USB bus lock is locked. Notes: svn path=/stable/8/; revision=287275
* MFC r285973David C Somayajulu2015-08-052-22/+15
| | | | | | | | | | | | | | | | | - Avoid lock contention in the if_transmit callback by using trylock and enqueueing the frames when it fails. This way there is some latency removed from the transmitting path. - If IFF_DRV_OACTIVE is set (and also if IFF_DRV_RUNNING is not) just enqueue the desired frames and return successful transmit. This way we avoid to return errors on transmit side and resulting in possible out-of-order frames. Please note that IFF_DRV_OACTIVE is set everytime we get the threshold ring hit, so this can be happening quite often. Submitted by: Attilio.Rao@isilon.com Notes: svn path=/stable/8/; revision=286300