aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* MFS11 320921:John Baldwin2017-07-136-0/+12
| | | | | | | | | Add deprecation notices for various device drivers removed in 12.0. Approved by: re (kib) Notes: svn path=/releng/11.1/; revision=320954
* MF11: r320898; MFC: r320577, r320620Marius Strobl2017-07-121-2/+14
| | | | | | | | | | | | Retry up to 2 ms to enable bus power as at least with some Intel SDHCI/eMMC controllers the first attempt after a D3 to D0 transition, i. e. when the firmware has put the devices into D3 state before, can fail. Approved by: re (gjb) Notes: svn path=/releng/11.1/; revision=320922
* MF11 r320731,320749,320759: Add Amazon Elastic Network Adapter driverColin Percival2017-07-074-0/+4583
| | | | | | | | | | | | and turn it on in EC2 AMI builds Approved by: re (gjb) Relnotes: FreeBSD now supports "next generation" Enhanced Networking in the Amazon EC2 cloud Sponsored by: Amazon.com Inc. (original work) Notes: svn path=/releng/11.1/; revision=320760
* MFS r320744: MFC r320690:Mark Johnston2017-07-061-1/+1
| | | | | | | | | | Defer ACPI taskqueue creation to SI_SUB_KICK_SCHEDULER. PR: 220277 Approved by: re (gjb) Notes: svn path=/releng/11.1/; revision=320746
* MFC r320175David C Somayajulu2017-06-262-0/+3
| | | | | | | | | Add pkts_cnt_oversized to stats. Approved by: re(marius) Notes: svn path=/stable/11/; revision=320370
* MFC r320259: jedec_ts: read device id from the correct registerAndriy Gapon2017-06-261-1/+1
| | | | | | | Approved by: re (marius) Notes: svn path=/stable/11/; revision=320354
* MFC 320184Sepherosa Ziehau2017-06-261-10/+21
| | | | | | | | | | | | | | | | | | | hyperv/storvsc: Reduce log verbosity On some windows hosts TEST_UNIT_READY command will return SRB_STATUS_ERROR and sense data "NOT READY asc:3a,1 (Medium not present - tray closed)", this occurs periodically, and not hurt anything else. So, we prefer to ignore this kind of errors. Approved by: re (delphij) PR: 219973 Submitted by: Hongjiang Zhang <hongzhan microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11271 Notes: svn path=/stable/11/; revision=320351
* MFC r319491:Colin Percival2017-06-221-0/+3
| | | | | | | | | | | | Skip setting the MTU in the netfront driver (xn# devices) if the new MTU is the same as the old MTU. In particular, on Amazon EC2 "T2" instances without this change, the network interface is reinitialized every 30 minutes due to the MTU being (re)set when a new DHCP lease is obtained. Approved by: re (delphij) Notes: svn path=/stable/11/; revision=320219
* MFC r319964David C Somayajulu2017-06-2076-59909/+65201
| | | | | | | | | | | Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0 Add support for pci deviceID 0x8070 for QLE41xxx product line which supports 10GbE/25GbE/40GbE Approved by: re(gjb) Notes: svn path=/stable/11/; revision=320164
* MFC r319932:Mark Johnston2017-06-201-22/+40
| | | | | | | | | Fix handling of subpage BIO_WRITE and BIO_DELETE requests on swap MDs. Approved by: re (gjb) Notes: svn path=/stable/11/; revision=320155
* Direct commit to stable/11 to correctly setting the EIAC and IMSSean Bruno2017-06-191-1/+1
| | | | | | | | | | | | | | registers to the same values when processing interrupts. This reverts a change made in r286831 that was not fully reverted in r311979 This resolves PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211219 PR: 211219 Submitted by: Franco Fitchner <franco@opnsense.org> Approved by: re (marius) Notes: svn path=/stable/11/; revision=320102
* MFC r318867: fix vmxnet3 crash when LRO is enabledAndriy Gapon2017-06-191-0/+14
| | | | | | | | | | | | | | | | | The crash can occur when all of the following conditions are true: - a packet consists of multiple segments (requires LRO enabled) - there has been a failure to allocate an mbuf for the packet and the packet has to be dropped - a host (vmware) still owned at least one segment of the packet, so the driver had to wait for another interrupt to proceed to discarding the remaining segment(s) Reviewed by: rstone Approved by: re (gjb) Sponsored by: Panzura Notes: svn path=/stable/11/; revision=320099
* MFC: 319690Dexuan Cui2017-06-141-0/+2
| | | | | | | | | | | | | | | | | | | Approved by: re (marius) r319690 hyperv/pcib: use the device serial number as PCI domain Currently the PCI domain is initialized with the instance GUID in vmbus_pcib_attach(). It turns out the GUID can change across VM reboot, while some users want a persistent value for PCI domain. The solution is that we can change to use the device serial number, which starts with 1 and is unique within a VM. Obtained from: Haiyang Zhang Sponsored by: Microsoft Notes: svn path=/stable/11/; revision=319943
* MFC r317806:Gleb Smirnoff2017-06-081-1/+2
| | | | | | | | | | | | | | | | | | The nandsim(4) simulator driver doesn't have any protection against races at least in its ioctl handler, and at the same time it creates device entry with 0666 permissions. To plug possible issues in it: - Mark it as needing Giant. - Switch device mode to 0600. Submitted by: C Turt Reviewed by: imp Security: Possible double free in ioctl handler Approved by: re (marius) Notes: svn path=/stable/11/; revision=319727
* MFC r318677:Gleb Smirnoff2017-06-082-36/+46
| | | | | | | | | | | | Fix regression in ndis(4) after r286410. This adds a bunch of checks for whether this is a Ethernet or 802.11 device and does proper dereferencing. PR: 213237 Submitted by: <ota j.email.ne.jp> Approved by: re (marius) Notes: svn path=/stable/11/; revision=319726
* MFC r318974: uart: add AMT SOL PCI IDEd Maste2017-06-031-0/+1
| | | | | | | | | | I adjusted the description to be similar to existing AMT entries. PR: 219384 Approved by: re (gjb) Notes: svn path=/stable/11/; revision=319512
* MFC r318676David C Somayajulu2017-06-011-1/+2
| | | | | | | | | Check for IPV6 TCP/UDP CSUM offload in pkt header during transmits. Submitted by:Shminderjit.Singh@cavium.com Notes: svn path=/stable/11/; revision=319449
* MFC r318895: Fix several problems with mapping code in mps(4).Stephen McConnell2017-06-0112-873/+1731
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r318896: Fix several problems with mapping code in mpr(4). -Add several comments describing what the mapping code is doing. -Added a callout timer to improve check for missing devices when discovery has completed so that missing counts are incremented correctly. -Fix problems with missing counts not being saved to the HBA. -Update man pages mps(4) and mpr(4) to include a description of the use use_phy_num sysctl variable. -Remove channel field in the mapping structure because it's not used. -Improve logging by using mps_dprint or mpr_dprint instead of printf and adding more logging where appropriate. -Add check for a bad index before writing mapping entries to controller. -The high missing count check in the mapping table was using the incorrect initial value, which could lead to a bad result. -The usage of the IN_USE flag for volume mapping was changed to be more intuitive, and was not being used correctly. -The check for a free DPM entry was changed, as this was completely wrong. -Updates to the missing count for volumes were not being done correctly, so this function was completely rewritten. -_mapping_add_to_removal_table() was overly complicated and incorrectly used, so this function was rewritten. -Missing counts for all devices were not being incremented properly, so this functionality was added. -The search for space in the mapping table for missing enclosures was not calculating the found space correctly due to not breaking out of a loop when required, and the num_found variable was not being reset when needed. -Retries when a device fails to get added due to a full mapping table were removed because this is unneccessary. -mps_mapping_is_reinit_required() and mpr_mapping_is_reinit_required() were removed because they were not being used. -Some functions were renamed to avoid confusion between Target IDs and SAS IDs. -_mapping_check_update_ir_mt_idx() was removed because it was overly complicating volume mapping. -The setting of the maxtargets variable was changed to include max volumes. -The setting of the initiator_id variable was changed to be the invalid target ID after all targets, including volumes. Previously, this was set to the last valid target ID. -Don't exclude target IDs of RAID components or check for a reuse of a target ID for RAID components. -Some endienness was added. Approved by: ken, mav Notes: svn path=/stable/11/; revision=319446
* MFC r308217, r308301, r311958, r312437, r318188, r318427, r318679Stephen McConnell2017-06-0126-393/+3860
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r308217: Add a fallback to the device mapper logic. We've seen systems in the field that are apparently misconfigured by the manufacturer and cause the mapping logic to fail. The fallback allows drive numbers to be assigned based on the PHY number that they're attached to. Add sysctls and tunables to overrid this new behavior, but they should be considered only necessary for debugging. Reviewed by: imp, smh Obtained from: Netflix MFC after: 3 days Sponsored by: D8403 r308301: Record the LogInfo field when reporting the IOCStatus. Helps in debugging errors. Submitted by: slm Obtained from: Netflix MFC after: 3 days r311958: Print out the number of queues/MSIx vectors. Sponsored by: Netflix r312437: Rework the debug print API. Event printing no longer gets special handling. All of the printing from the tables file now has wrappers so that the handling is cleaner and it's possible to print something out (say, during development) without having to fight the global debug flags. This re-org will also make it easier to have the tables be compiled out at build time if desired. Other than fixing some minor bugs, there are no user-visible changes from this change Sponsored by: Netflix, Inc. Differential Revision: D9238 r318188: Improve error messages during command timeout for the mpr and mps drivers. Sponsored by: Netflix r318427: Add tri-mode support (SAS/SATA/PCIe). This includes NVMe device support and adds support for the following adapters: SAS 3408 SAS 3416 SAS 3508 SAS 3516 SAS 3616 SAS 3708 SAS 3716 Reviewed by: ken, scottl, asomers, mav Approved by: ken, scottl, mav MFC after: 2 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D10095 r318679: Fix powerpc compiler error. Approved by: ken Notes: svn path=/stable/11/; revision=319435
* MFC r318774:Navdeep Parhar2017-05-311-5/+3
| | | | | | | | | | cxgbe/iw_cxgbe: sodisconnect failures are harmless and should not be treated as fatal errors. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=319271
* MFC r318762:Navdeep Parhar2017-05-3110-29338/+32095
| | | | | | | | | | | | | | cxgbe(4): Update the T4, T5, and T6 firmwares to 1.16.45.0. The latest firmware has a number of link related fixes, support for a new custom card, and the fix for a bug that affected rate limiting on FreeBSD. Relnotes: Yes Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=319269
* MFC r317361:Andrew Turner2017-05-302-1/+8
| | | | | | | | | Call the PSCI reset from cpu_reset on arm64. When rebooting from DDB the kernel calls this directly so the event handler is not called, meaning the computer fails to reboot. Notes: svn path=/stable/11/; revision=319207
* MFC r308161:Enji Cooper2017-05-301-2/+0
| | | | | | | | | r308161 (by lwhsu): - Fix `make` in sys/modules/bhnd Notes: svn path=/stable/11/; revision=319180
* 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/11/; revision=319065
* 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/11/; revision=318978
* MFC r318523, r318631:Roger Pau Monné2017-05-261-43/+37
| | | | | | | | xen/netfront: don't drop the ring RX lock with inconsistent ring state xen/netfront: don't drop the RX lock in xn_rxeof Notes: svn path=/stable/11/; revision=318919
* MFC r318520:Roger Pau Monné2017-05-261-4/+7
| | | | | | | xen/blkfront: correctly detach a disk with active users Notes: svn path=/stable/11/; revision=318918
* MFC r318014, r318091, r318125, and r318263.Navdeep Parhar2017-05-253-9/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | r318014: cxgbe(4): Fixes related to the knob that controls link autonegotiation. - Do not leak the adapter lock in sysctl_autoneg. - Accept only 0 or 1 as valid settings for autonegotiation. - A fixed speed must be requested by the driver when autonegotiation is disabled otherwise the firmware will reject the l1cfg command. Use the top speed supported by the port for now. r318091: cxgbe(4): Do not assume that if_qflush is always followed by inteface-down. r318125: Adjust whitespace and fix a comment. No functional change. r318263: cxgbe(4): netmap-only interrupts for a VI do not have an associated rxq or ofld_rxq and should be ignored by vi_intr_iq. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318854
* MFC r317702, r317847, r318307Navdeep Parhar2017-05-257-294/+637
| | | | | | | | | | | | | | | | | | | | | | | | | | r317702: cxgbe(4): Support routines for Tx traffic scheduling. - Create a new file, t4_sched.c, and move all of the code related to traffic management from t4_main.c and t4_sge.c to this file. - Track both Channel Rate Limiter (ch_rl) and Class Rate Limiter (cl_rl) parameters in the PF driver. - Initialize all the cl_rl limiters with somewhat arbitrary default rates and provide routines to update them on the fly. - Provide routines to reserve and release traffic classes. r317847: cxgbe(4): The Tx scheduler initialization either works or doesn't. It doesn't need a refresh in either case. r318307: cxgbe(4): Avoid an out of bounds access when an attempt to unbind a tx queue from a traffic class fails. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318850
* MFC r318479:Mark Johnston2017-05-251-1/+1
| | | | | | | Don't bother enqueuing a page immediately before freeing it. Notes: svn path=/stable/11/; revision=318848
* MFC r318476, r318478:Mark Johnston2017-05-251-2/+2
| | | | | | | Fix up some kern_yield() usages. Notes: svn path=/stable/11/; revision=318847
* MFC r317820 and r317837.Navdeep Parhar2017-05-253-2/+42
| | | | | | | | | | | | | | | r317820: cxgbe(4): Update the list of PCIe devices claimed by the driver. At this point any board with a T6 should just work. r317837: cxgbe(4): Update the VF device ids too. This should have been part of r317820. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318843
* MFC r317041:Navdeep Parhar2017-05-252-10/+58
| | | | | | | | | | | cxgbe: Add tunables to control the number of LRO entries and the number of rx mbufs that should be presorted before LRO. There is no change in default behavior. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318842
* MFC r316971:Navdeep Parhar2017-05-253-8/+39
| | | | | | | | | | | | | | cxgbe: Add a tunable to configure the SGE time scaler, which is available starting with T6. The values in the timer holdoff registers are multiplied by the scaling factor before use. dev.<nexus>.<n>.holdoff_timers shows the final values of the timers in microseconds. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318839
* MFC r316506:Navdeep Parhar2017-05-241-9/+12
| | | | | | | cxgbe(4): Program the global RSS key once instead of once per ifnet. Notes: svn path=/stable/11/; revision=318837
* MFC r316172:Navdeep Parhar2017-05-241-1/+2
| | | | | | | | | cxgbe: Don't call t4_edc_err_read for errors not related to the EDCs. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318835
* MFC r309725:Navdeep Parhar2017-05-242-2/+6
| | | | | | | | | | cxgbe(4): netmap does not set IFCAP_NETMAP in an ifnet's if_capabilities any more (since r307394). Do it in the driver instead. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318825
* MFC r313318:Navdeep Parhar2017-05-241-46/+46
| | | | | | | | | | | | | | cxgbe(4): Allow tunables that control the number of queues to be set to '-n' to tell the driver to create _up to_ 'n' queues if enough cores are available. For example, setting hw.cxgbe.nrxq10g="-32" will result in 16 queues if the system has 16 cores, 32 if it has 32. There is no change in the default number of queues of any type. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318808
* MFC 318401Josh Paetzel2017-05-241-1/+1
| | | | | | | | | | | | | Increase the number of LUNs this hardware can support. Experimentally we know this value works, but the hardware may support an even higher value. PR: 213876 Reported by: J.Catrysse@proximedia.be Notes: svn path=/stable/11/; revision=318805
* MFC r313346:Navdeep Parhar2017-05-244-6/+9
| | | | | | | | | | | cxgbe/t4_tom: Fix CLIP entry refcounting on the passive side. Every IPv6 connection being handled by the TOE should have a reference on its CLIP entry. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318803
* MFC r311880, r314167, r316118, r316571, r316573, r316580, r316936-r316937,Navdeep Parhar2017-05-247-57/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r316940, and r317410. r311880: The iw_cxgb and iw_cxgbe drivers should not use a FreeBSD device_t where a linuxkpi style device is expected. If OFED/linuxkpi actually starts using this field then we'll have to figure out whether to create fake devices for these drivers or have linuxkpi deal with NULL device. This mismatch was first reported as part of D6585. r314167: cxgbe/iw_cxgbe: Minor changes for T6. r316118: cxgbe/iw_cxgbe: T6 has no limit on the amount of memory that can be registered in one ib_reg_phys_mr. r316571: cxgbe/iw_cxgbe: Remove bad cast that resulted in incorrect length for memory regions larger than 4GB. r316573: cxgbe/iw_cxgbe: Replace a magic constant with something more readable (and accurate). T4 and later have an extra bit for page shift so the maximum page size is 8TB (shift of 12 + 31) instead of 128MB (12 + 15). This saves space in the chip's PBL (physical buffer list) when registering very large memory regions. r316580: cxgbe/iw_cxgbe: Remove another bad cast. This should have been included in r316571. r316936: cxgbe/iw_cxgbe: hw supports 64K (not 32K) Protection Domains. r316937: cxgbe/iw_cxgbe: Report accurate page_size_cap in ib_query_device. r316940: cxgbe/iw_cxgbe: Report the actual values of various parameters as configured by the firmware. r317410: cxgbe/iw_cxgbe: Pull in some updates to c4iw_wait_for_reply from the iw_cxgb4 Linux driver. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318798
* MFC r316774:Navdeep Parhar2017-05-243-0/+19
| | | | | | | | | cxgbe: Query some more RDMA related parameters from the firmware. Sponsored by: Chelsio Communications Notes: svn path=/stable/11/; revision=318796
* MFC r312346:Luiz Otavio O Souza2017-05-241-2/+6
| | | | | | | | | | | Set the the wp_disabled flag when asked to. While here, add the missing new line. Sponsored by: Rubicon Communications, LLC (Netgate) Notes: svn path=/stable/11/; revision=318791
* MFC r311846:Navdeep Parhar2017-05-241-1/+594
| | | | | | | | cxgbe(4): Refresh t4_msg.h, mainly for definitions related to the crypto engine. Notes: svn path=/stable/11/; revision=318773
* MFC r318383David C Somayajulu2017-05-223-441/+452
| | | | | | | | | QL_DPRINT macro modfied to handle multiple args; print line#. Submitted by:Shminderjit.Singh@cavium.com Notes: svn path=/stable/11/; revision=318659
* MFC r318382David C Somayajulu2017-05-223-112/+142
| | | | | | | | | | | | | | | | | 1. Move Rx Processing to fp_taskqueue(). With this CPU utilization for processing interrupts drops to around 1% for 100G and under 1% for other speeds. 2. Use sysctls for TRACE_LRO_CNT and TRACE_TSO_PKT_LEN 3. remove unused mtx tx_lock 4. bind taskqueue kernel thread to the appropriate cpu core 5. when tx_ring is full, stop further transmits till at least 1/16th of the Tx Ring is empty. In our case 1K entries. Also if there are rx_pkts to process, put the taskqueue thread to sleep for 100ms, before enabling interrupts. 6. Use rx_pkt_threshold of 128. Notes: svn path=/stable/11/; revision=318657
* MFC efivar(8) (by imp):Konstantin Belousov2017-05-201-0/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | List of revisions merged: r307070 r307071 r307072 r307074 r307189 r307224 r307339 r307390 r307391 r309776 r314231 r314232 r314615 r314616 r314617 r314618 r314619 r314620 r314621 r314623 r314890 r314925 r314926 r314927 r314928 r315770 r315771 Discussed with: gjb (re), imp Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/11/; revision=318576
* MFC: r317171, r317173, r317560, r317561, r318326Jung-uk Kim2017-05-181-40/+31
| | | | | | | | | Always clear borders when the terminal is flushed. PR: 202288 Notes: svn path=/stable/11/; revision=318506
* MFC r317811:Vladimir Kondratyev2017-05-181-56/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix triple-finger taps reported as double-finger for Elan hw v.4 touchpads Wait for all advertised head packets after status packet have been received. This fixes rare but quite annoying issue in Elan hw v.4 touchpads support when triple-finger taps are reported as double-finger taps under several circumstances. MFC r317812: Reduce default tap_min_queue size for Elan touchpads Elan hw v.4 touchpads often sends touchpad release packet right after touchpad touch one. Most probably this happens due to PS/2 limited bandwith. Reducing of tap_min_queue size to 1 makes multifinger tap detection more reliable in this case. MFC r317813: Adjust Elantech palm width threshold to nearly match synaptics defaults MFC r317814: psm(4): reduce cursor jumping on palm detection This is done with discarding pointer movements rather then mouse packets MFC r317815: Enable palm detection on two finger touches for multitouch trackpads. MFC r317816: Report 3-rd and 4-th fingers as first finger for Elan hw v.2 and v.3 as Linux does. It should not affect gesture processing in current state as it ignores finger coords on 3-finger tap detection but it should make evdev reports looking more Linux-alike. MFC r317817: Set predefined logical touchpad sizes for several ancient Elan hw v.2 models. This change is based on Linux driver. Determine logical trace size. It used for calculation of touch sizes in surface units for MT-protocol type B evdev reports. MFC r317818: psm(4): Remove sys/libkern.h header inclusion It is already included via sys/systm.h MFC r317819: Reduce synaptics touch sensitivity Increase hw.psm.synaptics.min_pressure default value from 16 to 32 to nearly match Linux driver (30-35 hysteresis loop). This makes libinput tap detection more reliable. Notes: svn path=/stable/11/; revision=318500
* MFC: r314345, r318276Marius Strobl2017-05-181-0/+6
| | | | | | | | - Add ID for NEC uPD720202 xHCI controller. - Describe Intel Apollo Lake and Braswell USB 3.0 controllers. Notes: svn path=/stable/11/; revision=318498