Commit Graph

87354 Commits

Author SHA1 Message Date
Hans Petter Selasky
6446f79981 Add new USB device ID.
PR:		usb/169789
MFC after:	1 week
2012-07-16 09:35:47 +00:00
Gleb Smirnoff
df0633a145 If ip_output() returns EMSGSIZE to tcp_output(), then the latter calls
tcp_mtudisc(), which in its turn may call tcp_output(). Under certain
conditions (must admit they are very special) an infinite recursion can
happen.

To avoid recursion we can pass struct route to ip_output() and obtain
correct mtu. This allows us not to use tcp_mtudisc() but call tcp_mss_update()
directly.

PR:		kern/155585
Submitted by:	Andrey Zonov <andrey zonov.org> (original version of patch)
2012-07-16 07:08:34 +00:00
Alan Cox
476f7f2423 Correct an off-by-one error in vm_reserv_alloc_contig() that resulted in
the last reservation of a multi-reservation allocation not being
initialized.
2012-07-15 21:46:19 +00:00
Adrian Chadd
c7f5bb7a4f Handle RX Keymiss events.
The AR9003 series NICs implement a separate RX error to signal that a
Keycache miss occured.  The earlier NICs would not set the key index
valid bit.

I'll dig into the difference between "no key index bit set" and "keycache
miss".
2012-07-15 20:51:41 +00:00
Adrian Chadd
29edf89eaa Log the number of handled decsriptors and valid descriptors when
hitting RXEOL.
2012-07-15 20:48:21 +00:00
Matthew D Fleming
f806cdcf99 Fix a bug with memguard(9) on 32-bit architectures without a
VM_KMEM_MAX_SIZE.

The code was not taking into account the size of the kernel_map, which
the kmem_map is allocated from, so it could produce a sub-map size too
large to fit.  The simplest solution is to ignore VM_KMEM_MAX entirely
and base the memguard map's size off the kernel_map's size, since this
is always relevant and always smaller.

Found by:	Justin Hibbits
2012-07-15 20:29:48 +00:00
Michael Tuexen
5e20b91dbe Changes which improve compilation if neither INET nor INET6 is defined.
MFC after: 3 days
2012-07-15 20:16:17 +00:00
Gleb Smirnoff
6aef0416fb Use M_NOWAIT while holding the pf giant lock. 2012-07-15 19:10:00 +00:00
Hans Petter Selasky
48804d9c0e Add new USB device ID.
PR:		usb/169789
MFC after:	1 week
2012-07-15 18:12:09 +00:00
Alexander V. Chernikov
99ab4b1297 Permit changing MTU in 6to4 relay.
This behavior is recommended by RFC 4213 clause 3.2.

Sometimes fragmentation is the least evil.
For example, some Linux IPVS kernels forwards
ICMPv6 checksums to real servers incorrectly.

Reviewed by:      hrs(previous version)
Approved by:      kib(mentor)
MFC after:        1 week
2012-07-15 17:44:27 +00:00
Christian Brueffer
9ce63ce2a3 Save a bzero() by using M_ZERO.
Obtained from:	Dragonfly BSD (change 4faaf07c3d7ddd120deed007370aaf4d90b72ebb)
MFC after:	2 weeks
2012-07-15 15:50:12 +00:00
Christian Brueffer
80ad0053bc Fix typo in a message.
Obtained from:	DragonFly BSD (change 7a817ab191e4898404a9037c55850e47d177308c)
MFC after:	3 days
2012-07-15 14:40:49 +00:00
Michael Tuexen
e0e00a4d0f #ifdef INET and INET6 consistently. This also fixes a bug, where
it was done wrong.

MFC after: 3 days
2012-07-15 11:04:49 +00:00
Warner Losh
17fda71d9f These were never used, remove them. 2012-07-15 06:08:11 +00:00
Rui Paulo
63490e32b2 The JP1082 device doesn't respond to the MII_BMSR command and it turns
out that it has an unusable PHY. It still works, although very slowly,
without a PHY, so I implemented non-PHY support in the udav driver.
2012-07-15 05:49:02 +00:00
Warner Losh
eac2306319 Configure the peripheral pins for MCI devices. Eliminate the now-unused
at91_pio_rm9200.h.
2012-07-15 05:41:43 +00:00
Warner Losh
ffc29a1935 Force overwrite of gz file, to make NO_CLEAN builds work. 2012-07-15 05:38:43 +00:00
Warner Losh
15fda8888a Use the pin number rather than the hybrid pin number + name. 2012-07-15 05:35:14 +00:00
Michael Tuexen
ad83c8a5a5 Provide the correct notification type (SCTP_SEND_FAILED_EVENT)
for unsent messages.

MFC after: 3 days
2012-07-14 21:25:14 +00:00
Alan Cox
9757857c4f If vm_contig_grow_cache() is allowed to sleep, then invoke the vm_lowmem
handlers.
2012-07-14 20:14:03 +00:00
Michael Tuexen
b5e0cd79c2 Use case for selecting the address family (as in other places).
MFC after: 3 days
2012-07-14 20:08:03 +00:00
Michael Tuexen
c9afdc3aa9 Use case for selecting the address family (as in other places).
MFC after: 3 days
2012-07-14 19:44:39 +00:00
Alan Cox
0ff0fc84c2 Move kmem_alloc_{attr,contig}() to vm/vm_kern.c, where similarly named
functions reside.  Correct the comment describing kmem_alloc_contig().
2012-07-14 18:10:44 +00:00
Konstantin Belousov
333d0c6060 Add support for the XSAVEOPT instruction use. Our XSAVE/XRSTOR usage
mostly meets the guidelines set by the Intel SDM:
1. We use XRSTOR and XSAVE from the same CPL using the same linear
   address for the store area
2. Contrary to the recommendations, we cannot zero the FPU save area
   for a new thread, since fork semantic requires the copy of the
   previous state. This advice seemingly contradicts to the advice
   from the item 6.
3. We do use XSAVEOPT in the context switch code only, and the area
   for XSAVEOPT already always contains the data saved by XSAVE.
4. We do not modify the save area between XRSTOR, when the area is
   loaded into FPU context, and XSAVE. We always spit the fpu context
   into save area and start emulation when directly writing into FPU
   context.
5. We do not use segmented addressing to access save area, or rather,
   always address it using %ds basing.
6. XSAVEOPT can be only executed in the area which was previously
   loaded with XRSTOR, since context switch code checks for FPU use by
   outgoing thread before saving, and thread which stopped emulation
   forcibly get context loaded with XRSTOR.
7. The PCB cannot be paged out while FPU emulation is turned off, since
   stack of the executing thread is never swapped out.

The context switch code is patched to issue XSAVEOPT instead of XSAVE
if supported. This approach eliminates one conditional in the context
switch code, which would be needed otherwise.

For user-visible machine context to have proper data, fpugetregs()
checks for unsaved extension blocks and manually copies pristine FPU
state into them, according to the description provided by CPUID leaf
0xd.

MFC after:  1 month
2012-07-14 15:48:30 +00:00
Adrian Chadd
7e3fc039f6 Fix build breakage when one isn't building with IEEE80211_SUPPORT_SUPERG.
Noticed by:	mav
2012-07-14 12:15:20 +00:00
Adrian Chadd
2e7620b6d2 Merge in some other features from the legacy RX path:
* wrap the RX proc calls in the RX refcount;
* call the DFS checking, fast frames staging and TX rescheduling if
  required.

TODO:

* figure out if I can just make "do TX rescheduling" mean "schedule
  TX taskqueue" ?
2012-07-14 07:56:47 +00:00
Warner Losh
f5dca533c2 Add preliminary support for Atmel SAM9260-EK evaluation kit.
Initially identical to the Ethernut5, but will diverge shortly before
I refactor...
2012-07-14 06:13:23 +00:00
Warner Losh
2f35297b24 uboot should be telling us it is an ETHERNUT5 for this board. Tag it
as such.
2012-07-14 06:00:37 +00:00
Adrian Chadd
9a5a667da4 Make sure that 'rs' is pointing to the correct RX status. 2012-07-14 05:53:03 +00:00
Adrian Chadd
b5b60f35b7 Ensure that error is set.
Noticed by:	rui
2012-07-14 05:51:54 +00:00
Warner Losh
a81c202d81 Create common routines for configuring the serial ports and use them
on all the at91rm9200 boards.
2012-07-14 05:46:52 +00:00
Matt Jacob
3d4e15d43e The call to disk_resize causes a panic if DIAGNOSTIC is set.
Coping with that while the finest minds of our generation
figure out why.
2012-07-14 02:59:11 +00:00
Adrian Chadd
0b59717b4b Change the RX EDMA path to first complete the FIFO, then re-populate it
with fresh descriptors, before handling the frames.

Wrap it all in the RX locks.

Since the FIFO is very shallow (16 for HP, 128 for LP) it needs to be
drained and replenished very quickly.  Ideally, I'll eventually move this
RX FIFO drain/fill into the interrupt handler, only deferring the actual
frame completion.
2012-07-14 02:52:48 +00:00
Adrian Chadd
8d467c41b0 Don't free the descriptor allocation/map if it doesn't exist.
I missed this in my previous commit.
2012-07-14 02:47:16 +00:00
Adrian Chadd
2fe91baa92 Create an RX queue lock.
Ideally these locks would go away and there'd be a single driver lock,
like what iwn(4) does.  I'll worry about that later.
2012-07-14 02:22:17 +00:00
Adrian Chadd
39abbd9bd2 Fix EDMA RX to actually work without panicing the machine.
I was setting up the RX EDMA buffer to be 4096 bytes rather than the
RX data buffer portion.  The hardware was likely getting very confused
and DMAing descriptor portions into places it shouldn't, leading to
memory corruption and occasional panics.

Whilst here, don't bother allocating descriptors for the RX EDMA case.
We don't use those descriptors. Instead, just allocate ath_buf entries.
2012-07-14 02:07:51 +00:00
Devin Teske
d35c4b1d44 Fix domain.
Approved by:	emaste
2012-07-14 01:45:35 +00:00
John Baldwin
2919668490 Make the interval timings for EVFILT_TIMER more accurate. tvtohz() always
adds an extra tick to account for the current partial clock tick.  However,
that is not appropriate for a repeating timer when the exact tvtohz() value
should be used for subsequent intervals.  Fix repeating callouts for
EVFILT_TIMER by subtracting 1 tick from the tvtohz() result similar to the
fix used in realitexpire() for interval timers.

While here, update a few comments to note that if the EVFILT_TIMER code
were to move out of kern_event.c, it should move to kern_time.c (where the
interval timer code it mimics lives) rather than kern_timeout.c.

MFC after:	1 month
2012-07-13 13:24:33 +00:00
Andriy Gapon
d30b88af05 acpi_cpu: separate a notion of current deepest allowed+available Cx level
... from a user-set persistent limit on the said level.
Allow to set the user-imposed limit below current deepest available level
as the available levels may be dynamically changed by ACPI platform
in both directions.
Allow "Cmax" as an input value for cx_lowest sysctls to mean that there
is not limit and OS can use all available C-states.
Retire global cpu_cx_count as it no longer serves any meaningful
purpose.

Reviewed by:	jhb, gianni, sbruno
Tested by:	sbruno, Vitaly Magerya <vmagerya@gmail.com>
MFC after:	2 weeks
2012-07-13 08:11:55 +00:00
Warner Losh
1221371f4a For our at91rm9200 boards, register which subtype of SoC is on the
board.  We'll use this later to control the differences between these
two variants' pins.
2012-07-13 04:22:08 +00:00
Alan Cox
b9592bdab3 Wring a few cycles out of pmap_enter(). In particular, on a user-space
pmap, avoid walking the page table twice.
2012-07-13 04:10:41 +00:00
Jung-uk Kim
1f13597d10 Merge OpenSSL 1.0.1c.
Approved by:	benl (maintainer)
2012-07-12 19:30:53 +00:00
Warner Losh
bc52deb7a9 This file is no longer AT91RM9200 specific, but now is generic to all
Atmel AT91 SoC's we support.  Rename to reflect that.
2012-07-12 19:15:38 +00:00
Warner Losh
1c882be4bc Remember where we found the DBGU and use that for our console. 2012-07-12 19:11:37 +00:00
Warner Losh
097047f652 Fix whitespace divot. 2012-07-12 13:54:24 +00:00
Warner Losh
a68d1f48b9 Complete the transition away from newbus to populate the children to
the linker set of CPU modules.  The newbus method, although clever,
had many flaws: it didn't really support multiple SoC, many of the
comments about order were just wrong, and it did a few things far too
late to be useful.  delay and cpu_reset now work much earlier in the
boot process.
2012-07-12 13:45:58 +00:00
Christian Brueffer
97ab227579 Add and utilize defines for the ATA device register.
PR:		169764
Submitted by:	Steven Hartland <steven.hartland@multiplay.co.uk>
Reviewed by:	mav
MFC after:	2 weeks
2012-07-12 10:09:34 +00:00
Warner Losh
7f6eecf580 Create the children devices for the SoC in atmelarm bus node, not in
the identify routine of the CPU.
2012-07-12 04:23:11 +00:00
Warner Losh
0fb8b6b070 Export the interrupt status vector via soc_data. Set the interrupt
priorities in the AIC in the atmelarm driver before attaching the
children.  Delete redunant copies of the code.
2012-07-12 02:58:45 +00:00
Christian Brueffer
af01090551 Apply similar same change as in r238379:
Renamed the kern.cam.ada.ada_send_ordered sysctl and tunable to
kern.cam.ada.send_ordered, more in line with the other da sysctls/tunables.

Suggested by:	kib
2012-07-11 23:22:09 +00:00