Commit Graph

97982 Commits

Author SHA1 Message Date
Nathan Whitehorn
1c6c63fc6a Revert to FAT12. This file system is apparently too small for FAT32, even
if the old (pre r264889) newfs_msdos allowed it. And FAT12 seems to work
perfectly well.
2014-04-27 00:45:08 +00:00
Ian Lepore
daa963252e Use logical rather than bitwise OR in if() expression. 2014-04-26 23:22:49 +00:00
Ian Lepore
75c95895f5 Call cpu_icache_sync_range() rather than sync_all since we know the range
and flushing the entire icache is needlessly expensive.
2014-04-26 23:09:01 +00:00
Alexander V. Chernikov
f59c6cb0fc Remove useless `register' declarations.
MFC after:	1 month
2014-04-26 22:42:21 +00:00
Neel Natu
63c9389af6 A VMCS is always inactive when it exits the vmx_run() loop.
Remove redundant code and the misleading comment that suggest otherwise.

Reviewed by:	grehan@
2014-04-26 22:37:56 +00:00
Alexander V. Chernikov
773aa0533b Determine fibnum once in the beginning of route_output().
MFC after:	1 month
2014-04-26 22:32:04 +00:00
Alexander V. Chernikov
c77462dd64 Decouple RTM_CHANGE from RTM_GET handling in rtsock.c:route_output().
RTM_CHANGE is now handled inside route.c:rtrequest1_fib() as it should be.
Note change change handler is a separate function rtrequest1_fib_change().

MFC after:	1 month
2014-04-26 21:03:41 +00:00
Ian Lepore
49d0a4c3ff Reword a comment block a bit; no functional changes. 2014-04-26 20:27:58 +00:00
Scott Long
60ad8150c7 Retire smp_active. It was racey and caused demonstrated problems with
the cpufreq code.  Replace its use with smp_started.  There's at least
one userland tool that still looks at the kern.smp.active sysctl, so
preserve it but point it to smp_started as well.

Discussed with: peter, jhb
MFC after: 3 days
Obtained from: Netflix
2014-04-26 20:27:54 +00:00
Ian Lepore
2d40ec16a8 Flesh out imx_uart_init() so that we're not relying on u-boot to init
the hardware (meaning uarts other than the console will work).
2014-04-26 20:03:04 +00:00
Andreas Tobler
269aedcff5 Fix gcc build, initialize off variable. 2014-04-26 19:30:04 +00:00
Ian Lepore
a90f19753f The freescale imx uart driver works for the whole i.MX family, so rename the
header file to not have "5xx" in the name.
2014-04-26 17:56:39 +00:00
Nathan Whitehorn
8f6580d808 Apparently this is supposed to be FAT32, not FAT12. 2014-04-26 17:51:41 +00:00
Ian Lepore
a7fa939bb3 Stop calling imx51_ccm_foo() clock functions from imx6 code. Instead
define a few imx_ccm_foo() functions that are implemented by the imx51 or
imx6 ccm code.  Of course, the imx6 ccm code is still more a wish than
reality, so for now its implementations just return hard-coded numbers.
2014-04-26 16:48:09 +00:00
Alexander V. Chernikov
cf58751a44 Use "hash" value in rtalloc_mpath_fib() instead of RTF_ANNOUNCE flag.
Hashing method is the same as in in6_src.c. (Probably we need better one).

MFC after:	2 weeks
2014-04-26 16:46:33 +00:00
Nathan Whitehorn
e9bee2c689 Add generation of an EFI filesystem to hold boot1.efi. This is a near-exact
copy of the code from boot1.chrp again.

The resulting image is installed to /boot/boot1.efifat. If dd'ed to an 800K
"efi" partition, it should result in a bootable system.
2014-04-26 16:34:22 +00:00
Alexander V. Chernikov
36d55f0f9d Unify sa_equal() macro usage.
MFC after:	2 weeks
2014-04-26 14:52:03 +00:00
Kevin Lo
11a4d354a2 Initialize rssi variable. 2014-04-26 14:39:58 +00:00
Mark Murray
169050a030 Correctly set the sysctl format to Alphanumeric, rather than letting it default.
Approved by: security-officer(des)
2014-04-26 13:21:28 +00:00
Dag-Erling Smørgrav
612032773a Add sysctl OIDs showing the actual size and capacity of the swap zone.
MFC after:	1 week
2014-04-26 12:18:17 +00:00
Mikolaj Golub
8a477d48e0 Define startup order the same way as it is in dummynet. 2014-04-26 08:05:16 +00:00
Glen Barber
8be1b6d975 Add a UEFI kernel configuration to include the VT kernel, and
replace the vt_vga driver with vt_efifb.

This is intended to help with snapshot builds only.

There is no intention to MFC this commit.

Sponsored by:	The FreeBSD Foundation
2014-04-25 21:47:24 +00:00
Ian Lepore
0a34210d99 The FTDI product ID we've been calling BEAGLEBONE is actually TI XDS100V2,
a jtag debugging product, which was used on early Beaglebone boards (later
boards used a standard FTDI 2232C product ID).  Change the name accordingly,
and also add an entry for XDS100V3, the latest version of that product
which has its own new product ID number.
2014-04-25 19:47:27 +00:00
Warner Losh
98407b8bc2 Spell NO_PROFILE= as MK_PROFILE=no. 2014-04-25 19:25:26 +00:00
Warner Losh
a58f61bf3a Eliminate last vestigies of NO_MAN= in the tree. Also, remove
ineffectual NOMAN= lines. These don't change the build at all.
2014-04-25 19:25:05 +00:00
Ian Lepore
74855db616 Remove device type from the uftdi_devs table, enhance the jtag-skip feature.
Device type and revision is now determined from the bcdDevice field and
doesn't need to be in the table at all.  The feature that skips creation
of /dev/ttyU* entries for jtag and gpio interfaces is enhanced:

 - The feature is now optional, but enabled by default.  A tunable and
   sysctl are available to control it: hw.usb.uftdi.skip_jtag_interfaces.
 - We no longer assume interface #0 is the only jtag interface.  Up to
   eight interfaces per chip can be flagged as jtag.  (Current ftdi chips
   support a max of 4 interfaces; this leaves room for growth.)
 - Some manufacturers don't change the product ID or use the same ID for
   different devices intended for both serial-comms and jtag/gpio use.
   Often while the product ID is the same, the product name string is
   different, so it's now possible to search for the product name in a
   table of strings and get the set of non-tty interfaces from that table.
2014-04-25 19:13:57 +00:00
Gleb Smirnoff
53f4b0cf9b The current API for adding rules with pool addresses is the following:
- DIOCADDADDR adds addresses and puts them into V_pf_pabuf
- DIOCADDRULE takes all addresses from V_pf_pabuf and links
  them into rule.

The ugly part is that if address is a table, then it is initialized
in DIOCADDRULE, because we need ruleset, and DIOCADDADDR doesn't
supply ruleset. But if address is a dynaddr, we need address family,
and address family could be different for different addresses in one
rule, so dynaddr is initialized in DIOCADDADDR.

This leads to the entangled state of addresses on V_pf_pabuf. Some are
initialized, and some not. That's why running pf_empty_pool(&V_pf_pabuf)
can lead to a panic on a NULL table address.

Since proper fix requires API/ABI change, for now simply plug the panic
in pf_empty_pool().

Reported by:	danger
2014-04-25 11:36:11 +00:00
Kevin Lo
28bc7834e0 Add preliminary support for the Realtek RTL8188EUS and RTL8188ETV chipsets.
Committed over the TP-LINK TL-WN725N v2 (RTL8188EUS) on amd64 with WPA.
2014-04-25 08:01:22 +00:00
Adrian Chadd
f3b04ec629 Add a SLEEP->SCAN transition. Without this a disassociate or scan
request during SLEEP results in a hang.

Whilst I'm here, add in some disabled code that will transition to RUN
if there's multicast traffic.  It's not needed for Atheros hardware but
it may be for other hardware.

Tested:

* AR5416, STA mode (powersave)
* AR5212, STA mode (powersave)
2014-04-25 01:20:10 +00:00
Alan Somers
0cfee0c223 Fix subnet and default routes on different FIBs on the same subnet.
These two bugs are closely related.  The root cause is that ifa_ifwithnet
does not consider FIBs when searching for an interface address.

sys/net/if_var.h
sys/net/if.c
	Add a fib argument to ifa_ifwithnet and ifa_ifwithdstadddr.  Those
	functions will only return an address whose interface fib equals the
	argument.

sys/net/route.c
	Update calls to ifa_ifwithnet and ifa_ifwithdstaddr with fib
	arguments.

sys/netinet/in.c
	Update in_addprefix to consider the interface fib when adding
	prefixes.  This will prevent it from not adding a subnet route when
	one already exists on a different fib.

sys/net/rtsock.c
sys/netinet/in_pcb.c
sys/netinet/ip_output.c
sys/netinet/ip_options.c
sys/netinet6/nd6.c
	Add RT_DEFAULT_FIB arguments to ifa_ifwithdstaddr and ifa_ifwithnet.
	In some cases it there wasn't a clear specific fib number to use.
	In others, I was unable to test those functions so I chose
	RT_DEFAULT_FIB to minimize divergence from current behavior.  I will
	fix some of the latter changes along with PR kern/187553.

tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
tests/sys/netinet/Makefile
	Revert r263738.  The udp_dontroute test was right all along.
	However, bugs kern/187550 and kern/187553 cancelled each other out
	when it came to this test.  Because of kern/187553, ifa_ifwithnet
	searched the default fib instead of the requested one, but because
	of kern/187550, there was an applicable subnet route on the default
	fib.  The new test added in r263738 doesn't work right, however.  I
	can verify with dtrace that ifa_ifwithnet returned the wrong address
	before I applied this commit, but route(8) miraculously found the
	correct interface to use anyway.  I don't know how.

	Clear expected failure messages for kern/187550 and kern/187552.

PR:		kern/187550
PR:		kern/187552
Reviewed by:	melifaro
MFC after:	3 weeks
Sponsored by:	Spectra Logic
2014-04-24 23:56:56 +00:00
Brooks Davis
e13aabb24f Fix beri_simplebus probing. It's not allowed to have two modules on the
same bus with the same name.

Tweak the description so it's clear the BERI version attached.

Sponsored by:	DARPA, AFRL
2014-04-24 23:28:09 +00:00
Adrian Chadd
1b74d2a4ad Modify the ioctl path to support querying things if the vap state is
SLEEP rather than RUN.

Without this things like 'ifconfig wlan0 list sta' don't work when the
NIC is power save.

Tested:

* AR5212, STA mode (with powersave)
* AR5416, STA mode (with powersave)
2014-04-24 23:12:40 +00:00
Adrian Chadd
db23679569 Fix the AR5211 power mode tracking stuff.
Tested:

* AR5211, STA mode
2014-04-24 23:11:36 +00:00
Adrian Chadd
9b34359b11 Fix the AR5210 HAL code to store the association ID and restore it
upon reset.

Tested:

* AR5210, STA mode
2014-04-24 23:11:18 +00:00
Adrian Chadd
151e9d2bb6 Fix ah_powerMode to be set at the correct place for the AR5210.
Tested:

* AR5210, STA mode
2014-04-24 23:10:24 +00:00
Brooks Davis
2ef3c88e4b Merge from CheriBSD:
commit 003649d962
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Wed Feb 5 18:32:09 2014 +0000

    Teach the FreeBSD/beri boot to "auto-detect" whether argument 4 (a3) is a
    memory size of pointer to a struct bootinfo * by looking at its value and
    seeing whether it is pointer-like.  If a pointer, assume it's a bootinfo
    and extract memsize from it instead; otherwise, use it as memsize directly.
    This allows kernels to support bootinfo being passed by loader (and boot2)
    while still supporting older Miniboot setups.

commit f7045af9a1
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Thu Feb 6 13:45:34 2014 +0000

    When the module metadata pointer is available from loader, use it in the
    kernel.

commit 52e0e1ff2c
Author: Robert N. M. Watson <robert.watson@cl.cam.ac.uk>
Date:   Thu Feb 6 19:57:48 2014 +0000

    In the BERI kernel boot code, extract 'boothowto' (which includes boot flags
    such as '-s') and 'envp' from passed module data.  Booting to single-user
    mode using boot flags now works.

Sponsored by:	DARPA, AFRL
2014-04-24 22:28:53 +00:00
Warner Losh
0c11b05b3f More like gone in 11... 2014-04-24 21:17:48 +00:00
Rick Macklem
3c53f923dc The PR reported that the old NFS server did not set uio_td == NULL
for the VOP_READ() call. This patch fixes both the old and new
server for this case.

PR:		185232
Submitted by:	PR had patch for old server
Reviewed by:	kib
MFC after:	2 weeks
2014-04-24 20:47:58 +00:00
Alan Somers
0489b8916e Fix host and network routes for new interfaces when net.add_addr_allfibs=0
sys/net/route.c
	In rtinit1, use the interface fib instead of the process fib.  The
	latter wasn't very useful because ifconfig(8) is usually invoked
	with the default process fib.  Changing ifconfig(8) to use setfib(2)
	would be redundant, because it already sets the interface fib.

tests/sys/netinet/fibs_test.sh
	Clear the expected ATF failure

sys/net/if.c
	Pass the interface fib in calls to rtrequest1_fib and rtalloc1_fib

sys/netinet/in.c
sys/net/if_var.h
	Add a fibnum argument to ifa_switch_loopback_route, a subroutine of
	in_scrubprefix.  Pass it the interface fib.

PR:		kern/187549
Reviewed by:	melifaro
MFC after:	3 weeks
Sponsored by:	Spectra Logic Corporation
2014-04-24 17:23:16 +00:00
Alexander Motin
08a7cce543 Remove limits on size of READ/WRITE operations.
Instead of allocating up to 16MB or RAM at once to handle whole I/O,
allocate up to 1MB at a time, but do multiple ctl_datamove() and storage
I/Os if needed.
2014-04-24 16:19:49 +00:00
Steven Hartland
c2b2c5fc76 Eliminate duplicate checks in vdev_geom_io_intr error handling
MFC after:	1 month
2014-04-24 15:36:00 +00:00
Alexander Motin
acf5bea460 Make CAM target CTL frontend respect SIM I/O size limitations.
If datamove size is bigger then SIM can handle, or it has more segments
then this code can handle -- split it into several CTIO requests.
2014-04-24 15:16:26 +00:00
Steven Hartland
1ddd62d0a9 Remove duplicate SYSCTL_DECL(_debug_acpi) which was breaking tinderbox
MFC after:	2 weeks
X-MFC-With: r264849
2014-04-24 14:58:12 +00:00
Roger Pau Monné
df983f1d06 xen: fix copyright header
Some of the code in xen-locore.S was picked from Cherry G. Mathew
amd64 Xen PV branch, but I've failed to set the proper copyright, so
do it now.

Approved by: gibbs
2014-04-24 14:44:42 +00:00
Edward Tomasz Napierala
a7f6a46874 Modify CTL iSCSI frontend to properly handle situations where datamove
routine is called multiple times per SCSI task.

Sponsored by:	The FreeBSD Foundation
2014-04-24 12:54:35 +00:00
Steven Hartland
ae19083248 Fix jailed raw sockets not setting the correct source address by
calling in_pcbladdr instead of prison_get_ip4

MFC after:	1 month
2014-04-24 12:52:31 +00:00
Steven Hartland
802d215dc1 Increase ACPI_MAX_TASKS to be 4 x the number of CPU's as 2 x was still
insufficient on some machines

MFC after:	2 weeks
2014-04-24 12:38:07 +00:00
Bryan Venteicher
afd5e40ee0 Wait for the callout to finish before unloading the module
MFC after:	3 days
2014-04-24 05:04:54 +00:00
Kevin Lo
d0cc98c0b1 Fix panic by adding mtx_assert() to urtwn_init_locked() and
urtwn_stop_locked().

Tested by:	Anthony Jenkins <scoobi_doo at yahoo dot com>
2014-04-24 03:16:47 +00:00
Adrian Chadd
902840a5db Begin fleshing out support for net80211 provided (legacy) sleep management.
This transitions the VAP in and out of SLEEP state based on:

* whether there's been an active transmission in the last (hardcoded) 500ms;
* whether the TIM from the AP indicates there is data available.

It uses the beacon reception to trigger the active traffic check.
This way there's no further timer running to wake up the CPU
from its own sleep states.

Right now the VAP isn't woken up for multicast traffic - mostly because
the only NIC I plan on doing this for right will auto wakeup and stay
awake for multicast traffic indicated in the TIM.  So I don't have
to manually keep the hardware awake.

This doesn't do anything if the NIC doesn't advertise it implements
the new SWSLEEP capability AND if the VAP doesn't have powersave
enabled.

It also doesn't do much with ath(4) as it doesn't currently implement
the SLEEP state.

Tested:

* AR5416, STA mode (with local ath(4) changes)
2014-04-24 01:39:53 +00:00