aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Reduce redundancy after release-pkg merge to head in r298107Enji Cooper2016-05-151-38/+17
| | | | | | | | | | | | | - Use BINDIR instead of FILESDIR - Default all <FILESGROUPS>MODEs to BINMODE with a single for-loop at the bottom of the Makefile - Move all of the conditionals under the relevant MK_* != no build conditional blocks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299838
* Fix .DdEnji Cooper2016-05-151-1/+1
| | | | | | | | | | Today is the 14th, not the 10th of May Reported by: igor (derp) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299834
* Fix fully canonicalized example for `myvariable.27...`Enji Cooper2016-05-151-2/+2
| | | | | | | | | | | | `6` doesn't occur in the OID; it was spurious Bump .Dd for the change MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299833
* Remove trailing whitespace in license tortEnji Cooper2016-05-151-2/+2
| | | | | | | | | MFC after: 1 week Reported by: igor Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299832
* Remove NO_WERROR and add WARNS?= 6Enji Cooper2016-05-151-1/+2
| | | | | | | | | | | This now compiles cleanly on all architectures MFC after: 1 month Tested with: clang 3.8, gcc 4.2.1, gcc 4.5, make tinderbox Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299831
* Fix -Wcast-align warningsEnji Cooper2016-05-151-5/+5
| | | | | | | | | | | | Use memcpy instead of using direct assignment of void* pointers with CMSG_DATA(..), which changes alignment MFC after: 3 weeks Reported by: clang Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299830
* Use Node Information flag names instead of hard-coding their values.Mark Johnston2016-05-151-1/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=299829
* Fix a few style issues in the ICMP sysctl descriptions.Mark Johnston2016-05-151-9/+8
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=299828
* Add sysctl descriptions for net.inet6.ip6 and net.inet6.icmp6.Mark Johnston2016-05-151-69/+92
| | | | | | | | | | | | | icmp6.redirtimeout, icmp6.nd6_maxnudhint and ip6.rr_prune are left undocumented as they appear to have no effect. Some existing sysctl descriptions were modified for consistency and style, and the ip6.tempvltime and ip6.temppltime handlers were rewritten to be a bit simpler and to avoid setting the sysctl value before validating it. MFC after: 3 weeks Notes: svn path=/head/; revision=299827
* routed(8): Misc. cleanups to squelch Coverity.Pedro F. Giffuni2016-05-152-4/+10
| | | | | | | | | | | | | | | | table.c: Copy into fixed size buffer. trace.c: Argument got dup2() cannot be negative. Copy into fixed size buffer. CID: 1006785, 1006786, 271301 Obtained from: NetBSD MFC after: 2 weeks. Notes: svn path=/head/; revision=299825
* Remove an always-false error check in the AIFADDR_IN6 handler.Mark Johnston2016-05-151-2/+1
| | | | | | | | CID: 1250792 MFC after: 1 week Notes: svn path=/head/; revision=299824
* routed(8): Dereference before null check.Pedro F. Giffuni2016-05-151-1/+1
| | | | | | | | | CID: 272432 Obtained from: NetBSD (CVS ref. 1.16) MFC after: 2 weeks. Notes: svn path=/head/; revision=299822
* routed(8): Avoid NULL de-reference and two possible memory leaks.Pedro F. Giffuni2016-05-151-3/+9
| | | | | | | | | | | | The reports and fixes are straightforward but it's nice to be able to confirm against NetBSD. CID: 271080, 272306, 272307 Obtained from: NetBSD (CVS ref. 1.21 - 1.23) MFC after: 2 weeks. Notes: svn path=/head/; revision=299821
* Use SNMPD_INPUT_FAILED instead of SNMP_CODE_FAILEDEnji Cooper2016-05-151-2/+2
| | | | | | | | | | | SNMPD_INPUT_FAILED is `enum snmpd_input_err` type (which matches the return code from the function). SNMP_CODE_FAILED is `enum snmp_code` type. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299817
* Fix fuse so that stale buffer cache data isn't read.Rick Macklem2016-05-151-0/+2
| | | | | | | | | | | | | When I/O on a file under fuse is switched from buffered to DIRECT_IO, it was possible to read stale (before a recent modification) data from the buffer cache. This patch invalidates the buffer cache for the file to fix this. PR: 194293 MFC after: 2 weeks Notes: svn path=/head/; revision=299816
* Remove NO_WERROR.clang from this MakefileEnji Cooper2016-05-151-2/+0
| | | | | | | | | | This compiles with clang without warnings MFC after: 1 month Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299815
* Replace malloc + memset(.., 0, ..) with calloc callsEnji Cooper2016-05-151-5/+2
| | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299814
* Use strdup instead of malloc + strlcpyEnji Cooper2016-05-151-4/+3
| | | | | | | | | | Fix error messages on failure for calloc/strdup MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299811
* Correct function names that failed in error messagesEnji Cooper2016-05-152-4/+4
| | | | | | | | | | It should be calloc/strdup, not malloc MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299810
* Use sizeof(..)s for the destination buffers instead of hardcoded values ↵Enji Cooper2016-05-151-5/+5
| | | | | | | | | | | | corresponding to the destination buffer sizes MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299808
* Replace QUADFMT with %ju and QUADXFMT with %jx and cast values with uintmax_tEnji Cooper2016-05-152-3/+4
| | | | | | | | | | | This will cure some -Wformat warnings MFC after: 1 week Reported by: clang, gcc Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299807
* Bump WARNS to 6Enji Cooper2016-05-151-0/+2
| | | | | | | | MFC after: 1 month Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299806
* Fix up r299769Enji Cooper2016-05-151-4/+2
| | | | | | | | | | | | | | | Similar to r299802, it was noted that using nitems on scalar pointers is invalid. Use strdup instead of malloc + strlcpy (which is what the old code was doing anyhow). MFC after: 1 week Pointyhat to: ngie Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299805
* [bwn] add the full suite of SPROM flagsAdrian Chadd2016-05-151-13/+52
| | | | | | | Obtained from: Linux b43 Notes: svn path=/head/; revision=299804
* Replace malloc + memset(.., 0, ..) with calloc callsEnji Cooper2016-05-151-5/+2
| | | | | | | | MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299803
* Fix up both r299764 and r299770Enji Cooper2016-05-151-2/+1
| | | | | | | | | | | | | | | | | nitems was wrong too, as it was being tested against a pointer instead of a buffer on the stack. Since the old code was just doing malloc, then strlcpy'ing the contents of the source buffer into the destination buffer, replace it all with a call to strdup.. Reported by: bde MFC after: 1 week X-MFC with: r299764, r299770 Supersized Duncecap to: ngie Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299802
* [bwn] handle core rev 12, we can mostly do that new.Adrian Chadd2016-05-141-0/+1
| | | | Notes: svn path=/head/; revision=299801
* [bwn] disable 11na channel setup for now, since we definitely, positivelyAdrian Chadd2016-05-141-0/+8
| | | | | | | don't do 11na yet. Notes: svn path=/head/; revision=299800
* [bwn] fill out phyctl_1 fields for N-PHY (and later, eventually.)Adrian Chadd2016-05-141-0/+86
| | | | | | | | | | | | | | | | | | | | | | N-PHY and later require a lot more plcp specific setup for the PHY to know what to transmit. I've been spoilt by the atheros, intel and realtek parts where you don't have to hand-assemble the PLCP but .. well, apparently Broadcom require a lot more work. This, and PHY-N itself, was the last major missing bit to get 11a OFDM transmit to work. Without this, CCK transmit worked but OFDM transmit would always fail (with stat.phy_err set to 0x80.) I have no idea what 0x80 is, and I went mad reading the broadcom vendor driver to try and figure it out. Tested: * BCM4312 (PHY-LP) * BCM4321 (PHY-N), 11a, 11bg. Notes: svn path=/head/; revision=299799
* [bwn] set the 5ghz transmit flag for 5ghz transmit.Adrian Chadd2016-05-141-0/+3
| | | | | | | Turns out trying to do 11a transmit without this set works poorly. Notes: svn path=/head/; revision=299798
* [bwn] disable writing slottime timing out to improve performance.Adrian Chadd2016-05-141-0/+5
| | | | | | | | this is from b43 linux, there's a comment in there which notes one nic family suffers performance degredation with this being set. Notes: svn path=/head/; revision=299797
* [bwn] make rf-kill work for PHY-N.Adrian Chadd2016-05-141-1/+5
| | | | Notes: svn path=/head/; revision=299796
* [bwn] decode the RX RSSI for PHY-N.Adrian Chadd2016-05-141-0/+7
| | | | | | | I'm still figuring this out, but it at least works somewhat. Notes: svn path=/head/; revision=299795
* [bwn] use the new enum type.Adrian Chadd2016-05-141-1/+1
| | | | Notes: svn path=/head/; revision=299794
* [bwn] debugging changes.Adrian Chadd2016-05-141-1/+10
| | | | | | | | Now that I have 5g working on PHY-N, that "changing band" message happens quite a bit. Make it a debug log, not an explicit printf. Notes: svn path=/head/; revision=299793
* [bwn] Explicitly only work for SIBA parts; add some placeholder debugging.Adrian Chadd2016-05-141-2/+33
| | | | | | | | | Set phy-full-init always to 1 for now; PHY-N supports being able to do partial init for things like fast channel changes but I'm going to ignore it all. Notes: svn path=/head/; revision=299792
* [bwn] missed commit!Adrian Chadd2016-05-141-1/+1
| | | | Notes: svn path=/head/; revision=299791
* [bwn] add new types, prepare for PHY-N; prepare for rev 5xx firmware.Adrian Chadd2016-05-142-8/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a big commit with a whole lot of little changes, all in preparation for PHY-N and rev 5xx firmware. * add in a write method that does an explicit flush * change the txpwr recalc type to return an enum, versus just an int. * add in PHY-N RX frame format bits, for decoding RX RSSI and such * add in the header space calculation for rev 5xx firmware. * add in a whole bunch of new types that the newer and 5g phy code needs. Notably, broadcom has a split 5GHz band concept - 5G-Low, 5G(-Mid) and 5G-High. I kept encountering this at my day job and wondered whether it was just some marketing thing. Nope, turns out it isn't; it's an actual PHY thing. * Add a "am I a siba bus device" method, that returns true. The aim is to convert all the siba/bhnd specific bits in if_bwn over to be wrapped in this check, so when landon does a BHND drive through he knows which bits need updating. Now, this the /complete/ set of changes for rev 5xx firmware. Notably, the TX descriptor handling isn't at all done yet and the format has changed. So don' try blindly flipping this on just yet! Notes: svn path=/head/; revision=299790
* Add pmic (AXP813) child node to r_rsb for Sinovoip BananaPi BPI-M3.Jared McNeill2016-05-141-0/+11
| | | | Notes: svn path=/head/; revision=299789
* Eliminate pvh_global_lock from the amd64 pmap.Konstantin Belousov2016-05-143-124/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only current purpose of the pvh lock was explained there On Wed, Jan 09, 2013 at 11:46:13PM -0600, Alan Cox wrote: > Let me lay out one example for you in detail. Suppose that we have > three processors and two of these processors are actively using the same > pmap. Now, one of the two processors sharing the pmap performs a > pmap_remove(). Suppose that one of the removed mappings is to a > physical page P. Moreover, suppose that the other processor sharing > that pmap has this mapping cached with write access in its TLB. Here's > where the trouble might begin. As you might expect, the processor > performing the pmap_remove() will acquire the fine-grained lock on the > PV list for page P before destroying the mapping to page P. Moreover, > this processor will ensure that the vm_page's dirty field is updated > before releasing that PV list lock. However, the TLB shootdown for this > mapping may not be initiated until after the PV list lock is released. > The processor performing the pmap_remove() is not problematic, because > the code being executed by that processor won't presume that the mapping > is destroyed until the TLB shootdown has completed and pmap_remove() has > returned. However, the other processor sharing the pmap could be > problematic. Specifically, suppose that the third processor is > executing the page daemon and concurrently trying to reclaim page P. > This processor performs a pmap_remove_all() on page P in preparation for > reclaiming the page. At this instant, the PV list for page P may > already be empty but our second processor still has a stale TLB entry > mapping page P. So, changes might still occur to the page after the > page daemon believes that all mappings have been destroyed. (If the PV > entry had still existed, then the pmap lock would have ensured that the > TLB shootdown completed before the pmap_remove_all() finished.) Note, > however, the page daemon will know that the page is dirty. It can't > possibly mistake a dirty page for a clean one. However, without the > current pvh global locking, I don't think anything is stopping the page > daemon from starting the laundering process before the TLB shootdown has > completed. > > I believe that a similar example could be constructed with a clean page > P' and a stale read-only TLB entry. In this case, the page P' could be > "cached" in the cache/free queues and recycled before the stale TLB > entry is flushed. TLBs for addresses with updated PTEs are always flushed before pmap lock is unlocked. On the other hand, amd64 pmap code does not always flushes TLBs before PV list locks are unlocked, if previously PTEs were cleared and PV entries removed. To handle the situations where a thread might notice empty PV list but third thread still having access to the page due to TLB invalidation not finished yet, introduce delayed invalidation. Comparing with the pvh_global_lock, DI does not block entered thread when pmap_remove_all() or pmap_remove_write() (callers of pmap_delayed_invl_wait()) are executed in parallel. But _invl_wait() callers are blocked until all previously noted DI blocks are leaved, thus ensuring that neccessary TLB invalidations were performed before returning from pmap_remove_all() or pmap_remove_write(). See comments for detailed description of the mechanism, and also for the explanations why several pmap methods, most important pmap_enter(), do not need DI protection. Reviewed by: alc, jhb (turnstile KPI usage) Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D5747 Notes: svn path=/head/; revision=299788
* Add and enable Allwinner RSB and AXP81x power management IC drivers.Jared McNeill2016-05-142-0/+4
| | | | Notes: svn path=/head/; revision=299787
* Add a basic driver for X-Powers AXP813 and AXP818 power management ICs.Jared McNeill2016-05-141-0/+180
| | | | | | | | This driver simply installs a shutdown event handler for handling RB_POWEROFF at shutdown. Tested on a Sinovoip BananaPi BPI-M3. Notes: svn path=/head/; revision=299786
* [bwn] add an implementation of "cordic" and imaginary math.Adrian Chadd2016-05-141-0/+96
| | | | | | | | | This is used by the PHY-N code. Obtained from: http://bcm-v4.sipsolutions.net/802.11/PHY/Cordic Notes: svn path=/head/; revision=299785
* Avoid NULL de-references.Pedro F. Giffuni2016-05-141-2/+2
| | | | | | | | | CID: 271079 Obtained from: NetBSD MFC after: 2 weeks. Notes: svn path=/head/; revision=299784
* Convert tok from enum tok to int32_t in function callsEnji Cooper2016-05-141-10/+9
| | | | | | | | | | | | get_token(..) returns int32_t, not enum tok, and in many cases tests for items not in enum tok (e.g. '('). Make the typing consistent with get_token, which includes a domino effect of changing enum tok to int32_t. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299783
* [bwn] TX logging / completion fixesAdrian Chadd2016-05-141-4/+41
| | | | | | | | | | | | | | | * Log the per-completion status out if requested * If we get a PHY failure, the retrycnt is set to 0 and ack=0, so the logic was incorrect. So, for ack=0, ensure we don't log a retrycnt of 0 (or rate control breaks) or a negative retrycnt (or rate control also breaks.) Tested: * BCM4321 (11abgn N-PHY), BCM4312 (LP-PHY) Notes: svn path=/head/; revision=299782
* Add a driver for the Allwinner Reduced Serial Bus (RSB).Jared McNeill2016-05-141-0/+506
| | | | | | | | | | | | | The RSB controller speaks a simplified two wire protocol at speeds up to 20MHz. It is used on sun8i and sun9i family SoCs to communicate with power management ICs. RSB isn't really I2C or SMBus, but the driver exposes an iicbus interface to simplify power management IC drivers (which may need to support both RSB and I2C connectivity). Notes: svn path=/head/; revision=299781
* [bwn] add in new microcode and phy initval information.Adrian Chadd2016-05-141-13/+99
| | | | | | | | | | | This is required for PHY-N and later hardware. Tested: * BCN4321 (11abgn), PHY-N Notes: svn path=/head/; revision=299780
* Add node for A83T NMI interrupt controller.Jared McNeill2016-05-141-0/+8
| | | | Notes: svn path=/head/; revision=299779
* Use a consistent errno save/restore pattern before running strtoulEnji Cooper2016-05-141-4/+17
| | | | | | | | | | | | | | | | | | | - Save errno - Set errno to 0 - Call strtoul - Test errno (optional, but many calls to strtoul did this afterwards) Some of the code was setting errno = 0 after calling strtoul, not setting errno = 0, or setting errno to saved_errno after the call, but before the test. These all have unwanted behavioral side-effects, depending on the initial value of errno and whether or not the input to strtoul was correct or incorrect. MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299778