Commit Graph

179113 Commits

Author SHA1 Message Date
Gleb Smirnoff
60f2751670 Fix build. 2013-02-22 12:41:24 +00:00
Adrian Chadd
ffdc8f48dd Add a workaround for AR5416, AR9130 and AR9160 chipsets - work around
an incorrectly calculated RTS duration value when transmitting aggregates.

These earlier 802.11n NICs incorrectly used the ACK duration time when
calculating what to put in the RTS of an aggregate frame.  Instead it
should have used the block-ack time.  The result is that other stations
may not reserve enough time and start transmitting _over_ the top of
the in-progress blockack field.  Tsk.

This workaround is to popuate the burst duration field with the delta
between the ACK duration the hardware is using and the required duration
for the block-ack.  The result is that the RTS field should now contain
the correct duration for the subsequent block-ack.

This doesn't apply for AR9280 and later NICs.

Obtained from:	Qualcomm Atheros
2013-02-22 07:07:11 +00:00
Peter Grehan
0ab13648f5 Add the ability to have a 'fallback' search for memory ranges.
These set of ranges will be looked at if a standard memory
range isn't found, and won't be installed in the cache.
Use this to implement the memory behaviour of the PCI hole on
x86 systems, where writes are ignored and reads always return -1.
This allows breakpoints to be set when issuing a 'boot -d', which
has the side effect of accessing the PCI hole when changing the
PTE protection on kernel code, since the pmap layer hasn't been
initialized (a bug, but present in existing FreeBSD releases so
has to be handled).

Reviewed by:	neel
Obtained from:	NetApp
2013-02-22 00:46:32 +00:00
Sergey Kandaurov
5e0fb0052b Document VFCF_SBDRY.
Reviewed by:	jhb
X-MFC with:	r247116
2013-02-21 22:21:45 +00:00
Adrian Chadd
ce597531f2 Disable debugging entries about BAW issues. I haven't seen any issues
to do with BAW tracking in the last 9 months or so.
2013-02-21 21:47:35 +00:00
Sergey Kandaurov
75dbe5f2b6 Reflect CARP media-type departure.
X-MFC after:	never
2013-02-21 21:35:09 +00:00
Andrew Gallatin
26dd49c61d Improve mxge's receive performance for IPv6:
- Add support for IPv6 rx csum offload
- Finally switch mxge from using its own driver lro, to
	using tcp_lro

MFC after:	7 days
Sponsored by: Myricom Inc.
2013-02-21 21:28:33 +00:00
Sergey Kandaurov
fe9a760737 Separate items in the list of System values with .Pp to ease readability. 2013-02-21 20:45:19 +00:00
Navdeep Parhar
c1508f2bad cxgbe(4): Add sysctls to extract debug information from the chip:
dev.t4nex.X.misc.cim_la         logic analyzer dump
dev.t4nex.X.misc.cim_qcfg       queue configuration
dev.t4nex.X.misc.cim_ibq_xxx    inbound queues
dev.t4nex.X.misc.cim_obq_xxx    outbound queues

Obtained from:	Chelsio
MFC after:	1 week
2013-02-21 20:13:15 +00:00
John-Mark Gurney
ed7ce02c2c reorder so all the flags are together and make the PCLMUL flag unique..
This fixes the problem on amd64 miscompiling mpboot.s causing boot
issues...  We are still using gas for a few files in the kernel...

Submitted by:	kib
MFC after:	1 month
2013-02-21 19:13:19 +00:00
John Baldwin
593efaf9f7 Further refine the handling of stop signals in the NFS client. The
changes in r246417 were incomplete as they did not add explicit calls to
sigdeferstop() around all the places that previously passed SBDRY to
_sleep().  In addition, nfs_getcacheblk() could trigger a write RPC from
getblk() resulting in sigdeferstop() recursing.  Rather than manually
deferring stop signals in specific places, change the VFS_*() and VOP_*()
methods to defer stop signals for filesystems which request this behavior
via a new VFCF_SBDRY flag.  Note that this has to be a VFC flag rather than
a MNTK flag so that it works properly with VFS_MOUNT() when the mount is
not yet fully constructed.  For now, only the NFS clients are set this new
flag in VFS_SET().

A few other related changes:
- Add an assertion to ensure that TDF_SBDRY doesn't leak to userland.
- When a lookup request uses VOP_READLINK() to follow a symlink, mark
  the request as being on behalf of the thread performing the lookup
  (cnp_thread) rather than using a NULL thread pointer.  This causes
  NFS to properly handle signals during this VOP on an interruptible
  mount.

PR:		kern/176179
Reported by:	Russell Cattelan (sigdeferstop() recursion)
Reviewed by:	kib
MFC after:	1 month
2013-02-21 19:02:50 +00:00
Warner Losh
ae40be8cf0 splsoftvm() is no longer in the tree. gc. 2013-02-21 17:54:14 +00:00
Warner Losh
e7599006fa bus_dmamap_load_ccb doesn't exist on earlier versions of FreeBSD or
DragonFlyBSD, so it certainly doesn't need splsoftvm(). Remove it.

# I doubt this driver will now compile on older FreeBSD versions or DFBSD
# We should consider unifdefing it since that code seems unmaintained.
2013-02-21 17:50:21 +00:00
Warner Losh
664b97eff5 Remove splsoftclock() since it is now gone. 2013-02-21 17:40:59 +00:00
Andrew Gallatin
e5ca1ffab5 Fix tcp_lro_rx_ipv4() for drivers that do not set CSUM_IP_CHECKED.
Specifcially, in_cksum_hdr() returns 0 (not 0xffff) when the IPv4
checksum is correct. Without this fix, the tcp_lro code will reject
good IPv4 traffic from drivers that do not implement IPv4 header
harder csum offload.

Sponsored by: Myricom Inc.

MFC after:	7 days
2013-02-21 17:00:35 +00:00
Sergey Kandaurov
07b9a28adb In the EXAMPLES section: append the subsystem regular expression with a
typical interface name pattern as devd(8) uses full string match.

Discussed with:	avg, glebius
2013-02-21 15:41:09 +00:00
Warner Losh
22e61bc2c1 Use critical_enter/critical_exit around the time sensitive part of
this code to depessimize the worst case we've lived with silently and
uneventfully for the past 12 years. Add a comment about a refinement
for those needing more assurance of accuracy.

Fix ddb's show rtc command deadlock potential when debugging rtc code
by not taking the lock if we're in the debugger. If you need a thumb
to count the number of people that have encountered this, I'd be
surprised.

Submitted by:	bde
2013-02-21 15:35:48 +00:00
Gleb Smirnoff
c43b22be02 Fix build. 2013-02-21 12:52:18 +00:00
Gleb Smirnoff
d0741ed4c3 Fix build. 2013-02-21 12:40:52 +00:00
Adrian Chadd
de2d9111ec Be slightly more paranoid with the TX DMA buffer maximum threshold.
Specifically - never jack the TX FIFO threshold up to the absolute
maximum; always leave enough space for two DMA transactions to
appear.

This is a paranoia from the Linux ath9k driver.  It can't hurt.

Obtained from:	Linux ath9k
2013-02-21 08:42:40 +00:00
Warner Losh
b441301d05 Remove incorrect comment about splsoftclock. 2013-02-21 07:19:50 +00:00
Warner Losh
ebf4319503 Locking for todr got pushed down into inittodr and the client
libraries it calls (although some might not be doing it right). We are
serialized right now by giant as well. This means the splsoftclock are
now an anachronism that has no benefit, even marking where locking
needs to happen. Remove them.
2013-02-21 07:16:40 +00:00
Adrian Chadd
a54ecf784a Add an option to allow the minimum number of delimiters to be tweaked.
This is primarily for debugging purposes.

Tested:

* AR5416, STA mode
2013-02-21 06:38:49 +00:00
Warner Losh
85e51e4918 Correct comment about use of pmtimer, and the real reason it isn't
used or desirable for amd64.
2013-02-21 06:38:24 +00:00
Adrian Chadd
4a502c332a Add a new option to limit the maximum size of aggregates.
The default is to limit them to what the hardware is capable of.

Add sysctl twiddles for both the non-RTS and RTS protected aggregate
generation.

Whilst here, add some comments about stuff that I've discovered during
my exploration of the TX aggregate / delimiter setup path from the
reference driver.
2013-02-21 06:18:40 +00:00
Adrian Chadd
054eace83f Remove this unneeded printf(), sorry! 2013-02-21 02:52:13 +00:00
Warner Losh
b96f7e0a60 The request queue is already locked, so we don't need the splsofclock/splx
here to note future work.
2013-02-21 02:43:44 +00:00
Jamie Gritton
ffc72591b1 Don't worry if a module is already loaded when looking for a fstype to mount
(possible in a race condition).

Reviewed by:	kib
MFC after:	1 week
2013-02-21 02:41:37 +00:00
Warner Losh
62c658aa9f Most other giant locked storage drivers in the tree don't use
splsoftclock to note the need for future locking, so remove it from
here.
2013-02-21 02:40:20 +00:00
Warner Losh
e1a1297625 The other giant locked storage drivers have removed splbio(), for the
most part, so remove it here too. Anybody locking this driver will need
far more than locks where splbio() were, so remove these nops.
2013-02-21 02:34:04 +00:00
Warner Losh
7fe826349c Fix broken usage of splhigh() by removing it. 2013-02-21 00:40:08 +00:00
Warner Losh
34bed74372 Kill now-bogus splhigh() -- it is a nop 2013-02-21 00:36:12 +00:00
Warner Losh
1eb7e5fe85 Replace splhigh() with critical_enter()/leave() to ensure we write the
config mode unlock sequence quickly enough. This likely isn't too critical,
since splhigh() has been a noop for a decade...
2013-02-21 00:27:51 +00:00
Warner Losh
37270a177d No longer need splhigh() since locking was done, delete it and
comments about it.
2013-02-21 00:26:31 +00:00
Jack F Vogel
6ab6bfe32f Refresh on the shared code for the E1000 drivers.
- bear with me, there are lots of white space changes, I would not
    do them, but I am a mere consumer of this stuff and if these drivers
    are to stay in shape they need to be taken.

em driver changes: support for the new i217/i218 interfaces

igb driver changes:
  - TX mq start has a quick turnaround to the stack
  - Link/media handling improvement
  - When link status changes happen the current flow control state
    will now be displayed.
  - A few white space/style changes.

lem driver changes:
  - the shared code uncovered a bogus write to the RLPML register
    (which does not exist in this hardware) in the vlan code,this
    is removed.
2013-02-21 00:25:45 +00:00
Navdeep Parhar
b85313804d cxgbe(4): Assume that CSUM_TSO in the transmit path implies CSUM_IP and
CSUM_TCP too.  They are all set explicitly by the kernel usually.

While here, fix an unrelated bug where hardware L4 checksum calculation
was accidentally disabled for some IPv6 packets.

Reported by:	alfred@
MFC after:	3 days
2013-02-20 23:15:40 +00:00
Pawel Jakub Dawidek
45b56a6ba2 When porting XTS-related code from OpenBSD I forgot to update copyright (only
OpenBSD was credited in one of two commits). Fix it.

Reported by:	Theo de Raadt <deraadt@cvs.openbsd.org>
Reviewed by:	Damien Miller <djm@mindrot.org>
2013-02-20 22:59:53 +00:00
Baptiste Daroussin
ff75c36ae1 Do not use deprecated functions from libarchive 2013-02-20 22:51:42 +00:00
Warner Losh
c2e38b5216 Remove the unused spl functions: spl0, splsoftcam, splsofttty,
splsofttq and splstatclock.

Other used spl functions to follow.
2013-02-20 22:20:49 +00:00
Dag-Erling Smørgrav
cdc1296734 revert 247035 2013-02-20 21:16:50 +00:00
Ed Maste
0d1fce25cb Fix parallel build race with DEBUG_FLAGS
Reported by: Jan Beich on freebsd-current
Tested by: markj
2013-02-20 20:42:56 +00:00
Brooks Davis
1f0ed3c00e Support hardlinks in manifest files by the same logic as the treewalk
code.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL
2013-02-20 19:32:31 +00:00
Joel Dahl
954349a63c Sort sections. 2013-02-20 19:05:13 +00:00
Giorgos Keramidas
302318d549 Various improvements to the qsort(3) usage example:
- Remove unused #include.
- Do not cast away const.
- Use the canonical idiom to compare two numbers.
- Use proper type for sizes, i.e. size_t instead of int.
- Correct indentation.
- Simplify printf("\n") to puts("").
- Use return instead of exit() in main().

Submitted by:	Christoph Mallon, christoph.mallon at gmx.de
Approved by:	gjb (mentor)
Reviewed by:	stefanf
MFC after:	1 week
2013-02-20 18:31:55 +00:00
Justin T. Gibbs
6a8f90edf5 Avoid panic when tearing down the DTrace pid provider for a
process that has crashed.

sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c:
	In fasttrap_pid_disable(), we cannot PHOLD the proc
	structure for a process that no longer exists, but
	we still have other, fasttrap specific, state that
	must be cleaned up for probes that existed in the
	dead process.  Instead of returning early if the
	process related to our probes isn't found,
	conditionalize the locking and carry on with a NULL
	proc pointer.  The rest of the fasttrap code already
	understands that a NULL proc is possible and does
	the right things in this case.

Sponsored by:	Spectra Logic Corporation
Reviewed by:	rpaulo, gnn
MFC after:	1 week
2013-02-20 17:55:17 +00:00
Justin T. Gibbs
cf4e0cc15e Orphaned processes that are being traced are killed by the
kernel.  Properly restore, continue, and detach from processes
being DTraced when DTrace exits with an error so the program
being inspected is not terminated.

cddl/contrib/opensolaris/cmd/dtrace/dtrace.c:
	In fatal(), the generic error handler, close the DTrace
	handle as is done in the "probe/script" error handler
	dfatal().  fatal() can be invoked after DTrace attaches
	to processes (e.g. a script specified by command line
	argument can't be found) and closing the handle will
	release them.

Submitted by:	Spectra Logic Corporation
Reviewed by:	rpaulo, gnn
2013-02-20 17:46:38 +00:00
Konstantin Belousov
31a53cd036 Convert machine/elf.h, machine/frame.h, machine/sigframe.h,
machine/signal.h and machine/ucontext.h into common x86 includes,
copying from amd64 and merging with i386.

Kernel-only compat definitions are kept in the i386/include/sigframe.h
and i386/include/signal.h, to reduce amd64 kernel namespace pollution.
The amd64 compat uses its own definitions so far.

The _MACHINE_ELF_WANT_32BIT definition is to allow the
sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions
on the amd64 compile host.  The same hack could be usefully abused by
other code too.
2013-02-20 17:39:52 +00:00
Alan Cox
5c9f7b1a91 Initialize vm_max_kernel_address on non-FDT platforms. (This should have
been included in r246926.)

The second parameter to pmap_bootstrap() is redundant.  Eliminate it.

Reviewed by:	andrew
2013-02-20 16:48:52 +00:00
Tim Kientzle
f87223581e Fix "fdt addr" to accept literal addresses rather than va offsets.
When initializing the fdt, query U-Boot as well.

With this change, it is now feasible to have U-Boot load
the FDT, ubldr will pull it from U-Boot and hand it to the
kernel.
2013-02-20 16:32:38 +00:00
Sergey Kandaurov
46f2df9c13 ip_savecontrol() style fixes. No functional changes.
- fix indentation
- put the operator at the end of the line for long statements
- remove spaces between the type and the variable in a cast
- remove excessive parentheses

Tested by:	md5
2013-02-20 15:44:40 +00:00