summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add documentation for the WITHOUT_KDUMP switch.zeising2012-09-191-0/+5
| | | | | | This swtich was introduced in r240404 Approved by: joel (mentor)
* Do not install pf related man pages if WITHOUT_PF is set.zeising2012-09-192-5/+16
| | | | | | PR: bin/171767 Submitted by: zeising Approved by: joel (mentor), glebius
* Do not reference z_nodeflib for !objgiven case, thus fixing LD_PRELOADkib2012-09-191-4/+4
| | | | | | | for a non-absolute path. PR: bin/171604 MFC after: 3 days
* Move major includes into /usr/share/bsdconfig for easy external access.dteske2012-09-1885-381/+455
| | | | | Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
* Add entries for two USB devices I have locally.gavin2012-09-181-0/+5
| | | | MFC after: 1 week
* if a file in plist starts with / then do not prefix it with "prefix" [1]bapt2012-09-188-30/+67
| | | | | | | | | | | | | | | | | | | | | | | | pkg info -g returns 1 if a file mismatch [2] flush stdout in pkg info -g [3] clean up quiet mode (-q | --quiet) output of pkg_version(1) [4] fix missing error call in uname check added to pkg_version(1) [5] fix pkg_add(1) fails to install with -C from bad path [6] only resolve path from pkg_add(1) -p if the given prefix do not start with a '/' [7] PR: bin/13128 [1] bin/139015 [2] bin/113702 [3] bin/142570 [4] bin/146857 [5] bin/157543 [6] Submitted by: cy [1] Anton Yuzhaninov <citrin@citrin.ru> [2] Ighighi <ighighi@gmail.com> [3] "N.J. Mann" <njm@njm.me.uk> [4] gcooper [5] David Naylor <naylor.b.david@gmail.com> [6] netchild [7] MFC after: 2 weeks
* Align the PCI Express #defines with the style used for the PCI-Xgavin2012-09-1816-267/+267
| | | | | | | | | | | | | | | | | #defines. This also has the advantage that it makes the names more compact, iand also allows us to correct the non-uniform naming of the PCIM_LINK_* defines, making them all consistent amongst themselves. This is a mostly mechanical rename: s/PCIR_EXPRESS_/PCIER_/g s/PCIM_EXP_/PCIEM_/g s/PCIM_LINK_/PCIEM_LINK_/g When this is MFC'd, #defines will be added for the old names to assist out-of-tree drivers. Discussed with: jhb MFC after: 1 week
* Oops - take a copy of ath_tx_status from the buffer before the TX processingadrian2012-09-181-10/+19
| | | | | | | | | | | | | | | is done. The aggregate path was definitely accessing 'ts' before it was actually being assigned. This had the side effect of over-filtering frames, since occasionally that bit would be '1'. Whilst here, do the same thing in the non-aggregate completion function - as calling the filter function may also invalidate bf. Pointy hat to: adrian, for not noticing this over many, many code reviews.
* If caller specifies UMA_ZONE_OFFPAGE explicitly, then do not waste memoryglebius2012-09-181-1/+3
| | | | | | in an allocation for a slab. Reviewed by: jeff
* Add #if 0 around nvme_async_event_cb() until NVMe AER functionalityjimharris2012-09-181-0/+6
| | | | | | can be tested. This fixes a build warning found only with clang.
* Add __aligned(4) to NVMe defined data structures.jimharris2012-09-181-3/+3
| | | | | | | | This fixes issue in nvmecontrol(8), where clang throws a cast-align warning when casting a __packed structure pointer to a uint32_t pointer as part of printing raw hex output. Reported by: dhw
* Fix grammar in the portion about FIBs. Also, cross-referencebjk2012-09-181-9/+11
| | | | | | | setfib(2) instead of setfib(1) for the 16-FIB limit. PR: docs/157452 Approved by: hrs (mentor)
* Fix panics on attempt to dereference uninitizlized pointer, returned viamav2012-09-181-1/+1
| | | | | | | 'path' argument of ofw_parsedev() if devspec refers raw device with no path. For example, `ls /pci@1f,0/ide@d/disk@0,0:a/` works fine, while `ls /pci@1f,0/ide@d/disk@0,0:a` panicked before this change.
* hwpmc amd_pcpu_fini: fix a bug in code locked under DEBUGavg2012-09-181-1/+1
| | | | MFC after: 16 days
* - Bump date.zont2012-09-181-1/+1
| | | | | | Submitted by: pluknet Approved by: kib (mentor) X-MFC-With: r240645
* Do more than r236298 did in the projects/pf branch: use M_NOWAIT inglebius2012-09-183-19/+11
| | | | | | | | | | | | | altq_add() and its descendants. Currently altq(4) in FreeBSD is configured via pf(4) ioctls, which can't configure altq(4) w/o holding locks. Fortunately, altq(4) code in spife of using M_WAITOK is ready to receive NULL from malloc(9), so change is mostly mechanical. While here, utilize M_ZERO instead of bzero(). A large redesign needed to achieve M_WAITOK usage when configuring altq(4). Or an alternative (not pf(4)) configuration interface should be implemented. Reported by: pluknet
* - Add 'dsiz' and 'ssiz' keywords to show data and stack size respectively.zont2012-09-182-0/+6
| | | | | Approved by: kib (mentor) MFC after: 1 week
* Fix build, pass the pointy hat please.glebius2012-09-181-1/+1
|
* Provide kernel compile time option to make pf(4) default rule to drop.glebius2012-09-184-1/+19
| | | | | | | | This is important to secure a small timeframe at boot time, when network is already configured, but pf(4) is not yet. PR: kern/171622 Submitted by: Olivier Cochard-LabbИ <olivier cochard.me>
* Make ruleset anchors in pf(4) reentrant. We've got two problems here:glebius2012-09-183-58/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Ruleset parser uses a global variable for anchor stack. 2) When processing a wildcard anchor, matching anchors are marked. To fix the first one: o Allocate anchor processing stack on stack. To make this allocation as small as possible, following measures taken: - Maximum stack size reduced from 64 to 32. - The struct pf_anchor_stackframe trimmed by one pointer - parent. We can always obtain the parent via the rule pointer. - When pf_test_rule() calls pf_get_translation(), the former lends its stack to the latter, to avoid recursive allocation 32 entries. The second one appeared more tricky. The code, that marks anchors was added in OpenBSD rev. 1.516 of pf.c. According to commit log, the idea is to enable the "quick" keyword on an anchor rule. The feature isn't documented anywhere. The most obscure part of the 1.516 was that code examines the "match" mark on a just processed child, which couldn't be put here by current frame. Since this wasn't documented even in the commit message and functionality of this is not clear to me, I decided to drop this examination for now. The rest of 1.516 is redone in a thread safe manner - the mark isn't put on the anchor itself, but on current stack frame. To avoid growing stack frame, we utilize LSB from the rule pointer, relying on kernel malloc(9) returning pointer aligned addresses. Discussed with: dhartmei
* - Add $FreeBSD$ to allow modifications to this file.glebius2012-09-181-2/+2
| | | | - Move $OpenBSD$ to a more standard place.
* Implement my first cut at filtered frames in aggregation sessions.adrian2012-09-183-77/+510
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hardware can optionally "filter" frames if successive transmissions to a given node (ie, "entry in the keycache") fail. That way the hardware can implement a kind of early abort of all the other frames queued to that destination, rather than simply trying to TX each frame to that destination (and failing.) The background: * If a frame comes back as being filtered, the hardware didn't try to TX it (or it was outside the TX burst opportunity.) So, take it as a hint that some (but not all, see below) frames to the destination may be filtered. * If the CLRDMASK bit is set in a TX descriptor, the "filter to this destination" bit in the keycache entry is cleared and TX to that host will be unconditionally retried. * Right now everything has the CLRDMASK bit set, so filtered frames tend to be aggregates and frames that fall outside of the WME burst window. It was a bit worse in the past as I had messed up the TX flags and CLRDMASK wasn't being set on aggregate frames. The annoying bits: * It's easy (ish) to do for aggregate session frames - firstly, they can be retried in any order as long as they're within the BAW, and there's already a bunch of infrastructure tracking how many frames the TID has queued to the hardware (tid->hwq_depth.) However, for frames that bypassed the software queue, hwq_depth doesn't get incremented. I'll fix that in a subsequent commit. * For non-aggregate session frames, the only retries that can occur are ones for sequence numbers that hvaen't successfully been TXed yet. Since there's no re-ordering going on in non-aggregate sessions, if any subsequent seqno frames make it out, any filtered frames before that seqno need to be dropped. Hence why this initially is just for aggregate session frames. * Since there may be intermediary frames to the destination that have CLRDMASK set - for example, any directly dispatched management frames to that destination - it's possible that there will be some filtered frames followed up by some non filtered frames. Thus, it can't be assumed that once you see a filtered frame for the given destination node, all subsequent frames for all TIDs will be filtered. Ok, with that in mind: * Create a per-TID filtered frame queue for frames that the hardware returns as filtered. * Track filtered frames per-tid, rather than per-node. It just makes the locking much easier. * When a filtered frame appears in the completion function, the node transitions to "filtered", and all subsequent completed error frames (filtered or otherwise) are put on the filtered frame queue. The TID is paused once (during the transition from non-filtered to filtered). * If a filtered frame retry count exceeds SWMAX_RETRIES, a BAR should be sent. * Once all the frames queued to the hardware for the given filtered frame TID, transition back from filtered frame to non-filtered frame, which means pre-pending all the filtered frames onto the head of the software queue, clearing the filtered frame state and unpausing the TID. Things get quite hairy around handling completion (aggr, non-aggr, norm, direct-dispatched frames to a hardware queue); whether it's an "error", "cleanup" or "BAR" state as well as filtered, which order to do things in (eg do filtered BEFORE checking for BAR, as the filter completion may be needed to actually transmit a BAR frame.) This work has definitely reminded me that I have to tidy up all the locking and remove some of the ridiculous lock/unlock/lock/unlock going on in the completion functions. It's also reminded me that I should really split out TID versus hardware TXQ locking, even if the underlying locking is still the destination hardware TXQ. Finally, this is all pre-requisite for working on AP mode power save support (PS-POLL, uAPSD) as well as improving performance to misbehaving nodes (as they can transition into filter mode, stopping any TX until everything has caught up.) Finally (ish) - this should also be done for non-aggregate sessions as there are still plenty of laptops and mobile devices that don't speak 802.11n but do wish for stable, useful power save AP support where packets aren't simply dropped. This requires software retransmission for non-aggregate sessions to be implemented, which includes the caveats I've mentioned above. Finally finally - this doesn't yet do anything about the CLRDMASK bit in the TX descriptor. That's still unconditionally set to 1. I'll debug the current work (mostly ensuring I haven't busted up the hairy transitions between BAR, filtered, error (all frames in an aggregate failing) and cleanup (when transitioning from aggregation -> non-aggregation.)) Finally finally finally - this is all original work by yours truely, rather than ported from the Atheros internal driver codebase or Linux ath9k. Tested: * AR9280, AR5416 in STA mode * AR9280, AR9130 in hostap mode * Lots and lots of iperf testing in very marginal and non-marginal conditions, complete with inducing filtered frames + BAR TX conditions.
* Fix DIOCNATLOOK: zero key padding before performing lookup.glebius2012-09-181-0/+1
|
* loader/i386: replace ugly inb/outb re-implementations with cpufunc.havg2012-09-181-18/+4
| | | | | | | | Use of __builtin_constant_p in a function that is only called via a pointer is a good example of how out-of-date it was. Suggested by: bde MFC after: 1 week
* acpi_cpu: explicitly notify userland about c-state changesavg2012-09-181-0/+2
| | | | | | | | ... after they are committed. A notification is sent per CPU. Reviewed by: imp MFC after: 3 weeks
* mdoc: remove superfluous paragraph macro.joel2012-09-181-1/+0
|
* zfs: correctly calculate dn_bonuslen for saving SAs to diskavg2012-09-181-1/+4
| | | | | | | | | | | Since all attribute values start at 8-byte aligned boundary, we would previously incorrectly calculate dn_bonuslen if any attribute but the last had a variable-length value with length not multiple of 8. Reported by: Nicolas Rachinsky <fbsd-mas-0@ml.turing-complete.org> Tested by: Nicolas Rachinsky <fbsd-mas-0@ml.turing-complete.org> Reviewed by: Matthew Ahrens <mahrens@delphix.com> (for upstream) MFC after: 2 weeks
* zfs: allow both DEBUG and ZFS_DEBUG to be defined on command lineavg2012-09-181-0/+2
| | | | | Discussed with: pjd MFC after: 10 days
* Add missing breakkevlo2012-09-181-0/+1
|
* g_disk_flushcache definitely should not be traced under G_T_TOPOLOGYavg2012-09-181-1/+1
| | | | | | ... use G_T_BIO instead MFC after: 1 week
* Whitespace cleanup for ipfw.8 -- start each sentence on a new line,bjk2012-09-181-33/+58
| | | | | | | and put a comma after e.g. and i.e.. While here, wrap long lines. PR: docs/157452 Approved by: hrs (mentor)
* Remove bogus break statements.kevlo2012-09-182-2/+0
| | | | Obtained from: DragonFly
* Add a couple of accessor inline functions for state that exists in net80211.adrian2012-09-181-0/+31
| | | | Obtained from: Qualcomm Atheros
* Remove namespace pollution in _rmlock.h by defining rm_queue structureattilio2012-09-182-23/+10
| | | | | | | | | | | | | | directly in _rmlock.h and then including it (and its dependencies) in pcpu.h. This leads to few _*.h headers to be included in pcpu.h but this is not considered a big deal. Really pc_rm_queue should be implemented as a dynamic member with DPCPU interface, but we really want to keep the read acquisition as fast as possible, so even the further pc_dynamic indirection should be avoided, and the pollution is dealt like this. Discussed with: jhb MFC after: 1 week
* Rename AH_MIMO_MAX_CHAINS to AH_MAX_CHAINS, for compatibility withadrian2012-09-173-8/+8
| | | | internal atheros HAL code.
* yes(1) actually comes from V7.obrien2012-09-171-1/+1
| | | | Submitted by: Simon Gerraty <sjg@juniper.net>
* Integrate nvmecontrol(8) into the amd64 and i386 builds.jimharris2012-09-174-2/+6
| | | | | | This includes adding NVMe header files to /usr/include/dev/nvme. Sponsored by: Intel
* Add nvmecontrol(8) source code and beginnings of a man page to the tree.jimharris2012-09-173-0/+693
| | | | | Sponsored by: Intel Contributions from: Joe Golio/EMC <joseph dot golio at emc dot com>
* Add nvme(4) and nvd(4) Makefiles to the tree.jimharris2012-09-172-0/+29
| | | | | Noticed by: pluknet Pointy-hat to: jimharris
* Integrate nvme(4) and nvd(4) into the amd64 and i386 builds.jimharris2012-09-175-0/+36
| | | | Sponsored by: Intel
* This is the first of several commits which will add NVM Express (NVMe)jimharris2012-09-1712-0/+4510
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support to FreeBSD. A full description of the overall functionality being added is below. nvmexpress.org defines NVM Express as "an optimized register interface, command set and feature set fo PCI Express (PCIe)-based Solid-State Drives (SSDs)." This commit adds nvme(4) and nvd(4) driver source code and Makefiles to the tree. Full NVMe functionality description: Add nvme(4) and nvd(4) drivers and nvmecontrol(8) for NVM Express (NVMe) device support. There will continue to be ongoing work on NVM Express support, but there is more than enough to allow for evaluation of pre-production NVM Express devices as well as soliciting feedback. Questions and feedback are welcome. nvme(4) implements NVMe hardware abstraction and is a provider of NVMe namespaces. The closest equivalent of an NVMe namespace is a SCSI LUN. nvd(4) is an NVMe consumer, surfacing NVMe namespaces as GEOM disks. nvmecontrol(8) is used for NVMe configuration and management. The following are currently supported: nvme(4) - full mandatory NVM command set support - per-CPU IO queues (enabled by default but configurable) - per-queue sysctls for statistics and full command/completion queue dumps for debugging - registration API for NVMe namespace consumers - I/O error handling (except for timeoutsee below) - compilation switches for support back to stable-7 nvd(4) - BIO_DELETE and BIO_FLUSH (if supported by controller) - proper BIO_ORDERED handling nvmecontrol(8) - devlist: list NVMe controllers and their namespaces - identify: display controller or namespace identify data in human-readable or hex format - perftest: quick and dirty performance test to measure raw performance of NVMe device without userspace/physio/GEOM overhead The following are still work in progress and will be completed over the next 3-6 months in rough priority order: - complete man pages - firmware download and activation - asynchronous error requests - command timeout error handling - controller resets - nvmecontrol(8) log page retrieval This has been primarily tested on amd64, with light testing on i386. I would be happy to provide assistance to anyone interested in porting this to other architectures, but am not currently planning to do this work myself. Big-endian and dmamap sync for command/completion queues are the main areas that would need to be addressed. The nvme(4) driver currently has references to Chatham, which is an Intel-developed prototype board which is not fully spec compliant. These references will all be removed over time. Sponsored by: Intel Contributions from: Joe Golio/EMC <joseph dot golio at emc dot com>
* Add UQ_UMS_IGNORE quirk.hselasky2012-09-174-2/+12
| | | | | | | Wrap two long lines. Some minor spelling correction. PR: usb/171721
* Implement support for USB Audio v2.0. Remove some redundanthselasky2012-09-172-548/+1445
| | | | | USB audio v1.0 debug data, hence userspace tools like lsusb exist to show this information properly.
* Add locking to mlx(4) to make it MPSAFE along with some other fixes:jhb2012-09-175-245/+299
| | | | | | | | | | | | | | | | | | | | | | | - Use callout(9) rather than timeout(9). - Add a mutex as an I/O lock that protects the adapter and is used for the I/O path. - Add an sx lock as a configuration lock that protects the relationship of configured volumes. - Freeze the request queue when a DMA load is deferred with EINPROGRESS and unfreeze the queue when the DMA callback is invoked. - Explicitly poll the hardware while waiting to submit a command to allow completed commands to free up slots in the command ring. - Remove driver-wide 'initted' variable from mlx_*_fw_handshake() routines. That state should be per-controller instead. Add it as an argument since the first caller knows when it is the first caller. - Remove explicit bus_space tag/handle and use bus_*() rather than bus_space_*(). - Move duplicated PCI device ID probing into a mlx_pci_match() routine. - Don't check for PCIM_CMD_MEMEN (the PCI bus will enable that when allocating the resource) and use pci_enable_busmaster() rather than manipulating the register directly. Tested by: no one despite multiple requests (hope it works)
* Make systat(1) accept fractional number of seconds.melifaro2012-09-1710-97/+159
| | | | | | Make old alarm(3)-based code use select(2). MFC after: 2 weeks
* - Add #defines for the bits within the iPCI Express PCIR_EXPRESS_LINK_CTLgavin2012-09-171-1/+15
| | | | | | | | register - Add missing register PCIR_EXPRESS_ROOT_CAP - Correct a spelling mistake (SLAT -> SLOT) [1] Reviewed by: jhb [1]
* Remove unused variable cd.kevlo2012-09-171-2/+0
| | | | This variable is initialized but not used.
* Add a kernel config for the Toshiba AC100. The AC100 is an ARM laptop withandrew2012-09-171-0/+96
| | | | | | | | | an NVidia Tegra 2 CPU. Tegra 2 needs an external patch to pmap for atomic operations to work. Even with this the Kernel only gets to the mount root prompt. As such Tegra support is considered experimental, however adding the kernel config will help ensure the Tegra code builds.
* In snmp_hostres, device_map table is used for consistent device tabletrociny2012-09-171-0/+6
| | | | | | | | | | | | | | | | | | | | | indexing. When a device has gone it is not removed from device_map table but just its entry_p field is set to NULL. So when traversing device_map in disk_OS_get_ATA_disks() and disk_OS_get_MD_disks() check for entry_p being NULL, otherwise the bsnmpd crash is possible when a removed map entry is dereferenced. Before the fix, for disk_OS_get_ATA_disks() the crash could be easily reproduced running: atacontrol detach ata1 The crash was not observed in disk_OS_get_MD_disks() because currently snmp_hostres does no see md(4) disks: to get the device list it uses devinfo(3), which does not return md devices. Reported by: Miroslav Lachman 000.fbsd quip.cz MFC after: 1 week
* Add the Tegra2 DTS files. Now our dtc supports including other files useandrew2012-09-172-0/+132
| | | | this support to pull out the SoC specific parts of the dts file.
OpenPOWER on IntegriCloud