Commit Graph

174134 Commits

Author SHA1 Message Date
Konstantin Belousov
140dedb81c The r241025 fixed the case when a binary, executed from nullfs mount,
was still possible to open for write from the lower filesystem.  There
is a symmetric situation where the binary could already has file
descriptors opened for write, but it can be executed from the nullfs
overlay.

Handle the issue by passing one v_writecount reference to the lower
vnode if nullfs vnode has non-zero v_writecount.  Note that only one
write reference can be donated, since nullfs only keeps one use
reference on the lower vnode.  Always use the lower vnode v_writecount
for the checks.

Introduce the VOP_GET_WRITECOUNT to read v_writecount, which is
currently always bypassed to the lower vnode, and VOP_ADD_WRITECOUNT
to manipulate the v_writecount value, which manages a single bypass
reference to the lower vnode.  Caling the VOPs instead of directly
accessing v_writecount provide the fix described in the previous
paragraph.

Tested by:	pho
MFC after:	3 weeks
2012-11-02 13:56:36 +00:00
Gleb Smirnoff
cd463097e9 - Fix struct and struct fields names.
- Remove NGM_ATM_CARRIER_CHANGE, which was removed in r118175.

Submitted by:	Mamontov Roman <mr.xanto gmail.com>
2012-11-02 13:54:06 +00:00
Gleb Smirnoff
0134b5cbd7 Remove separate paragraph on ASCII messages and instead
provide this information along with messages documentation,
like this done in manual pages for other netgraph nodes.

Submitted by:	Mamontov Roman <mr.xanto gmail.com>
2012-11-02 13:51:47 +00:00
Dimitry Andric
a006bb4ba3 Fix broken macro checking in the libc++ Makefile, introduced in r241909.
This caused -std=c++0x not to be passed to the build by default.

Pointy hat to:	dim
MFC after:	3 days
2012-11-02 12:18:38 +00:00
Philip Paeps
acdff4634b MFV pciids-20121024, r242469
Update to use the latest version of the PCI IDs Repository.

MFC after:	1 week
2012-11-02 11:13:44 +00:00
Maxim Konovalov
6c5ed44028 o OpenBSD 5.2 added. 2012-11-02 07:36:16 +00:00
Gleb Smirnoff
c109de1e07 - If DRM_DEBUG_DEFAULT_ON is defined, then initialize drm_debug_flagi to
all supported debugging bits.
- If DRM_DEBUG_DEFAULT_ON isn't defined, then initialize drm_debug_flag
  to zero.

DRM_DEBUG_DEFAULT_ON is defined when module is build with -DDEBUG_DRM
or if kernel config has 'options DEBUG_DRM'.

Reviewed by:	kib
2012-11-02 05:26:33 +00:00
Adrian Chadd
6ff182d83d Drop this from 500 to 128, to save a little space on memory constrained
platforms.
2012-11-02 05:23:05 +00:00
Adrian Chadd
0fd5c74381 Free the dma map -after- it's checked, not before. Or you'll be
potentially referencing already-freed memory.
2012-11-02 05:22:32 +00:00
Andrey V. Elsukov
ffdbf9da3b Remove the recently added sysctl variable net.pfil.forward.
Instead, add protocol specific mbuf flags M_IP_NEXTHOP and
M_IP6_NEXTHOP. Use them to indicate that the mbuf's chain
contains the PACKET_TAG_IPFORWARD tag. And do a tag lookup
only when this flag is set.

Suggested by:	andre
2012-11-02 01:20:55 +00:00
Eitan Adler
806b1fa0e7 10 years too late add support for "2.88MB 3.5in Extra High Density"
floppies.

Its unlikely that anyone actually uses these or cares about these
anymore, since we support other floppy types and this change doesn't
hurt - just add it.

PR:		conf/40777
Submitted by:	Antti Kantee <pooka@cubical.fi>
Arrival-Date:	Fri Jul 19 08:50:02 PDT 2002
Approved by:	cperciva (implicit)
MFC after:	1 week
2012-11-02 00:17:30 +00:00
Jilles Tjoelker
cc32b2eda8 fopen(3): Mention that the "x" mode option is from C11.
MFC after:	1 week
2012-11-01 22:47:42 +00:00
Jim Harris
d9fad1defa Add descriptions for callout_reset_on and callout_schedule_on and
their curcpu variants.

Discussed with:	mav, davide
MFC after:	1 week
2012-11-01 21:00:13 +00:00
Hans Petter Selasky
d3e08ca9f0 Correct buffer size printout.
MFC after:	1 week
2012-11-01 20:58:55 +00:00
Hans Petter Selasky
58e8ac5c34 Increase default volume for FastTracker playback channels.
MFC after:	1 week
2012-11-01 20:43:23 +00:00
Juli Mallett
405b925e39 Don't disable PCIe just because the host is not a PCI host; the latter flag
only applies to non-PCIe systems.  If PCIe is in target mode, it will simply
and gracefully fail to attach of its own accord.
2012-11-01 20:39:39 +00:00
Hans Petter Selasky
ff4d595304 Fix sysctl free bug in last commit, which eventually leads to a panic.
Add software mixer table for FastTrack Ultra.
Only set volume controls which are valid at startup for standard
USB audio devices, so that settings like treble and bass use
the reset defaults.

MFC after:	1 week
2012-11-01 20:09:48 +00:00
Eitan Adler
aad12c28e0 The test fails with "exit 1" if /usr/games/fortune doesn't actually
exist.  Fix that.

PR:		conf/71994
Submitted by:	Mikael Eklund <rma@ludd.ltu.se>
Reviewed by:	crees
Reviewed by:	jilles
Approved by:	cperciva (implicit)
MFC after:	3 days
2012-11-01 19:38:03 +00:00
Alfred Perlstein
f6848434fe Add an option to display the current dump device via dumpon -l.
MFC after:	2 weeks
2012-11-01 18:59:19 +00:00
Joel Dahl
33bfa8dc1d Sort textdump options list.
Submitted by:	bde
2012-11-01 17:17:05 +00:00
Alfred Perlstein
956cbd114d Add whitespace between mandatory and optional kernel
config options.

Approved by:	joel
2012-11-01 17:13:04 +00:00
Alfred Perlstein
bad7e7f3dd Provide a device name in the sysctl tree for programs to query the
state of crashdump target devices.

This will be used to add a "-l" (ell) flag to dumpon(8) to list the
currently configured dumpdev.

Reviewed by:	phk
2012-11-01 17:01:05 +00:00
Hans Petter Selasky
902514f628 Export all mixer nodes into dev.pcm.X.mixer.Y sysctl nodes, hence the
PCM API doesn't support showing all the knobs. Make sure all the USB audio
mixer nodes are freed at detach. Before this patch USB audio would leak
some memory at detach. Print out buffer sizes in number of samples at attach.
Fix setting of volume controls when the number of channels is greater than two.

MFC after:	1 week
2012-11-01 16:54:26 +00:00
Hans Petter Selasky
3f5171b17f Add missing inclusion guard. 2012-11-01 16:39:01 +00:00
Alan Cox
9fc4739d2a In general, we call pmap_remove_all() before calling vm_page_cache(). So,
the call to pmap_remove_all() within vm_page_cache() is usually redundant.
This change eliminates that call to pmap_remove_all() and introduces a
call to pmap_remove_all() before vm_page_cache() in the one place where
it didn't already exist.

When iterating over a paging queue, if the object containing the current
page has a zero reference count, then the page can't have any managed
mappings.  So, a call to pmap_remove_all() is pointless.

Change a panic() call in vm_page_cache() to a KASSERT().

MFC after:	6 weeks
2012-11-01 16:20:02 +00:00
Konstantin Belousov
cd9e9d1bc2 Enable the new instructions for reading and writing bases for %fs,
%gs, when supported.  Note that WRFSBASE and WRGSBASE are not very
useful on FreeBSD right now, because a return from the kernel mode to
userspace reloads the bases specified by the sysarch(2) syscall, most
likely.

Enable the Supervisor Mode Execution Prevention (SMEP) when
supported. Since the loader(8) performs hand-off to the kernel with
the page tables which contradict the SMEP, postpone enabling the SMEP
on BSP until pmap switched for the proper kernel tables.

Debugged with the help from:	avg
Tested by:	avg, Michael Moll <kvedulv@kvedulv.de>
MFC after:	1 month
2012-11-01 15:17:43 +00:00
Konstantin Belousov
2773649d2f Provide the reading and display of the Standard Extended Features,
introduced with the IvyBridge CPUs.  Provide the definitions for new
bits in CR3 and CR4 registers.

Tested by:	avg, Michael Moll <kvedulv@kvedulv.de>
MFC after:	2 weeks
2012-11-01 15:14:37 +00:00
Olivier Houchard
9e9b17fba7 Fix build for SMP.
Submitted by:	Giovanni Trematerra <gianni at freebsd DOT org>
2012-11-01 12:26:31 +00:00
Gabor Kovesdan
e8da8c744b - Portability changes for ARM
- Allow larger sort memory on 64-bit platforms

Submitted by:	Oleg Moskalenko <oleg.moskalenko@citrix.com>
2012-11-01 11:38:34 +00:00
Jilles Tjoelker
252462b3bd fcntl(2): Fix typos in name of constant "F_DUP2FD_CLOEXEC".
MFC after:	1 week
2012-11-01 09:38:28 +00:00
Joel Dahl
e1ed9697d8 Nuke whitespace. 2012-11-01 07:53:21 +00:00
Joel Dahl
47df4db7e4 Minor mdoc fix. 2012-11-01 07:51:50 +00:00
Pyun YongHyeon
84c168f49a TCP/UDP checksum offloading feature for IP fragmented datagram was
removed in r99417.  bge(4) controllers can do TCP checksum offload
for IP fragmented datagrams but unlike ti(4), it lacks UDP checksum
offloading for IP fragmented datagrams. The problem was bge(4)
blindly requested TCP/UDP checksum for IP fragmented datagrams such
that it resulted in corrupted UDP datagrams before r99417.
Remove remaining code for TCP checksum offloading for IP fragmented
datagrams which should have been removed in r99417.
2012-11-01 06:02:27 +00:00
Pyun YongHyeon
a8eeb50c81 Remove TCP/UDP checksum offloading feature for IP fragmented
datagrams.  Traditionally upper stack fragmented packets without
computing TCP/UDP checksum and these datagrams were passed to
driver.  But there are chances that other packets slip into the
interface queue in SMP world. If this happens firmware running on
MIPS 4000 processor in the controller would see mixed packets and
it shall send out corrupted packets.
While I'm here simplify checksum offloading setup.

MFC After:	1 week
2012-11-01 05:39:21 +00:00
Alfred Perlstein
21d748a957 Small textdump enhancements.
Allow textdumps to be called explicitly from DDB.

If "dump" is called in DDB and textdumps are enabled then abort the
dump and tell the user to turn off textdumps.

Add options TEXTDUMP_PREFERRED to turn textdumps on by default.
Add options TEXTDUMP_VERBOSE to be a bit more verbose while textdumping.

Reviewed by: rwatson

MFC after:	2 weeks
2012-11-01 04:07:08 +00:00
Juli Mallett
72a4047ca7 Handle the management port on the EBT5600 and disable loopback. The XAUI
port connected to the Broadcom switch does not seem operable, but it's unclear
if that's simply due to a lack of configuration information for the switch.
The switch does not seem to present any identifying information via MDIO,
and is a BCM56512.
2012-11-01 03:45:33 +00:00
Alexander Motin
76eb28f350 Only four specific ATA PIO commands transfer several sectors per DRQ block
(interrupt).  All other ATA PIO commands transfer one sector or 512 bytes
at one time.  Hardcode these exceptions in ata(4) with ATA_CAM option.
This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`.
2012-11-01 00:09:01 +00:00
Jack F Vogel
8fce93a144 A few important fixes:
- Testing TSO6 has led me to discover that HW RSC is
    a problematic feature, it is ONLY designed to work
    with IPv4 in the first place, and if IP forwarding
    is done it can't be disabled as LRO in the stack,
    also initial testing we've done at Intel shows an
    equal performance using TSO[46] on the TX and LRO
    on RX, if you ran older code on 82599 or later hardware
    you actually could have detrimental performance for
    this reason. So I am disabling the feature by default
    and all our adapters will now use LRO instead.

  - If you have flow control off and multiple queues it
    was possible when the buffer of one queue becomes
    full that all RX movement is stalled, to eliminate
    this problem a feature bit is now set that will allow
    packets to be dropped when full rather than stall.
    Note, the default is to have flow control on, and this
    keeps this from happening.

  - Because of the recent fixes in the stack, LRO is now
    auto-disabled when problematic, so I have decided to
    enable it by default in the capabilities in the driver.

  - There are some 1G modules used by some customers, a couple
    small tweaks to properly support those in the media code.

  - A note: we have now done some testing of TSO6 and using
    LRO with IPv6 and it all works great!! Seeing line rate
    in both directions in best cases. Thanks bz for your
    excellent work!!
2012-10-31 23:50:36 +00:00
Jim Harris
633c572996 Use callout_reset_curcpu to allow the callout to be handled by the
current CPU and not always CPU 0.

This has the added benefit of reducing a huge amount of spinlock
contention on the callout_cpu spinlock for CPU 0.

Sponsored by:	Intel
2012-10-31 23:44:19 +00:00
Alexander Motin
3049555773 ASUS EeePC 1001px has strange variant of ALC269 CODEC, that mutes speaker
if unused in that configuration mixer at NID 15 is muted.  Probably CODEC
incorrectly reports its internal connections.  Hide that muter from the
driver to avoid muting and make built-in speaker work.

There are several different CODECs sharing this ID and I have not enough
information about them and the bug to implement more universal solution.

Tested by:	Big Yuuta <init.py@gmail.com>
MFC after:	2 weeks
2012-10-31 22:11:51 +00:00
Adrian Chadd
aff98f17c6 Since the PLL changes aren't in here yet for the AR9130 half/quarter
rate support, disable it.
2012-10-31 21:14:25 +00:00
Adrian Chadd
b0245b90ba Oops - this was incorrectly removed in a previous commit. 2012-10-31 21:06:55 +00:00
Adrian Chadd
9bb63aa8ff Oops - missing from the last commit - add ANI immunity levels for AR9160.
Obtained from:	Qualcomm Atheros
2012-10-31 21:04:23 +00:00
Adrian Chadd
adadb6074d HAL updates!
* Add some more ANI spur immunity levels.
* For AR5111 radios attached to an AR5212, limit the 5GHz channels
  that are available. A later revision of the AR5111 supports the 4.9GHz
  PSB channels but right now there's no check in place for the radio
  revision.

  If someone wants PSB support on AR5212+AR5111 radios then please let
  me know and I'll add the relevant version check.

Obtained from:	Qualcomm Atheros
2012-10-31 21:03:55 +00:00
Adrian Chadd
3631c3f200 Add in the last random assortment of missing bits for the AR9380 HAL.
Obtained from:	Qualcomm Atheros
2012-10-31 21:00:01 +00:00
Adrian Chadd
321e63ddee Add the emulation PCI device id - these days, 0xabcd shows up all over
the internet as "AR9380 and later which didn't get its PCI ID written
in at power-on", so it's hardly an unknown constant.

Obtained from:	Qualcomm Atheros
2012-10-31 20:58:24 +00:00
Jack F Vogel
89da5b3198 Correct code that was lost somewhere in the past,
this was designed to keep duplicate null vlan tags from
being added. When doing vlans purely via the switch
this problem will occur. Reported by external customer.
2012-10-31 18:16:42 +00:00
Attilio Rao
4ceaf45de5 Rework the known mutexes to benefit about staying on their own
cache line in order to avoid manual frobbing but using
struct mtx_padalign.

The sole exception being nvme and sxfge drivers, where the author
redefined CACHE_LINE_SIZE manually, so they need to be analyzed and
dealt with separately.

Reviwed by:	jimharris, alc
2012-10-31 18:07:18 +00:00
Jim Harris
84e7a2ebb7 Pad and align the callout_cpu mtx to its own cacheline to reduce false
sharing especially on the default CPU 0 callout_cpu structure.

This will be followed up by attilio@ with a conversion to the new struct
mtx_padalign but doing this manual conversion first gives an easy MFC
candidate since mtx_padalign is a more extensive system change.

Sponsored by:	Intel
Reviewed by:	jeff, attilio
MFC after:	1 week
2012-10-31 17:12:12 +00:00
Dag-Erling Smørgrav
192bc3edf4 Correct attribution. 2012-10-31 15:04:27 +00:00