Commit Graph

84943 Commits

Author SHA1 Message Date
Andreas Tobler
7abf4584c6 Revert r230390. 2012-01-21 11:42:40 +00:00
Adrian Chadd
e148ff4992 Fix the hwmp code to handle nodes in a "line" topology.
For example, this particular topology didn't work correctly from all
nodes:

[A] - [B] - [C] - [D]

Submitted by:	Monthadar Al Jaberi <monthadar@gmail.com>
Reviewed by:	bschmidt, adrian
2012-01-21 00:42:28 +00:00
Adrian Chadd
f7c90cbb77 Change the hwmp debugging to use %6D rather than ether_sprintf().
This allows for multiple MAC addresses to be printed on the same
debugging line.  ether_sprintf() uses a static char buffer and
thus isn't very useful here.

Submitted by:	Monthadar Al Jaberi <monthadar@gmail.com>
2012-01-21 00:38:18 +00:00
Martin Matuska
6dfe0a3dc2 Use separate buffer for global path to avoid overflow of path buffer.
Reviewed by:	jamie@
MFC after:	3 weeks
2012-01-21 00:06:21 +00:00
Oleksandr Tymoshenko
cccc098d9b We use port_index field of struct octusb_qh to reference USB state
of root HUB. Although it is initialized with port index of the
device's parent hub, which is worng. So track the USB tree up to
root HUB  and initialize this filed ptroprly

Rename port_index to root_port_index in order to reflect its
real semantics.
2012-01-20 23:37:04 +00:00
Pedro F. Giffuni
5dcd37b17d Replace GPLd headers from the Maestro3 driver with BSD licensed
versions derived from /usr/ports/audio/oss.

The particular headers used were taken from the
attic/drv/oss_allegro directory and are mostly identical
to the previous files.

The Maestro3 driver is now free from the GPL.

NOTE: due to lack of testers this driver is being
considered for deprecation and removal.

PR:		kern/153920
Approved by:	jhb (mentor)
MFC after:	2 weeks
2012-01-20 22:37:10 +00:00
Andreas Tobler
9eab2f146a This commit adds profiling support for powerpc64. Now we can do application
profiling and kernel profiling. To enable kernel profiling one has to build
kgmon(8). I will enable the build once I managed to build and test powerpc
(32-bit) kernels with profiling support.

- add a powerpc64 PROF_PROLOGUE for _mcount.
- add macros to avoid adding the PROF_PROLOGUE in certain assembly entries.
- apply these macros where needed.
- add size information to the MCOUNT function.

MFC after:	3 weeks, together with r230291
2012-01-20 22:34:19 +00:00
Nathan Whitehorn
8bab0d80ca Prevent an error resulting from signed/unsigned comparison on systems
that do not comply with the OF spec.

Submitted by:	Anders Gavare
MFC after:	1 week
2012-01-20 22:24:39 +00:00
Pawel Jakub Dawidek
b636ebaa6a By default turn off prefetch when listing snapshots.
In my tests it makes listing snapshots 19% faster with cold cache and
47% faster with warm cache.

MFC after:	1 week
2012-01-20 22:04:59 +00:00
John Baldwin
5aefb4cbbf Close a race in NFS lookup processing that could result in stale name cache
entries on one client when a directory was renamed on another client.  The
root cause for the stale entry being trusted is that each per-vnode nfsnode
structure has a single 'n_ctime' timestamp used to validate positive name
cache entries.  However, if there are multiple entries for a single vnode,
they all share a single timestamp.  To fix this, extend the name cache
to allow filesystems to optionally store a timestamp value in each name
cache entry.  The NFS clients now fetch the timestamp associated with
each name cache entry and use that to validate cache hits instead of the
timestamps previously stored in the nfsnode.  Another part of the fix is
that the NFS clients now use timestamps from the post-op attributes of
RPCs when adding name cache entries rather than pulling the timestamps out
of the file's attribute cache.  The latter is subject to races with other
lookups updating the attribute cache concurrently.  Some more details:
- Add a variant of nfsm_postop_attr() to the old NFS client that can return
  a vattr structure with a copy of the post-op attributes.
- Handle lookups of "." as a special case in the NFS clients since the name
  cache does not store name cache entries for ".", so we cannot get a
  useful timestamp.  It didn't really make much sense to recheck the
  attributes on the the directory to validate the namecache hit for "."
  anyway.
- ABI compat shims for the name cache routines are present in this commit
  so that it is safe to MFC.

MFC after:	2 weeks
2012-01-20 20:02:01 +00:00
Andreas Tobler
618abe8ba1 Add the .opd section, this is helps booting a profiled kernel.
Adjust the OUTPUT_ARCH and use the builtin ALIGN() to adjust the data segment.
2012-01-20 18:52:31 +00:00
Andreas Tobler
4e7a7ba0b7 Disable GUPROF on archs other than i386/amd64 since the fine details are not
implemented.
2012-01-20 18:49:47 +00:00
Bjoern A. Zeeb
44e489690c Remove a superfluous INET6 check (no opt_inet6.h included anyway).
MFC after:	3 days
2012-01-20 17:18:54 +00:00
Michael Tuexen
c75fdd302b Fix a problem when using the CBAPI.
While there, remove an old comment which does not apply anymore.
2012-01-20 13:26:11 +00:00
David Schultz
9fa03ecd01 Add parentheses where required. Without them, `sizeof LDBL_MAX'
is a syntax error and shouldn't be, while `1 FLT_ROUNDS' isn't a
syntax error and should be.  Thanks to bde for the examples.
2012-01-20 06:51:41 +00:00
Rick Macklem
23b3566364 Martin Cracauer reported a problem to freebsd-current@ under the
subject "Data corruption over NFS in -current". During investigation
of this, I came across an ugly bogusity in the new NFS client where
it replaced the cr_uid with the one used for the mount. This was
done so that "system operations" like the NFSv4 Renew would be
performed as the user that did the mount. However, if any other
thread shares the credential with the one doing this operation,
it could do an RPC (or just about anything else) as the wrong cr_uid.
This patch fixes the above, by using the mount credentials instead of
the one provided as an argument for this case. It appears
to have fixed Martin's problem.
This patch is needed for NFSv4 mounts and NFSv3 mounts against
some non-FreeBSD servers that do not put post operation attributes
in the NFSv3 Statfs RPC reply.

Tested by:	Martin Cracauer (cracauer at cons.org)
Reviewed by:	jhb
MFC after:	2 weeks
2012-01-20 00:58:51 +00:00
Konstantin Belousov
2974cc36f7 Use shared lock for the executable vnode in the exec path after the
VV_TEXT changes are handled. Assert that vnode is exclusively locked at
the places that modify VV_TEXT.

Discussed with:	alc
MFC after:	3 weeks
2012-01-19 23:03:31 +00:00
John Baldwin
df4ce32fcb Properly return success once a matching VPD entry is found in
pci_get_vpd_readonly_method().  Previously the loop was always running
to completion and falling through to failing with ENXIO.

PR:		kern/164313
Submitted by:	Chuck Tuffli  chuck tuffli net
MFC after:	1 week
2012-01-19 21:38:19 +00:00
Pyun YongHyeon
d9fc28e40d Oops, fix logic error introduced in r230337. 2012-01-19 20:28:58 +00:00
Pyun YongHyeon
2ae7f64b45 Rename dev.bge.%d.msi_disable to dev.bge.%d.msi which matches
enable/disable and default it to on.

Suggested by:	jhb
2012-01-19 20:21:59 +00:00
Pyun YongHyeon
bc6b129bcd Fix a logic error which resulted in putting PHY into sleep when WOL
is active.  If WOL is active driver should not put PHY into sleep.
This change makes WOL work on RTL8168E.
2012-01-19 20:13:16 +00:00
Kenneth D. Merry
2a2443d833 Quiet some clang warnings when compiling CTL.
ctl_error.c,
ctl_error.h:	Take out the ctl_sense_format enumeration, and use
		scsi_sense_data_type instead.

		Remove ctl_get_sense_format() and switch ctl_build_ua()
		over to using scsi_sense_data_type.

ctl_backend_ramdisk.c,
ctl_backend_block.c:
		Use C99 structure initializers instead of GNU initializers.

ctl.c:		Switch over to using the SCSI sense format enumeration
		instead of the CTL-specific enumeration.

Submitted by:	dim (partially)
MFC after:	1 month
2012-01-19 18:42:03 +00:00
Hans Petter Selasky
6f0e06a10e Add support for new USB device.
PR:		usb/164275
MFC after:	3 days
2012-01-19 18:03:52 +00:00
Alexander Motin
5bcd25de3e Print controller/codec IDs for unknown chips instead of useless and
frightening "unknown" word. In most cases we don't need to know chips
to properly handle them, but having IDs in logs may simplify debugging.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2012-01-19 11:18:21 +00:00
Luigi Rizzo
e3ca4599b0 netmap-related changes:
1. correct the initialization of RDT when there is an ixgbe_init()
   while a netmap client is active. This code was previously
   in ixgbe_initialize_receive_units() but RDT is overwritten
   shortly afterwards in ixgbe_init_locked()

2. add code (not active yet) to disable CRCSTRIP while in netmap mode.
   From all evidence i could gather, it seems that when the 82599 has to
   write a data block that is not a full cache line, it first reads
   the line (64 bytes) and then writes back the updated version.
   This hurts reception of min-sized frames, which are only 60 bytes
   if the CRC is stripped: i could never get above 11Mpps
   (received from one queue) with CRCSTRIP enabled, whyle 64+4-byte
   packets reach 14.2 Mpps (the theoretical maximum).
   Leaving the CRC in gets us 14.88Mpps for 60+4 byte frames,
   (and penalizes 64+4). The min-size case is important not just because
   it looks good in benchmarks, but also because this is the size
   of pure acks.
   Note we cannot leave CRCSTRIP on by default because it is
   incompatible with some other features (LRO etc.)
2012-01-19 09:36:19 +00:00
Eitan Adler
383227f156 Add support for Sony Ericsson GC89 EDGE/Wirelles LAN PC Card
PR:		kern/131933
Submitted by:	Alex Keda <admin@lissyara.su>
Approved by:	jhb
Approved by:	cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	1 week
2012-01-19 02:47:11 +00:00
Alexander Motin
6fa8e691a3 Two 192/24/8 playback streams overflow single mandatory output line (SDO)
of HDA bus. Handle that from two directions:
 - Add support for "striping" (using several SDO lines), if supported.
 - Account HDA bus utilization and return error on new stream allocation
attempt if remaining bandwidth is unsifficient.

Most of HDA controllers have one SDO line with 46Mbps output bandwidth.
NVIDIA GF210 has 2 lines - 92Mbps. NVIDIA GF520 has 4 lines - 184Mbps!

MFC after:	2 months
Sponsored by:	iXsystems, Inc.
2012-01-19 01:55:48 +00:00
Sean Bruno
811e96eaad Wrap changes from svn r212126 inside LOADER_NFS_SUPPORT such that
using LOADER_TFTP_SUPPORT excludes this code.  Fixes compilation of pxeldr
with -DLOADER_TFTP_SUPPORT

Applicable to stable/9 and stable/8 now.

This appears to not be needed on stable/7 as r212126 has not been MFC'd.

Obtained from:	Yahoo! Inc.
MFC after:	2 weeks
2012-01-19 01:25:50 +00:00
Sean Bruno
5564c1cdd4 Add support for HP P420 to ciss(4)
Tested on upcoming Gen 8 releases of hardware from HP.

MFC to all supported releases.

Obtained from:	Yahoo! Inc.
MFC after:	2 weeks
2012-01-18 19:35:16 +00:00
Alexander Motin
88addcbe26 Improve HDMI/DisplayPort audio support in snd_hda(4):
- Enable and handle unsolicited responses from digital display pins,
reporting connection and EDID-Like Data (ELD) validity status changes.
 - Fetch ELD data, describing connected digital display device audio
capabilities. These data not really used at the moment (user is not
denied to use audio formats not supported by the device), only printed to
verbose logs. But they are useful for debugging. The fact that ELD was
received tells that HDMI link was established and video driver enabled
HDMI audio passthrough. Some old chips may not return ELD, so lack of it
is not necessary a problem.
 - Add some more points to CODEC configuration sequence:
   - For converter widgets, supporting more then two channels (HDMI/DP
     converter widgets support 8), set number of channels to handle.
   - For digital display pins (HDMI/DP) fill audio infoframe, reporting
     connected device about number of channels and speakers allocation.
   - For digital display pins (HDMI/DP) set mapping between channels seen
     by software and channels transferred via HDMI/DisplayPort.
 - Allow more audio formats, not used for analog connections because of
stereo pairs orientation, but easily applicable to HDMI/DisplayPort: 2.1,
3.0, 3.1, 4.1, 5.0, 6.0, 6.1, 7.0. That list may be filtered later using
info from ELD.
 - Disable MSI interrupts for NVIDIA HDA controllers before GT520.

At this point I can successfully play audio over HDMI from NVIDIA GT210
and GT520 cards with nvidia-driver-290.10 driver to Marantz SR4001
receiver in 2.0, 2.1, 3.0, 4.0, 4.1, 5.0 and 5.1 PCM formats at 44, 48,
88 and 96KHz at 16 and 24 bits, same as do AC3/DTS passthrough.
6.0, 6.1, 7.0 and 7.1 PCM formats are not working for me, but I think
it is because of receiver age.

MFC after:	2 months
Sponsored by:	iXsystems, Inc.
2012-01-18 19:12:33 +00:00
Bjoern A. Zeeb
63ae21df93 Unbreak several mips kernel configs after r230150 and r230152 to make
a universe complete successfully again.
2012-01-18 15:25:34 +00:00
Eygene Ryabinkin
15c75a0d9f Subject: NULLFS: properly destroy node hash
Use hashdestroy() instead of naive free().

Approved by:	kib
MFC after:	2 weeks
2012-01-18 11:23:46 +00:00
Jens Schweikhardt
49da75c9f6 Connect the bktr module(s) to the amd64 build.
MFC after:	7 days
2012-01-18 08:56:26 +00:00
Pyun YongHyeon
5c952e8d1b Introduce a tunable that disables use of MSI.
Non-zero value will use INTx.
2012-01-17 22:15:33 +00:00
Ed Schouten
9b6e65b66f Don't expose __generic() when not using C++.
According to the GCC documentation, the constructs used to implement
<tgmath.h> are only available in C mode. They only cause breakage when
used used with g++.

Reported by:	tijl
2012-01-17 20:21:31 +00:00
Pyun YongHyeon
1f32d3b76f Free allocated jumbo buffers when controller is stopped. 2012-01-17 19:36:53 +00:00
Pyun YongHyeon
cba163625e Use a RX DMA tag to free loaded RX DMA maps.
Previously it used a TX DMA tag.
2012-01-17 19:31:03 +00:00
Adrian Chadd
a1f698ef1c Tidy-up. 2012-01-17 18:20:34 +00:00
Gleb Smirnoff
bdc99a491d The newhook method can be called in ISR context at
certain circumstances, so better use M_NOWAIT in it.
2012-01-17 18:10:25 +00:00
Konstantin Belousov
6db9cf559f Add definitions for the FPU extended state header, legacy extended
state and AVX state.

MFC after:	1 week
2012-01-17 17:07:13 +00:00
Konstantin Belousov
e568229f50 Modernize the fpusave structures definitions by using uint*_t types.
MFC after:	1 week
2012-01-17 16:53:41 +00:00
Alan Cox
1dfab8025e Explain why it is safe to unlock the vnode.
Requested by:	kib
2012-01-17 16:20:50 +00:00
Gleb Smirnoff
3a8c7fa008 Allocate our mbuf with m_get2(). 2012-01-17 12:14:26 +00:00
Gleb Smirnoff
0adbaa2b80 Provide a function m_get2() that allocates a minimal mbuf that
would fit specified size. Returned mbuf may be a single mbuf,
an mbuf with a cluster from packet zone, or an mbuf with jumbo
cluster of sufficient size.
2012-01-17 12:13:36 +00:00
Konstantin Belousov
dd4f5d2437 Implement xsetbv(), xsave() and xrstor() providing C access to the
similarly named CPU instructions.

Since our in-tree binutils gas is not aware of the instructions, and
I have to use the byte-sequence to encode them, hardcode the r/m operand
as (%rdi). This way, first argument of the pseudo-function is already
placed into proper register.

MFC after:	1 week
2012-01-17 07:30:36 +00:00
Konstantin Belousov
79937651ef Add definitions related to XCR0.
MFC after:	1 week
2012-01-17 07:23:43 +00:00
Konstantin Belousov
5ba2a4998c Add macro IS_BSP() to check whether the current CPU is BSP.
MFC after:	1 week
2012-01-17 07:21:23 +00:00
Sergey Kandaurov
37c2842272 Fix the "lock &zrl->zr_mtx already initialized" assertion by initializing
the allocated memory before calling mtx_init(9) on mtx pointing to it.
Otherwize, random contents of uninitialized memory might occasionally
trigger the assertion.

Reported by:	Pavel Polyakov <bsd kobyla org>
Reviewed by:	pjd
MFC after:	1 week
2012-01-17 06:23:25 +00:00
Kevin Lo
e0d3195bd6 Return EOPNOTSUPP since we only support update mounts for NFS export.
Spotted by:	trociny
2012-01-17 01:25:53 +00:00
Kirk McKusick
86b571509a There are several bugs/hangs when trying to take a snapshot on a UFS/FFS
filesystem running with journaled soft updates. Until these problems
have been tracked down, return ENOTSUPP when an attempt is made to
take a snapshot on a filesystem running with journaled soft updates.

MFC after: 2 weeks
2012-01-17 01:14:56 +00:00