aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* - Use unsigned version of min() when handling arguments of SETFKEY ioctl.Gleb Smirnoff2016-05-171-1/+1
| | | | | | | | | | | | | | | - Validate that user supplied control message length in sendmsg(2) is not negative. Security: SA-16:18 Security: CVE-2016-1886 Security: SA-16:19 Security: CVE-2016-1887 Submitted by: C Turt <cturt hardenedbsd.org> Approved by: so Notes: svn path=/releng/10.2/; revision=300086
* o Fix OpenSSH xauth(1) command injection. [SA-16:14]Gleb Smirnoff2016-03-162-2/+21
| | | | | | | | | | | | | | | o Fix incorrect argument validation in sysarch(2). [SA-16:15] o Fix Hyper-V KVP (Key-Value Pair) daemon indefinite sleep. [EN-16:04] o Fix hv_netvsc(4) incorrect TCP/IP checksums. [EN-16:05] Errata: FreeBSD-EN-16:04.hyperv Errata: FreeBSD-EN-16:05.hv_netvsc Security: FreeBSD-SA-16:14.openssh-xauth, CVE-2016-3115 Security: FreeBSD-SA-16:15.sysarch, CVE-2016-1885 Approved by: so Notes: svn path=/releng/10.2/; revision=296955
* o Fix filemon and bmake meta-mode stability issues. [EN-16:01]Gleb Smirnoff2016-01-143-223/+31
| | | | | | | | | | | | | | | | | | | | | | | | | o Fix invalid TCP checksums with pf(4). [EN-16:02.pf] o Fix YP/NIS client library critical bug. [EN-16:03.yplib] o Fix SCTP ICMPv6 error message vulnerability. [SA-16:01.sctp] o Fix ntp panic threshold bypass vulnerability. [SA-16:02.ntp] o Fix Linux compatibility layer incorrect futex handling. [SA-16:03.linux] o Fix Linux compatibility layer setgroups(2) system call. [SA-16:04.linux] o Fix TCP MD5 signature denial of service. [SA-16:05.tcp] o Fix insecure default bsnmpd.conf permissions. [SA-16:06.bsnmpd] Errata: FreeBSD-EN-16:01.filemon Errata: FreeBSD-EN-16:02.pf Errata: FreeBSD-EN-16:03.yplib Security: FreeBSD-SA-16:01.sctp, CVE-2016-1879 Security: FreeBSD-SA-16:02.ntp, CVE-2015-5300 Security: FreeBSD-SA-16:03.linux, CVE-2016-1880 Security: FreeBSD-SA-16:04.linux, CVE-2016-1881 Security: FreeBSD-SA-16:05.tcp, CVE-2016-1882 Security: FreeBSD-SA-16:06.bsnmpd, CVE-2015-5677 Approved by: so Notes: svn path=/releng/10.2/; revision=293893
* MF-stable/10 r286263:Warner Losh2015-08-042-57/+33
| | | | | | | | Only match devices that belong to this driver. Approved by: re@ (gjb@) Notes: svn path=/releng/10.2/; revision=286264
* MFC: r285843 (r286059 in stable/10)Marius Strobl2015-07-302-9/+16
| | | | | | | | | | | | | | | | | | | | | | | - Since r253161, uart_intr() abuses FILTER_SCHEDULE_THREAD for signaling uart_bus_attach() during its test that 20 iterations weren't sufficient for clearing all pending interrupts, assuming this means that hardware is broken and doesn't deassert interrupts. However, under pressure, 20 iterations also can be insufficient for clearing all pending interrupts, leading to a panic as intr_event_handle() tries to schedule an interrupt handler not registered. Solve this by introducing a flag that is set in test mode and otherwise restores pre-r253161 behavior of uart_intr(). The approach of additionally registering uart_intr() as handler as suggested in PR 194979 is not taken as that in turn would abuse special pccard and pccbb handling code of intr_event_handle(). [1] - Const'ify uart_driver_name. - Fix some minor style bugs. PR: 194979 [1] Reviewed by: marcel (earlier version) Approved by: re (gjb) Notes: svn path=/releng/10.2/; revision=286061
* MFC r285928 Do not enable UDP checksum offloading when running on theWei Hu2015-07-301-2/+20
| | | | | | | | | | | | | Hyper-V on Windows Server 2012 and earlier hosts. Submitted by: whu Reviewed by: royger Approved by: re (gjb) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D3102 Notes: svn path=/releng/10.2/; revision=286058
* MFS r285863 (jhb):Glen Barber2015-07-295-113/+96
| | | | | | | | | | | | | | | Partially revert r284034. In particular, revert the final change in this MFC (281874). It broke suspend and resume on several Thinkpads (though not all) in 10 even though it works fine on the same laptops in HEAD. PR: 201239 Reported by: Kevin Oberman and several others Approved by: re (kib) Sponsored by: The FreeBSD Foundation Notes: svn path=/releng/10.2/; revision=285991
* MFS r285918:Jim Harris2015-07-271-10/+12
| | | | | | | | | | | | MFC r285816: nvme: ensure csts.rdy bit is cleared before returning from nvme_ctrlr_disable Approved by: re (gjb) Sponsored by: Intel Notes: svn path=/releng/10.2/; revision=285922
* MFS r285917:Jim Harris2015-07-271-6/+28
| | | | | | | | | | | | MFC r285815: nvme: properly handle case where pci_alloc_msix does not alloc all vectors Approved by: re (gjb) Sponsored by: Intel Notes: svn path=/releng/10.2/; revision=285921
* MFS r285915:Jim Harris2015-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | MFC r285767: nvd: set d_delmaxsize to full capacity of NVMe namespace The NVMe specification has no ability to specify a maximum delete size that is less than the full capacity of the namespace - so just using the namespace size is the correct value here. This fixes reported issues where ZFS trim on init looked like it was hanging the system - previously the default I/O max size (128KB on Intel NVMe controllers) was used for delete operations which worked out to only about 8MB/s. With this patch I can add an 800GB DC P3700 drive to a ZFS pool in about 15-20 seconds. Approved by: re (gjb) Sponsored by: Intel Notes: svn path=/releng/10.2/; revision=285919
* MFC r285798Andrew Rybchenko2015-07-233-4/+41
| | | | | | | | | | | | | | | sfxge: added fallbacks for pre 4.2.1 firmware support Driver must be able to start against older firmware that is missing recently added MCDI calls, otherwise firmware upgrade will not be possible. Submitted by: Richard Houldsworth <rhouldsworth at solarflare.com> Sponsored by: Solarflare Communications, Inc. Approved by: re (gjb) Notes: svn path=/stable/10/; revision=285813
* MFC: r285628Christian Brueffer2015-07-231-0/+29
| | | | | | | | | | | Actually recognize all Intel Lynx Point devices we have device IDs for. PR: 195851 Submitted by: ftigeot@wolfpond.org Approved by: re (gjb) Notes: svn path=/stable/10/; revision=285811
* Merge driver for PMC Sierra's range of SAS/SATA HBAs.Scott Long2015-07-23134-0/+377839
| | | | | | | | Submitted by: Achim Leubner <Achim.Leubner@pmcs.com> Approved by: re Notes: svn path=/stable/10/; revision=285809
* Partial MFC of r285528 as full RSS support is not available in FreeBSD 10.Hiren Panchasara2015-07-211-1/+19
| | | | | | | | | | | | | | Expose full 32bit RSS hash from card regardless of whether RSS is defined or not. When doing multiqueue, we are all setup to have full 32bit RSS hash from the card. We do not need to hide that under "ifdef RSS" and should expose that by default so others like lagg(4) can use that and avoid hashing the traffic by themselves. Approved by: re (gjb) Sponsored by: Limelight Networks Notes: svn path=/stable/10/; revision=285764
* MFC: r284296Roger Pau Monné2015-07-213-307/+98
| | | | | | | | | xen-blk{front/back}: remove broken FreeBSD extensions Approved by: re (gjb) Notes: svn path=/stable/10/; revision=285738
* MFC: r285089Roger Pau Monné2015-07-211-5/+25
| | | | | | | | | netfront: preserve configuration across migrations Approved by: re (gjb) Notes: svn path=/stable/10/; revision=285737
* Fix a typo in r285668. Replace hw.ixgbe.* with correct hw.ix.* for a couple ofHiren Panchasara2015-07-211-2/+2
| | | | | | | | | | sysctls. Approved by: re (gjb) Sponsored by: Limelight Networks Notes: svn path=/stable/10/; revision=285731
* Loader tunable fetching has been broken on stable/10 since ix(4) rewriteHiren Panchasara2015-07-181-0/+6
| | | | | | | | | | | | | | introduced by r280182. FreeBSD-head doesn't need TUNABLE_INT() now with SYSCTL_INT() but stable/10 still does. Note: This is a direct commit to stable/10. PR: 201644 Reviewed by: erj Approved by: re (gjb) Sponsored by: Limelight Networks Notes: svn path=/stable/10/; revision=285668
* MFC: r261495 by edChristian Brueffer2015-07-151-1/+1
| | | | | | | | | | | Use right buffer to print to. PR: kern/176597 Submitted by: Christoph Mallon <christoph mallon gmx de> Approved by: re (gjb) Notes: svn path=/stable/10/; revision=285608
* MFC: r285006Christian Brueffer2015-07-151-1/+1
| | | | | | | | | | | Use the correct le*dec function to decode a 16bit type. PR: 194228 Submitted by: David Horwitt Approved by: re (marius) Notes: svn path=/stable/10/; revision=285599
* MFC r284746 and r284889 TSO and checksum offloading support for NetvscWei Hu2015-07-077-577/+916
| | | | | | | | | | | | | | driver on Hyper-V. Submitted by: whu Reviewed by: royger Approved by: re Relnotes: yes Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D2906 Notes: svn path=/stable/10/; revision=285236
* MFC: r281337Marius Strobl2015-07-051-9/+5
| | | | | | | | | | | | | | | Don't enable RX and TX before their initial configuration is done, i. e. after setting up interrupt moderation but before turning interrupts on. This matches what Realtek's r8168 Linux driver does as of version 8.039.00 and fixes problems with certain incarnations of certain MAC revisions like the interface requiring an extra up/down-cycle after boot to start working or DMA configuration not being adhered to. PR: 193743, 197535 Approved by: re (kib) Notes: svn path=/stable/10/; revision=285177
* Latest clang uses openat(2).Simon J. Gerraty2015-07-032-4/+76
| | | | | | | | | | | | | | | | | If the pathname is absolute or dirfd is AT_FDCWD we can handle it exactly like open(2). Otherwise we output an A record to indicate that the path of an open directory needs to be used (earlier in the trace). Also filemon_pid_check needs to hold proctree_lock and use proc_realparent() Differential Revision: D2810 Reviewed by: jhb Approved by: re Notes: svn path=/stable/10/; revision=285112
* MFC r284348: Fix panic when adding vtnet interfaces to a bridgeKristof Provost2015-07-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | vtnet interfaces are always in promiscuous mode (at least if the VIRTIO_NET_F_CTRL_RX feature is not negotiated with the host). if_promisc() on a vtnet interface returned ENOTSUP although it has IFF_PROMISC set. This confused the bridge code. Instead we now accept all enable/disable promiscuous commands (and always keep IFF_PROMISC set). There are also two issues with the if_bridge error handling. If if_promisc() fails it uses bridge_delete_member() to clean up. This tries to disable promiscuous mode on the interface. That runs into an assert, because promiscuous mode was never set in the first place. (That's the panic reported in PR 200210.) We can only unset promiscuous mode if the interface actually is promiscuous. This goes against the reference counting done by if_promisc(), but only the first/last if_promic() calls can actually fail, so this is safe. A second issue is a double free of bif. It's already freed by bridge_delete_member(). PR: 200210 Notes: svn path=/stable/10/; revision=285016
* MFC r278153,284416: ttm memory allocation improvementsAndriy Gapon2015-07-012-21/+74
| | | | | | | | | | | | | | | | | | | | If the vm_page_alloc_contig() failed in the ttm page allocators, do what other callers of vm_page_alloc_contig() do, retry after vm_pageout_grow_cache(). ttm_vm_page_alloc: use vm_page_alloc for pages without dma32 restriction This change re-organizes code a little bit to extract common pieces of ttm_alloc_new_pages() and ttm_get_pages() into dedicated functions. Also, for requests without address restrictions regular vm_page_alloc() is used. Lastly, when vm_page_alloc_contig() fails we call VM_WAIT before calling vm_pageout_grow_cache() to ensure that there is enough free pages at all. Note: no MFC to stable/9 because it lacks vm_pageout_grow_cache(). Notes: svn path=/stable/10/; revision=285002
* MFC r284741David C Somayajulu2015-06-3019-163/+172147
| | | | | | | | | | | | | | Updated Copyright information Added support for the following: - iSCSI TLV (requires 64 Tx and 32 Rx rings - 9K receive buffers for jumbo frames (feature may be enabled/disabled) - builtin firmware, bootloader and minidump template - quick stats - async event handling for SFP insertion/removal and DCBX changes - Configuring DCBX and interrupt coalescing parameters Notes: svn path=/stable/10/; revision=284982
* MFC r284739David C Somayajulu2015-06-301-3/+7
| | | | | | | | | tx_mtx should be grabbed before calling buf_ring_dequeue_sc() Submitted by:Attilio.Rao@isilon.com Notes: svn path=/stable/10/; revision=284966
* MFC r284470David C Somayajulu2015-06-302-1/+3
| | | | | | | | | | | In bxe_init_mcast_macs_list(): mc_mac->mac needs to point to the multicast mac address In bxe_set_mc_list(): added missing BXE_MCAST_UNLOCK() In __ecore_vlan_mac_h_exec_pending(): need to check for ECORE_PENDING Submitted by: gary.zambrano@qlogic.com Notes: svn path=/stable/10/; revision=284963
* MFC r284335David C Somayajulu2015-06-303-79/+47
| | | | | | | | | | | | | PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which can cause the PHY to use bogus values. Fixes intermittent link failures. bxe_ioctl() completes all functions within its context as opposed to a taskqueue earlier. bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the functionality within its context Submitted by: gary.zambrano@qlogic.com Notes: svn path=/stable/10/; revision=284962
* Re-add if_hw_tso* assignments to if_ix.c that were removed in r283668.Eric Joyner2015-06-301-0/+4
| | | | | | | | | These are used in stable/10 as well as 11. Requested by: rmacklem@ Notes: svn path=/stable/10/; revision=284958
* MFC r284792:Xin LI2015-06-298-17491/+17545
| | | | | | | | | | | | | | | | | | | | Merge changes from vendor driver 1.1.4: v1.1.4 2015-06-09 * Fix a bug that FailLED was not initialized properly. v1.1.3 2015-05-19 * Support Report Luns command. v1.1.2 2015-05-05 * Fix a bug that report wrong physical sector size for 512e HDD. Many thanks to HighPoint for continued support of FreeBSD! This driver update is intended for 10.2-RELEASE. Submitted by: Steve Chang Notes: svn path=/stable/10/; revision=284935
* MFC r284808: Remove limitations on setting WWNNs starting from 2.Alexander Motin2015-06-281-2/+2
| | | | | | | | | | It is odd that driver first tries to generate synthetic WWNN based on WWPN starting from 2, but then refuses to use it. If we don't trust generated WWNN, we should probably not generate it. Same time this limitation prevents potentially valid WWNN setting by user. Notes: svn path=/stable/10/; revision=284907
* MFC r284748: Fix reported_gone setting, missed in some cases.Alexander Motin2015-06-281-14/+14
| | | | | | | | | This makes driver better track reported CAM_SEL_TIMEOUTs to properly report device reappearance later. This fixes target 0 not reappearing after initiator mode disabled and then reenabled. Notes: svn path=/stable/10/; revision=284906
* MFC r284727: Add dev.isp.X.role sysctl in addition to tunable.Alexander Motin2015-06-282-22/+93
| | | | | | | | | | It (mostly) allows to enable/disable initiator mode in run time. Target mode control is blocked here to force coordination with CTL. While there, add separate tunables/sysctls for virtual channels. Notes: svn path=/stable/10/; revision=284905
* MFC r284681: Rewrite port database handling for target mode.Alexander Motin2015-06-282-119/+128
| | | | | | | | | | | Previous implementation was too fragile to initiator parameters changes. In case of port role change it could not survive different handle assigned to the same initiator by firmware, even though initiator was logged out. The new implementation should be more resillient to this kind of problems, trying to work in any situation and only warn user about suspisious events. Notes: svn path=/stable/10/; revision=284904
* MFC r267386,269611,284730:Xin LI2015-06-2615-38265/+43345
| | | | | | | | | | Update vendor driver to 1.2.7. This update improves driver reliability and adds support of 4Kn drives and report LUNs command. Many thanks to HighPoint for providing this driver update. Notes: svn path=/stable/10/; revision=284879
* Limit the number of autoconfigured queues to 8.Eric Joyner2015-06-261-2/+5
| | | | | | | | | | | | | | This limit was in a previous version of the driver, but it is being re- added to match the behavior of previous versions of 10. It prevents the driver from using too many MSI-X vectors on systems with a large number of logical CPU cores. Thanks to <jwd@slowblink.com> for bringing up this issue. Approved by: jfv (mentor) Notes: svn path=/stable/10/; revision=284876
* MFC: r284747Andrew Rybchenko2015-06-261-1/+9
| | | | | | | | | | | | | sfxge: skip VPD info population if access is denied The patch allows to run on unprivileged PF (PFIOV) passed to a virtual machine. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. Notes: svn path=/stable/10/; revision=284867
* MFC r284698: Dump additional config bytes for INIT_FIRMWARE_MULTI_ID.Alexander Motin2015-06-251-0/+5
| | | | Notes: svn path=/stable/10/; revision=284802
* MFC r284697: Add logging of executed mailbox command names.Alexander Motin2015-06-251-5/+7
| | | | | | | | Previously those commands were logged only as part of register dump, that is not very readable. Notes: svn path=/stable/10/; revision=284801
* MFC r284540:Alexander Motin2015-06-251-0/+8
| | | | | | | | | | | | In case of target mode disable at least ISP2532 return invalid zero ct_rxid value on CTIO completion. Try to workaround that using tag_id from the CCB, pointed by still valid ct_syshandle. I don't know whether this is valid fix or dirty hack, but considering that alternative is indefinitely stuck command -- it worth trying. Notes: svn path=/stable/10/; revision=284800
* MFC r274675 (by jhb), r274708:Alexander Motin2015-06-252-10/+14
| | | | | | | Convert the refire_notify_ack timer from timeout(9) to callout(9). Notes: svn path=/stable/10/; revision=284799
* Fix r284612: As pointed out by jhb, in stable branches, if_baudrateAndrew Gallatin2015-06-231-1/+1
| | | | | | | | | | | is 32b on 32b platforms. So rather than a simple MFC of r284612, we need to use if_initbaudrate() to properly express a 40Gb speed. Spotted by: jhb Sponsored by: Netflix Notes: svn path=/stable/10/; revision=284742
* MFC r284612: Fix a typoAndrew Gallatin2015-06-221-1/+1
| | | | | | | Sponsored by: Netflix Notes: svn path=/stable/10/; revision=284706
* MFC: r283679Andrew Rybchenko2015-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | sfxge: do not use DEBUG_FLAGS to enable extra debug checks DEBUG_FLAGS are set to DEBUG option value when kernel is built. For example, it is -g in GENERIC config to have debug symbols. Also DEBUG_FLAGS are used to determine if ctfconvert should keep debug symbols. Since we redefined DEBUG_FLAGS, debug symbols were always missing. ctfconvert complains about it during kernel build. It is incorrect to append DEBUG_FLAGS, since if DEBUG has no -g (or similar), we'll have no debug symbols and ctfconvert will complain. If it incorrect to always have -g in our DEBUG_FLAGS, since debug symbols presence should be controllable by kernel config. So, just add disabled by default addition of -DDEBUG=1 to CFLAGS. Reviewed by: imp Sponsored by: Solarflare Communications, Inc. Notes: svn path=/stable/10/; revision=284556
* MFC: r283514Andrew Rybchenko2015-06-1869-6349/+32658
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | sfxge: add 7xxx NICs family support Support 7xxx adapters including firmware-assisted TSO and VLAN tagging: - Solarflare Flareon Ultra 7000 series 10/40G adapters: - Solarflare SFN7042Q QSFP+ Server Adapter - Solarflare SFN7142Q QSFP+ Server Adapter - Solarflare Flareon Ultra 7000 series 10G adapters: - Solarflare SFN7022F SFP+ Server Adapter - Solarflare SFN7122F SFP+ Server Adapter - Solarflare SFN7322F Precision Time Synchronization Server Adapter - Solarflare Flareon 7000 series 10G adapters: - Solarflare SFN7002F SFP+ Server Adapter Support utilities to configure adapters and update firmware. The work is done by Solarflare developers (Andy Moreton, Andrew Lee and many others), Artem V. Andreev <Artem.Andreev at oktetlabs.ru> and me. Sponsored by: Solarflare Communications, Inc. Notes: svn path=/stable/10/; revision=284555
* sfxge: use if_initbaudrate() to set interface baudrateAndrew Rybchenko2015-06-181-3/+3
| | | | | | | | | | | | It is required to cope with u_long limit for 10 Gbps in a right way. It is a direct commit to stable/10 since head differs (head does not have if_initbaudrate(), if_baudrate is simply uint64_t). Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2849 Notes: svn path=/stable/10/; revision=284554
* MFC r284179, r283959Sean Bruno2015-06-174-193/+478
| | | | | | | | | | | | | | | Implement multiqueue (max 2 tx/rx queues) for the 82574L chipset. Change default tuning parameters to handle this new configuration if EM_MULTIQUEUE is set in the kernel configuration. Off by default. See r283959 changelog for the scope of these changes. Relnotes: Yes Sponsored by: Limelight Networks Notes: svn path=/stable/10/; revision=284522
* MFC r284012:Hans Petter Selasky2015-06-171-0/+7
| | | | | | | | | | | Disable VGA PCI interrupts until a chipset driver is loaded for VGA PCI devices. Else unhandled display adapter interrupts might freeze the CPU or consume a lot of CPU. PR: 156596 Notes: svn path=/stable/10/; revision=284503
* MFC r284011:Hans Petter Selasky2015-06-171-1/+2
| | | | | | | Don't wait forever for USB data to be flushed. Notes: svn path=/stable/10/; revision=284500