aboutsummaryrefslogtreecommitdiff
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* da(4): Short-circuit unnecessary BIO_FLUSH commandsAlan Somers2017-11-201-0/+21
| | | | | | | | | | | | | | | | sys/cam/scsi/scsi_da.c Complete BIO_FLUSH commands immediately if the da(4) device hasn't been written to since the last flush. If we haven't written to the device, there is no reason to send a flush. Submitted by: gibbs Reviewed by: imp MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13106 Notes: svn path=/head/; revision=326036
* Remove a couple variables that are unused after r325790.Brooks Davis2017-11-201-2/+0
| | | | | | | Reported by: rpokala Notes: svn path=/head/; revision=326035
* Fix multiple bugs in cam_strmatchAlan Somers2017-11-201-6/+22
| | | | | | | | | | | | | | | * Wrongly matches strings that are shorter than the pattern * Fails to match negative character sets * Fails to match character sets that aren't at the end of the pattern * Fails to match character ranges Reviewed by: imp MFC after: 3 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D13173 Notes: svn path=/head/; revision=326034
* Fix off-by-one error in bit_nclear() usageStephen Hurd2017-11-201-1/+1
| | | | | | | | | | | bit_nclear() takes the bit numbers for the start and end bits, not the start and a count. This was resulting in memory corruption past the end of the bitstr_t. Sponsored by: Limelight Networks Notes: svn path=/head/; revision=326033
* msdosfs(5): Reflect READONLY attribute in file modeConrad Meyer2017-11-201-1/+3
| | | | | | | | | | | | | | | Msdosfs allows setting READONLY by clearing the owner write bit of the file mode. (While here, correct the misspelling of S_IWUSR as VWRITE. No functional change.) In msdosfs_getattr, intuitively reflect that READONLY attribute to userspace in the file mode. Reported by: Karl Denninger <karl AT denninger.net> Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=326031
* Update a comment in brelse() to match reality.Scott Long2017-11-201-3/+12
| | | | Notes: svn path=/head/; revision=326029
* Indent protection and some other oops from the prvious commits.Pedro F. Giffuni2017-11-202-2/+2
| | | | Notes: svn path=/head/; revision=326027
* cxgbe(4): Add a custom board to the device id list.Navdeep Parhar2017-11-201-0/+1
| | | | | | | | MFC after: 1 week Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326026
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-20876-35/+1790
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-20244-19/+439
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326022
* evdev: change USB scancode 0x54 from KEY_SLASH to KEY_KPSLASHVladimir Kondratyev2017-11-201-1/+1
| | | | | | | | | | | Submitted by: dumbbell Reviewed by: gonzo, wulf Approved by: gonzo (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12983 Notes: svn path=/head/; revision=326021
* Fix evdev codes for slash and asterisk numpad keys of AT-keyboardsVladimir Kondratyev2017-11-201-2/+2
| | | | | | | | | Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=326020
* evdev: Export EVDEV_SUPPORT kernel option through feature facilityVladimir Kondratyev2017-11-201-0/+3
| | | | | | | | | | Suggested by: netchild Reviewed by: gonzo Approved by: gonzo (mentor) MFC after: 1 week Notes: svn path=/head/; revision=326019
* Eliminate 1 XX_VirtToPhys() and 2 XX_PhysToVirt() calls from if_dtsec(4)Justin Hibbits2017-11-201-6/+6
| | | | | | | | | | | XX_VirtToPhys(), by way of pmap_kextract(), is an expensive operation. Profiling via dtrace during a series of iperf tests I found 16111 / 30432 stack frames were located in mmu_booke_kextract(), so eliminating this expensive call should improve performance slightly. XX_PhysToVirt() is not as expensive, but redundant calls in this context is wasteful. Notes: svn path=/head/; revision=326004
* Fix build.Konstantin Belousov2017-11-191-1/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=325995
* Remove unused header.Xin LI2017-11-191-1/+0
| | | | Notes: svn path=/head/; revision=325994
* Remove unused header.Xin LI2017-11-191-1/+0
| | | | Notes: svn path=/head/; revision=325993
* aw_nmi: add support for a31/a83t's r_intcKyle Evans2017-11-191-25/+44
| | | | | | | | | | | | | | | | | | We currently support the a83t's r_intc in a somewhat hack-ish way; our .dts describes it as nmi_intc, and uses a subset of the actual register space to make it line up with a20/a31 nmi offsets. This breaks with the recent 4.14 update describing r_intc using the full register space, so update aw_nmi to use the correct register offsets with the right compat data in a way that doesn't break our current dts with nmi_intc or upstream with r_intc described. Reviewed by: manu Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D13122 Notes: svn path=/head/; revision=325991
* ANSIfy sys/libkernEd Maste2017-11-1919-56/+21
| | | | | | | | | PR: 223641 Submitted by: ota@j.email.ne.jp MFC after: 1 week Notes: svn path=/head/; revision=325988
* dts: arm64: allwinner: Remove unused dts for pine64Emmanuel Vadot2017-11-187-1185/+0
| | | | | | | | Latest u-boot port provide the dts for pine64, remove our custom and outdated dts for this board. Notes: svn path=/head/; revision=325987
* if_awg: drain tx buffers and clear rx buffers when stoppingEmmanuel Vadot2017-11-181-0/+36
| | | | | | | | | | | Stale packets should not be transmitted when the interface comes up after being down. Count the successfully transmitted ones for statistics and drop the rest. Submitted by: Guy Yur <guyyur@gmail.com> Differential Revision: https://reviews.freebsd.org/D12539 Notes: svn path=/head/; revision=325985
* if_awg: avoid hole in the rx ring buffer when mbuf allocation failsEmmanuel Vadot2017-11-181-72/+89
| | | | | | | | | | | | Use a spare dma map when attempting to map a new mbuf on the rx path. If the mbuf allocation fails or the dma map loading for the new mbuf fails just reuse the old mbuf and increase the drop counter. Submitted by: Guy Yur <guyyur@gmail.com> Differential Revision: https://reviews.freebsd.org/D12538 Notes: svn path=/head/; revision=325984
* if_awg: rename tx functions to match other drivers and free mbuf on ↵Emmanuel Vadot2017-11-181-20/+35
| | | | | | | | | | | | | m_collapse failure - use awg_encap and awg_txeof names to match iflib and other network drivers. - handle m_collapse failure similarly by freeing the mbuf rather than reenqueuing it where it will continue to fail. Submitted by: Guy Yur <guyyur@gmail.com> Differential Revision: https://reviews.freebsd.org/D13035 Notes: svn path=/head/; revision=325983
* if_awg: don't process transmitted packets on TX_BUF_UA_INT, only on TX_INTEmmanuel Vadot2017-11-181-1/+3
| | | | | | | | | | | | | TX_BUF_UA_INT is set when there are no buffers to transmit and can happen before hw.awg.tx_interval segments have been transmitted. To reduce load, tx cleanup should be done in hw.awg.tx_interval intervals. Submitted by: Guy Yur <guyyur@gmail.com> Differential Revision: https://reviews.freebsd.org/D13034 Notes: svn path=/head/; revision=325982
* if_awg: replace multiple calls to if_setdrvflagbits with one call in awg_txintrEmmanuel Vadot2017-11-181-3/+8
| | | | | | | | | | Small optimization Submitted by: Guy Yur <guyyur@gmail.com> Differential Revision: https://reviews.freebsd.org/D13033 Notes: svn path=/head/; revision=325981
* if_awg: only increment IFCOUNTER_OPACKETS when the last segment of a frame ↵Emmanuel Vadot2017-11-181-2/+8
| | | | | | | | | | | | has been successfully transmitted A packet may be built from multiple segments, don't increase the count for each segment Submitted by: Guy Yur <guyyur@gmail.com> Differential Revision: https://reviews.freebsd.org/D13032 Notes: svn path=/head/; revision=325980
* if_awg: store mbuf and dma mapping in the last segment of a tx frame instead ↵Emmanuel Vadot2017-11-181-8/+13
| | | | | | | | | | | | | | | | | of the first According to the datasheet, TX_DESC_CTL is cleared when whole frame is transmitted or all data in the current descriptor's buffer are transmitted. When the mbuf and mapping are stored in the first segment and in a scenario where a tx completion interrupt arrives for a frame and only the start of the next frame was transmitted, at the time of interrupt processing the mbuf and mapping will be freed when processing the first segment of the next frame but the other untrasmitted segments still need to use them. Submitted by: Guy Yur <guyyur@gmail.com> Differential Revision: https://reviews.freebsd.org/D13031 Notes: svn path=/head/; revision=325979
* if_awg: mark the first tx descriptor as ready only after all the other tx ↵Emmanuel Vadot2017-11-181-41/+45
| | | | | | | | | | | | | | | | | | | | descriptors are set up In a multi segment frame, if the first tx descriptor is marked with TX_DESC_CTL but not all tx descriptors for the other segments in the frame are set up, the TX DMA may transmit an incomplete frame. To prevent this, set TX_DESC_CTL for the first tx descriptor only when done with all the other segments. Also, don't bother cleaning transmitted tx descriptors since TX_DESC_CTL is cleared for them by the hardware and they will be reprogrammed before TX_DESC_CTL is reenabled for them. Submitted by: Guy Yur <guyyur@gmail.com> Differential Revision: https://reviews.freebsd.org/D13030 Notes: svn path=/head/; revision=325978
* if_awg: only request completion interrupt on the last descriptor of a tx frameEmmanuel Vadot2017-11-181-3/+12
| | | | | | | | | | | The hardware will not issue a completion interrupt for a descriptor with TX_INT_CTL set if it doesn't also have TX_LAST_DESC set. Submitted by: Guy Yur <guyyur_gmail.com> Differential Revision: https://reviews.freebsd.org/D13029 Notes: svn path=/head/; revision=325977
* Remove duplicate static function prototype to fix compilation ofHans Petter Selasky2017-11-181-4/+0
| | | | | | | | | | | mlx5_fs_tree.c after r325638 when using GCC. Found by: kib @ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=325976
* Fix PORTS_MODULES+'make reinstallkernel' trying to run bogus 'make redeinstall'.Bryan Drewery2017-11-181-1/+1
| | | | | | | | | | | Also fix 'make installkernel' running 'make deinstall' twice. PR: 201779 MFC after: 2 weeks Sponsored by: Dell Notes: svn path=/head/; revision=325971
* dts: Allwinner: Remove our last custom DTSEmmanuel Vadot2017-11-1811-1609/+3
| | | | | | | | All Allwinner boards should use the upstream DTS so remove our remaining custom ones. Notes: svn path=/head/; revision=325969
* Update our copy of DTS from the ones from Linux 4.14Emmanuel Vadot2017-11-18582-2046/+14886
| | | | Notes: svn path=/head/; revision=325968
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-18198-2/+398
| | | | | | | | | | | | | | | | | | | | The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* locks: fix compilation issues without SMP or KDTRACE_HOOKSMateusz Guzik2017-11-172-4/+5
| | | | Notes: svn path=/head/; revision=325963
* Add comment for accidentally committed unrelated change in r325960.Andrey V. Elsukov2017-11-171-0/+4
| | | | | | | | | | | | | | | | | Do not invoke IPv4 NAT handler for non IPv4 packets. Libalias expects a packet is IPv4. And in case when it is IPv6, it just translates them as IPv4. This leads to corruption and in some cases to panics. In particular a panic can happen when value of ip6_plen modified to something that leads to IP fragmentation, but actual packet length does not match the IP length. Packets that are not IPv4 will be dropped by NAT rule. Reported by: Viktor Dukhovni <freebsd at dukhovni dot org> MFC after: 1 week Notes: svn path=/head/; revision=325962
* cxgbe(4): Add core Vdd to the sysctl MIB.Navdeep Parhar2017-11-172-1/+9
| | | | | | | Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=325961
* Unconditionally enable support for O_IPSEC opcode.Andrey V. Elsukov2017-11-172-5/+2
| | | | | | | | | | | | | IPsec support can be loaded as kernel module, thus do not depend from kernel option IPSEC and always build O_IPSEC opcode implementation as enabled. Obtained from: Yandex LLC MFC after: 1 week Sponsored by: Yandex LLC Notes: svn path=/head/; revision=325960
* Add assertion in probedone() that we're holding the device lock.Alan Somers2017-11-171-0/+1
| | | | | | | | | | Submitted by: ken Reviewed by: asomers MFC after: 3 weeks Sponsored by: Spectra Logic Corp Notes: svn path=/head/; revision=325959
* lockmgr: remove the ADAPTIVE_LOCKMGRS optionMateusz Guzik2017-11-172-190/+0
| | | | | | | | | | | The code was never enabled and is very heavy weight. A revamped adaptive spinning may show up at a later time. Discussed with: kib Notes: svn path=/head/; revision=325958
* vfs_lookup: Allow PATH_MAX-1 symlinksConrad Meyer2017-11-171-1/+1
| | | | | | | | | | | | | | Previously, symlinks in FreeBSD were artificially limited to PATH_MAX-2. Add a short test case to verify the change. Submitted by: Gaurav Gangalwar <ggangalwar AT isilon.com> Reviewed by: kib Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12589 Notes: svn path=/head/; revision=325957
* Remove build system support for lint.Warner Losh2017-11-174-19/+2
| | | | | | | Differential Revision: https://reviews.freebsd.org/D13124 Notes: svn path=/head/; revision=325954
* Add Intel Processor Trace registers for:Ruslan Bukin2017-11-171-0/+52
| | | | | | | | | | - CPUID - Table of Physical Addresses (ToPA). Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=325952
* Fix potential NULL pointer dereference of device physical pathAlan Somers2017-11-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | In scsi_dev_advinfo(), if the physical path is being stored and there is a malloc failure (malloc(9) is called with M_NOWAIT), we could wind up in a situation where the device's physpath_len is set to the length the user provided, but the physpath itself is NULL. If another context then comes in to fetch the physical path value, we would wind up trying to memcpy a NULL pointer into the caller's buffer. So, set the physpath_len to 0 when we free the physpath on entry into the store case for the physical path. Reset the length to a non-zero value only after we've successfully malloced a buffer to hold it. Submitted by: ken Reviewed by: asomers MFC after: 3 weeks Sponsored by: Spectra Logic Corp Notes: svn path=/head/; revision=325947
* Rename P_OSREL_CK_CLYGRP to P_OSREL_CK_CYLGRPScott Long2017-11-171-1/+1
| | | | Notes: svn path=/head/; revision=325934
* Actually commit the right patch for r325929Baptiste Daroussin2017-11-171-1/+1
| | | | Notes: svn path=/head/; revision=325930
* Do not remove the sources when zstd is called as zstdcatBaptiste Daroussin2017-11-171-1/+1
| | | | Notes: svn path=/head/; revision=325929
* Add jumbo frame support to dtsec(4)Justin Hibbits2017-11-171-1/+29
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=325927
* Stop special casing 32-bit AIM in memory parsingJustin Hibbits2017-11-171-17/+10
| | | | | | | | | There's no need to special case 32-bit AIM to short circuit processing. Some AIM CPUs can handle 36 bit addresses, and 64-bit CPUs can run 32-bit OSes, so this will allow us to expand for that in the future if we desire. Notes: svn path=/head/; revision=325926
* mtx: add missing parts of the diff in r325920Mateusz Guzik2017-11-171-2/+2
| | | | | | | Fixes build breakage. Notes: svn path=/head/; revision=325925