Commit Graph

159420 Commits

Author SHA1 Message Date
Marius Strobl
bab85d8dcc Fix a bug introduced with r215298; when atphy_reset() is called from
atphy_attach() the current media has not been set, yet, leading to a
NULL-dereference in atphy_setmedia().

Submitted by:	jkim (initial version)
2010-11-18 17:58:59 +00:00
Mark Murray
f0a0ad3b58 Do not lint code beyond necessity (with apologies to Wiliam of Ockham).
Don't lint externally maintained CDDL code, or relint the 32-bit libraries
in amd64 mode.
2010-11-18 16:32:52 +00:00
Alexander Motin
c2b82f3e61 If HBA doesn't report user-enabled SATA capabilies (like ATA_CAM wrapper) -
handle all of them as disabled. This was original cause of the problem,
workarounded by r215453.

MFC after:	1 week
2010-11-18 13:38:33 +00:00
Alexander Motin
5c2a4ae217 Even if we are skipping SATA hard reset - set power management bits in
SControl register. This should make things consistent and help to avoid
unexpected PHY events that I've noticed in some cases on VIA controllers.
2010-11-18 11:58:17 +00:00
Alexander Motin
1f6aa21d47 Record that there is no devices if SATA reset found none. 2010-11-18 10:34:18 +00:00
Hans Petter Selasky
c865d740d5 Correct description of the return values of
the LibUSB v1.0 libusb_control_transfer() function.

PR:		usb/151851
Submitted by:	HIROSHI OOTA
Approved by:	thompsa (mentor)
2010-11-18 08:32:47 +00:00
Alexander Motin
ee597c8246 Some VIA SATA controllers provide access to non-standard SATA registers via
PCI config space. Use them to implement hot-plug and link speed reporting.
Tested on ASRock PV530 board with VX900 chipset.
2010-11-18 08:03:40 +00:00
John Baldwin
144df3a28f Add a resource_list_reserved() method that returns true if a resource
list entry contains a reserved resource.
2010-11-17 22:28:04 +00:00
Andreas Tobler
8694ea87f5 Revert r215435. We need to figure out the exact value to be loaded.
Approved by: 	nwhitehorn (mentor)
2010-11-17 20:37:16 +00:00
Tijl Coosemans
cac88fd591 Let gcc and ld know where to find 32 bit libraries on amd64.
Reviewed by:	arch@
Approved by:	kib (mentor)
2010-11-17 19:54:01 +00:00
Andreas Tobler
da068879c5 Check the real-mode? OF property to find out whether we operate in real or
virtual mode. In virtual mode we have to do memory mapping. On PowerMacs it is
usually false while on pSeries we have found that it is true. The real-mode?
property is not available on sparc64.

Approved by: 	nwhitehorn (mentor)
2010-11-17 19:35:56 +00:00
Andreas Tobler
cb1b50fa7c Move the declaration of the eh struct (used only when debugging is enabled)
from ofwn_put into the debug section.

Approved by:	nwhitehorn (mentor)
2010-11-17 19:31:48 +00:00
Andreas Tobler
6f9943822b Make sure the .bss is cleared at the beginning. The pSeries OF ELF loader does
not clear .bss automatically.

Approved by:	nwhitehorn (mentor)
2010-11-17 19:28:48 +00:00
Andreas Tobler
565d322630 Load the full 16k stack space.
Approved by:	nwhitehorn (mentor)
2010-11-17 19:25:37 +00:00
George V. Neville-Neil
f5d34df525 Add new, per connection, statistics for TCP, including:
Retransmitted Packets
Zero Window Advertisements
Out of Order Receives

These statistics are available via the -T argument to
netstat(1).
MFC after:	2 weeks
2010-11-17 18:55:12 +00:00
Pyun YongHyeon
2f4fcd485d MCP55 is the only NVIDIA controller that supports VLAN tag
insertion/stripping and it also supports TSO over VLAN. Implement
TSO over VLAN support for MCP55 controller.

While I'm here clean up SIOCSIFCAP ioctl handler. Since nfe(4)
sets ifp capabilities based on various hardware flags in device
attach, there is no need to check hardware flags again in
SIOCSIFCAP ioctl handler. Also fix a bug which toggled both TX and
RX checksum offloading even if user requested either TX or RX
checksum configuration change.

Tested by:	Rob Farmer ( rfarmer <> predatorlabs dot net )
2010-11-17 18:09:02 +00:00
Alexander Motin
040545848d Add IDs for VIA VX900 chipset SATA controller.
(Missed part of r215428)
2010-11-17 17:52:04 +00:00
Alexander Motin
2cbfd42740 Add IDs for VIA VX900 chipset SATA controller.
MFC after:	1 week
2010-11-17 16:17:35 +00:00
Konstantin Belousov
1563ee36b9 Only save FPU context when not executing in the context of the crypto
thread.

Tested by:	Mike Tancsa
2010-11-17 16:17:15 +00:00
John Baldwin
8da821ff03 Remove unused autofs userland bits.
Approved by:	core
2010-11-17 15:42:47 +00:00
Ivan Voras
51e5e45458 Change "wait" banner to "qlen" to be more indicative of its purpose and to
be more inline with what gstat uses.

Reviewed by:	gnn
Silence from:	phk, keramida
2010-11-17 15:12:10 +00:00
Bjoern A. Zeeb
683525038b Do not initialize flag variables before needed.
Consistently use the LLE_ prefix for lla_lookup() and the ND6_ prefix
for nd6_lookup() even though both are defined the same. Use the right
flag variable when checking each.

No real functional change.

MFC after:	4 days
2010-11-17 10:43:20 +00:00
Bernhard Schmidt
511fa5ac98 Fix a panic on i386 for drivers using MmAllocateContiguousMemory()
and MmAllocateContiguousMemorySpecifyCache().

Those two functions take 64-bit variable(s) for their arguments. On i386
that takes additional 32-bit variable per argument. This is required so
that windrv_wrap() can correctly wrap function that miniport driver calls
with stdcall convention. Similar explanation is provided in subr_ndis.c for
other functions.

Submitted by:	 Paul B Mahol <onemda at gmail.com>
2010-11-17 09:32:39 +00:00
Bernhard Schmidt
4152177570 Use kmem_alloc_contig() to honour the cache_type variable.
Pointed out by:	alc
2010-11-17 09:28:17 +00:00
Bjoern A. Zeeb
20723e34e3 No need to re-initialize the callout. We initially do it in in6_lltable_new()
right after allocation.  Worse, we are losing the right flags here.

MFC after:	4 days
2010-11-17 09:25:08 +00:00
Jung-uk Kim
816b3bd1b0 Restore CR0 after MTRR initialization for correctness sakes. There will be
no noticeable change because we enable caches before we enter here for both
BSP and AP cases.  Remove another pointless optimization for CR4.PGE bit
while I am here.
2010-11-16 23:26:02 +00:00
Jung-uk Kim
50083a5624 Invalidate TLBs explicitly. r1.4 of sys/i386/i386/i686_mem.c removed this
code but probably it only worked by chance because modifying CR4.PGE bit
causes invlidation of entire TLBs.  Since these are very rare events, this
micro-optimization seems useless.

Reviewed by:	jhb
2010-11-16 22:44:58 +00:00
Adrian Chadd
7d31a76295 Re-enable generating links. 2010-11-16 22:23:20 +00:00
Adrian Chadd
84103d748f .. and then notice that the list of mk files is ordered, and update to suit. 2010-11-16 22:22:16 +00:00
Adrian Chadd
e04bbe2020 Add in forgotten install rule. 2010-11-16 22:21:14 +00:00
Michael Tuexen
6a67588bbb Add an SCTP socket option to retrieve the number of timeouts
of an association.

MFC after: 3 days.
2010-11-16 22:16:38 +00:00
George V. Neville-Neil
b751664f7f Fix an error in our results printing. 2010-11-16 20:39:52 +00:00
Andriy Gapon
c59690f249 zfs+sendfile: populate all requested pages, not just those already cached
kern_sendfile() uses vm_rdwr() to read-ahead blocks of data to populate
page cache.  When sendfile stumbles upon a page that is not populated
yet, it sends out all the mbufs that it collected so far.  This
resulted in very poor performance with ZFS when file data is not in the
page cache, because ZFS vop_read for UIO_NOCOPY case populated only
those pages that are already in cache, but not valid.  Which means that
most of the time it populated only the first requested page in the
described above scenario.

Reported by:	Alexander Zagrebin <alexz@visp.ru>
Tested by:	Alexander Zagrebin <alexz@visp.ru>,
		Artemiev Igor <ai@kliksys.ru>
MFC after:	12 days
2010-11-16 15:53:44 +00:00
Olivier Houchard
0c87b5e243 No need to include sys/systm.h twice. 2010-11-16 14:08:21 +00:00
Andriy Gapon
40934baa60 hwpstate: use CPU_FOREACH when binding to all available processors
Also, add a comment mentioning _PSD - on some systems it's enough to
put one logical CPU into a particular P-state to make other CPUs in
the same domain to enter that P-state.

Also, call sched_unbind() after the loop - sched_bind() automatically
rebinds from previous CPU to a new one, and the new arrangement of code
is safer against early loop exit.

Plus one minor style nit.

MFC after:	10 days
2010-11-16 12:43:45 +00:00
Andriy Gapon
f9e2e99d5d fix misspelling in a comment
Reported by:	Daniel Braniss <danny@cs.huji.ac.il>
MFC after:	3 days
2010-11-16 12:30:47 +00:00
Lawrence Stewart
78b01840af Make the CC framework more VIMAGE friendly by adding the machinery to allow
vnets to select their own default CC algorithm independent of each other and the
base system. If the base system or a vnet has set a default which gets unloaded,
we reset that netstack's default to NewReno.

Sponsored by:	FreeBSD Foundation
Tested by:	Mikolaj Golub <to.my.trociny at gmail com>
Reviewed by:	bz (briefly)
MFC after:	3 months
2010-11-16 09:34:31 +00:00
Lawrence Stewart
ebf92e869f - Querying the default CC algo is more common than setting it and the function
is small, so there is no good reason not to declare the buffer at the top.

- Fix a whitespace nit.

Sponsored by:	FreeBSD Foundation
MFC after:	11 weeks
X-MFC with:	r215166
2010-11-16 08:43:25 +00:00
Lawrence Stewart
99065ae6a8 Move protocol specific implementation detail out of the core CC framework.
Sponsored by:	FreeBSD Foundation
Tested by:	Mikolaj Golub <to.my.trociny at gmail com>
MFC after:	11 weeks
X-MFC with:	r215166
2010-11-16 08:30:39 +00:00
Lawrence Stewart
4e805854ed On CC algorithm module unload, we walk the list of active TCP control blocks.
Any found to be using the algorithm that is about to go away are switched back
to NewReno to avoid leaving dangling pointers which would trigger a panic. For
VIMAGE kernels, there is a list per vnet to walk, yet the implementation was
only examining one of the vnet lists.

Fix the implementation of the above feature for VIMAGE kernels by looping
through all active TCP control blocks across all vnets.

Sponsored by:	FreeBSD Foundation
Tested by:	Mikolaj Golub <to.my.trociny at gmail com>
Reviewed by:	bz (briefly)
MFC after:	11 weeks
2010-11-16 07:57:56 +00:00
Lawrence Stewart
14f57a8b02 cc_init() should only be run once on system boot, but with VIMAGE kernels it
runs on boot and each time a vnet jail is created. Running cc_init() multiple
times results in a panic when attempting to initialise the cc_list lock again,
and so r215166 effectively broke the use of vnet jails.

Switch to using a SYSINIT to run cc_init() on boot. CC algorithm modules loaded
on boot register in the same SI_SUB_PROTO_IFATTACHDOMAIN category as is used in
this patch, so cc_init() is run at SI_ORDER_FIRST to ensure the framework is
initialised before module registration is attempted.

Sponsored by:	FreeBSD Foundation
Reported and tested by:	Mikolaj Golub <to.my.trociny at gmail com>
MFC after:	11 weeks
X-MFC with:	r215166
2010-11-16 07:09:05 +00:00
Nathan Whitehorn
17a6d97402 Make drm(4) build, if not work reliably, on PowerPC. 2010-11-16 03:43:06 +00:00
Jung-uk Kim
8299c44bdd Restore the previous behaviour of substring match. 2010-11-15 23:38:52 +00:00
Dag-Erling Smørgrav
36b0a37317 Remove no-op assignment.
Submitted by:	clang via arundel@
MFC after:	2 weeks
2010-11-15 23:14:14 +00:00
Jung-uk Kim
51460278cf Plug memory leakage introduced in r204989.
Reported by:	yongari
2010-11-15 23:13:25 +00:00
Nathan Whitehorn
ce0cfc0ef3 Garbage-collect some code made obsolete by the TBEMD import. 2010-11-15 22:12:13 +00:00
Nathan Whitehorn
4a380db544 Try including Makefile.${TARGET_ARCH} before Makefile.${TARGET_CPUARCH} if
it exists in order to allow arch-specific overrides. This fixes the
binutils (and world) build on powerpc64 after recent TBEMD merges.

Reviewed by:	imp
2010-11-15 22:11:18 +00:00
Pyun YongHyeon
b0630da9ad Plug memory leakage introduced in r215327.
Submitted by:	jkim
2010-11-15 22:05:08 +00:00
Marius Strobl
6948a04f2c Convert drivers somehow missed in r200874 to multipass probing. 2010-11-15 21:58:10 +00:00
Marius Strobl
d0fae855ef Return from mii_attach() after calling bus_generic_attach(9) on the device_t
of the MAC driver in order to attach miibus(4) on the first pass instead of
falling through to also calling it on the device_t of miibus(4). The latter
code flow was intended to attach the PHY drivers the same way regardless of
whether it's the first or a repeated pass, modulo the bus_generic_attach()
call in miibus_attach() which shouldn't be there. However, it turned out
that these variants cause miibus(4) to be attached twice under certain
conditions when using MAC drivers as modules.

Submitted by:	yongari
MFC after:	3 days
2010-11-15 21:41:45 +00:00