Commit Graph

165793 Commits

Author SHA1 Message Date
Jayachandran C.
29a99755a9 FDT support for MIPS.
Add architecture specific files needed to compile MIPS with
flattened device tree support.
2011-10-18 07:29:21 +00:00
Dag-Erling Smørgrav
e141be6f79 Revisit the capability failure trace points. The initial implementation
only logged instances where an operation on a file descriptor required
capabilities which the file descriptor did not have.  By adding a type enum
to struct ktr_cap_fail, we can catch other types of capability failures as
well, such as disallowed system calls or attempts to wrap a file descriptor
with more capabilities than it had to begin with.
2011-10-18 07:28:58 +00:00
Adrian Chadd
2c0dd4bbe4 Add in a currently-disabled WAR for PCI NICs.
Some earlier series (~AR5212?) play badly with BIOSes.

In these instances, they may require a forced reset (by transitioning
the NIC through D0 -> D3 -> D0) before they probe/attach correctly.

This is currently disabled because:

* I haven't figured out the "right" code to ensure this only happens
  for PCI NICs (not PCIe or Cardbus);
* I haven't at all done wide scale testing for this, and I'm not yet
  ready for said wide-scale testing.

I'm documenting this primarily so users with misbehaving NICs have
something to tinker with.

Obtained from:	Atheros
2011-10-18 03:32:18 +00:00
Adrian Chadd
65d1eb9443 Add a WAR from the reference code - clear the PCI error status
upon detach.

Obtained from:	Atheros
2011-10-18 03:24:17 +00:00
Adrian Chadd
0cbbe87008 Port over some missing code from the ar5212 reference driver reset path.
The final missing bit here is enabling the PCI configuration register
read, but there's currently no glue available for the HAL to read (and
write) PCI configuration space registers.

Obtained from:	Atheros
2011-10-18 03:17:06 +00:00
Adrian Chadd
46614948dd Implement the first part of the BB read workaround.
The AR5008/AR9001 series NICs have a bug where BB register reads
will occasionally be corrupted. This could cause issues with things
such as ANI, which adjust operational parameters based on the
BB radio register reads. This was introduced in the AR5008 chip
and fixed with the first released AR9002 series NIC (AR9280v2.)

A followup commit will implement the acutal WAR when reading
BB registers. I'm still not sure how I'll implement it - whether
it should be done in the osdep layer, or whether it should just
live in the AR5416 HAL. Either way, they can use this capability
bit to determine whether to implement the WAR or not.

Thankyou to various sources inside Atheros who have helped me track
down what this particular issue is.

Obtained from:	Atheros
2011-10-18 03:01:41 +00:00
Adrian Chadd
31a47d8c14 Add in OS_REG_BIT_SET, a macro which does what it says it does.
This will be used in an upcoming commit to the ar5212 HAL.
2011-10-18 02:46:26 +00:00
Adrian Chadd
3f3087fd02 Include opt_ah.h when compiling the driver.
There are HAL methods which are actually direct register
access, rather than simply HAL calls. Because of this, these
register accesses would use the non-debug path in ah_osdep.h
as opt_ah.h isn't included.

With this, the correct register access methods are used,
so debugging traces show things such as TXDP checking and
TSF32 access.
2011-10-18 02:43:59 +00:00
Xin LI
4aadb12e0b Fix a bug in sa_find_sizes() which could lead to panic:
When calculating space needed for SA_BONUS buffers,
hdrsize is always rounded up to next 8-aligned boundary.
However, in two places the round up was done against
sum of 'total' plus hdrsize.  On the other hand,
hdrsize increments by 4 each time, which means in
certain conditions, we would end up returning with
will_spill == 0 and (total + hdrsize) larger than
full_space, leading to a failed assertion because
it's invalid for dmu_set_bonus.

Sponsored by:	iXsystems, Inc.
Reviewed by:	mm
MFC after:	3 days
2011-10-17 22:23:27 +00:00
Eitan Adler
6b15a26aa6 - remove device keyword from makefs manpage
PR:		docs/144408
Submitted by:	gcooper
Approved by:	gjb
Approved by:	sahil (mentor)
MFC after:	1 week
2011-10-17 21:31:03 +00:00
Pyun YongHyeon
965706387b Make sure to report media change status to caller. Previously it
always reported success.
2011-10-17 20:03:38 +00:00
Pyun YongHyeon
0ae9f6a9f3 Add missing driver lock in media status handler. 2011-10-17 19:58:34 +00:00
Pyun YongHyeon
e9e549ef70 Close a race where SIOCGIFMEDIA ioctl get inconsistent link status.
Because driver is accessing a common MII structure in
mii_pollstat(), updating user supplied structure should be done
before dropping a driver lock.

Reported by:	Karim (fodillemlinkarimi <> gmail dot com)
2011-10-17 19:51:38 +00:00
Pyun YongHyeon
57c81d92ae Close a race where SIOCGIFMEDIA ioctl get inconsistent link status.
Because driver is accessing a common MII structure in
mii_pollstat(), updating user supplied structure should be done
before dropping a driver lock.

Reported by:	Karim (fodillemlinkarimi <> gmail dot com)
2011-10-17 19:49:00 +00:00
Ed Schouten
a906bdb04d Fix whitespace. 2011-10-17 19:40:26 +00:00
Xin LI
4783373497 Return BUS_PROBE_DEFAULT instead of 0 (BUS_PROBE_SPECIFIC), allowing
vendor provided driver to override in kernel driver.

MFC after:	3 days
2011-10-17 19:21:42 +00:00
Dimitry Andric
db53c95fc8 Update llvm/clang's target triple (confusingly named LLVM_HOSTTRIPLE) to
$arch-unknown-freebsd10.0.
2011-10-17 18:30:18 +00:00
Hans Petter Selasky
6a3b2e7773 Make the usbdump utility work again by using the correct BPF structures.
MFC after:	3 days
2011-10-17 15:54:20 +00:00
Stefan Eßer
8d68b75b54 Add missing default values for daily/800.scrub-zfs for documentation
purposes. No functional change, since all parameters are set to their
default values.
MFC after:	1 week
2011-10-17 14:37:24 +00:00
Stefan Eßer
3efd8ccdb5 Fix error message in case the backup storage directory does not exist and
cannot be created ($daily_backup_pkgdb_dbdir -> $daily_backup_pkgdb_dir).
MFC after:	1 week
2011-10-17 14:33:41 +00:00
Adrian Chadd
a05e382c09 Don't enable the PHY radar errors in calcrxfilter.
That way the radar errors aren't enabled prematurely.

A DFS tester has reported that radar events are reported
during channel scanning, before DFS is actually enabled.
2011-10-17 14:17:37 +00:00
Ed Schouten
2a5e51fa7b Sort header file names.
Spotted by:	des
2011-10-17 13:54:55 +00:00
Bjoern A. Zeeb
8797cafe81 Fix build after r226465.
Cast void * to char * for arithmetics and make function return "no error".

MFC after:	3 days
2011-10-17 13:51:00 +00:00
Jayachandran C.
af6edc2854 FDT changes for 64 bit kernel
Use the offset into the device tree from fdtp as the phandle instead
of using pointer into the device tree.  This will make sure that the
phandle fits into a uint32_t type, even when compiled for 64bit.

Reviewed by:	raj, nathanw, marcel
2011-10-17 13:44:33 +00:00
Adrian Chadd
65d7e4d9f1 Fix an issue with 11g beacon frames which looks to be a limitation
on the largest multi-write size.

From the submitter:

==
I looked further into the magic 88-byte threshold after which the bug
occurs.  It turns out that figure included the 24-byte tx_desc, and up
to 64 bytes of beacon frame (header+data).

rum_write_multi doesn't seem happy with writing >64 bytes at a time to
the MAC register.  If I break it up into separate calls (e.g. bytes
0-63, then bytes 64-65, written at the appropriate offset) I see the
proper beacon frames being transmitted now.
==

Submitted by:	Steven Chamberlain <steven@pyro.eu.org>
MFC after:	3 days
2011-10-17 13:12:47 +00:00
Dag-Erling Smørgrav
32ca8e078d The rc_force test was inverted in the previous commit, so that dhclient ran
for interfaces which were not configured for DHCP *unless* rc_force was set;
the correct logic is to run dhclient for those interfaces *only if* rc_force
is set.

Broken by:	des@
Noticed by:	everybody and his dog
Submitted by:	rea@
PR:		bin/161733
2011-10-17 13:05:57 +00:00
Pawel Jakub Dawidek
bd738d630c Allow to specify pidfile in HAST configuration file.
MFC after:	1 week
2011-10-17 12:22:09 +00:00
Pawel Jakub Dawidek
89da1a23cd Remove redundant space.
MFC after:	1 week
2011-10-17 09:59:04 +00:00
Pawel Jakub Dawidek
6fea20e297 When path to the configuration file is relative, obtain full path,
so we can always find the file, even after daemonizing and changing
working directory to /.

MFC after:	1 week
2011-10-17 09:54:07 +00:00
David Schultz
715a43edd0 It's no longer accurate to say that math.h "constitute[s] the C math
library," since complex.h, tgmath.h, and fenv.h are also part of the
math library.  Replace the outdated sentence with some references to
the other parts.
2011-10-17 06:10:32 +00:00
Jayachandran C.
c0959978ec Fix for crash on MIPS /dev/mem read.
Reading /dev/mem in 64 bit kernel crashes.  This is because the page
used to call uiomove_fromphys() from memrw() does not have md.pv_list
initialized correctly.

The fix is to call pmap_page_init() on the page to initialize it.
2011-10-17 05:42:53 +00:00
David Schultz
3daee1d6c3 Add c{cos,sin,tan}{,h}{,f} functions. This is joint work with
bde and kargl.
2011-10-17 05:41:03 +00:00
Bjoern A. Zeeb
fba0cea143 Add syntactic sugar missed in r226437 and then not added either when moving
things around in r226448 but desperately needed to always make things
compile successfully.

MFC after:	1 week
2011-10-17 00:05:31 +00:00
Qing Li
14417253d8 The code change made in r226040 was incomplete and resulted in
routes such as fe80::1%lo0 no being installed. This patch completes
the original intended fix.

Reviewed by:	hrs, bz
MFC after:	3 days
2011-10-16 22:24:04 +00:00
Marcel Moolenaar
ad4e66a63c Define dtrace_cmpset_long in terms of atomic_cmpset_long
and not by virtue of inline assembly. Now this file
compiles on all supported architectures.
2011-10-16 22:18:08 +00:00
Qing Li
e74eb12c68 The IPv6 code was influx at the time of r196865 due to the L2/L3
separation rewrite changes. r196865 was committed to fix a scope
violation problem in the following test scenario:

  box-1# ifconfig em0 inet6 2001:db8:1:: prefixlen 64 anycast
  box-1# ifconfig em1 inet6 2001:db8:2::1 prefixlen 64

  box-2# ifconfig re0 inet6 2001:db8:1::6 prefixlen 64

  em0 and re0 are on the same link.

  box-2# ping6 2001:db8:1::
  PING6(56=40+8+8 bytes) 2001:db8:1::6 --> 2001:db8:1::

the ICMPv6 response should have a source address of em1, which
is 2001:db8:2::1, not the link-local address of em0.

That code is no longer necessary and breaks the IPv6-Ready logo
testing, so revert it now.

Reviewed by:	hrs
MFC after:	3 days
2011-10-16 22:15:13 +00:00
Pawel Jakub Dawidek
e8cc80c0a0 In pidfile_open(), if the pidfile is locked, but empty (PID is not stored yet)
and the caller requested other process' PID by passing non-NULL pidptr
argument, we will wait at most 100ms for the PID to show up in the file and if
it won't, we will store -1 in *pidptr.

From now on, pidfile_open() function never sets errno to EAGAIN on failure.

In collaboration with:	des
MFC after:		1 week
2011-10-16 21:30:15 +00:00
Nathan Whitehorn
b6faf3cfdb Add support for special keys (volume/brightness/eject) on Apple laptops with
ADB keyboards.

Submitted by:	Justin Hibbits <jrh29 at alumni dot cwru dot edu>
MFC after:	9.0-RELEASE
2011-10-16 21:01:42 +00:00
Andre Oppermann
873789cb0f Move the tcp_sendspace and tcp_recvspace sysctl's from
the middle of tcp_usrreq.c to the top of tcp_output.c
and tcp_input.c respectively next to the socket buffer
autosizing controls.

MFC after:	1 week
2011-10-16 20:18:39 +00:00
Andre Oppermann
9ec4a4cca5 Remove the ss_fltsz and ss_fltsz_local sysctl's which have
long been superseded by the RFC3390 initial CWND sizing.

Also remove the remnants of TCP_METRICS_CWND which used the
TCP hostcache to set the initial CWND in a non-RFC compliant
way.

MFC after:	1 week
2011-10-16 20:06:44 +00:00
Hiroki Sato
154d5f7321 Fix a problem that an interface unexpectedly becomes IFF_UP by
just doing "ifconfing inet6 -ifdisabled" when the interface has
ND6_IFF_AUTO_LINKLOCAL flag and no link-local address.
2011-10-16 19:46:52 +00:00
Ed Schouten
d13b008d74 Add missing #include.
Note to myself: don't write patches while watching a movie.
2011-10-16 19:23:43 +00:00
Ed Schouten
d2ea3bed52 Don't cast SIZE_T_MAX to off_t.
I focused so much on the 32-bits case where we have to cast SIZE_T_MAX
up in size, that I forgot about the 64-bits case, where off_t and size_t
are equal in size. Simply cast both numbers to uintmax_t, as we can
assume st_size is never negative.

Reported by:	cperciva
2011-10-16 19:15:25 +00:00
Olivier Houchard
c435dafb84 Fix 2 bugs :
- A race condition could happen if two threads were using RAS at the same time
as the code didn't reset RAS_END, the RAS code could believe we were not in
a RAS, when we were in fact.
- Using signed value logic to compare addresses wasn't such a good idea.

Many thanks to Ian to investigate on these issues.

Pointy hat to: 	cognet
PR:		arm/161498
Submitted by:	Ian Lepore <freebsd At damnhippie DOT dyndns dot org
MFC after:	1 week
2011-10-16 17:59:28 +00:00
Christian Brueffer
04c4548981 Revert r226398 and instead move the allocation of usrbufs after the error check.
Suggested by:	pjd
MFC after:	1 week
2011-10-16 17:38:20 +00:00
Olivier Houchard
b3e11029a7 Explicitely set ARM_RAS_START and ARM_RAS_END once the cacheline or the
page has been allocated, or we could end up using random values, and bad things
could happen.

PR:		arm/161492
Submitted by:	Ian Lepore <freebsd AT damnhippie dot dyndns DOT org>
MFC after:	1 week
2011-10-16 17:37:54 +00:00
Olivier Houchard
10f94f86f5 Unbreak NO_DYNAMICROOT by explicitely linking to libcrypto if MK_OPENSSL isn't
set to no, as libbsnmp needs it.
2011-10-16 16:58:28 +00:00
Nathan Whitehorn
5d920ef704 Place quotes around the output of kbdmap(1), designed to be pasted into
/etc/rc.conf.

PR:		bin/161711
Submitted by:	manolis
MFC after:	1 week
2011-10-16 16:05:23 +00:00
Andre Oppermann
e233e2acb3 VNET virtualize tcp_sendspace/tcp_recvspace and change the
type to INT.  A long is not necessary as the TCP window is
limited to 2**30.  A larger initial window isn't useful.

MFC after:	1 week
2011-10-16 15:08:43 +00:00
Eitan Adler
36daf0495a - change "is is" to "is" or "it is"
- change "the the" to "the"

Approved by:	lstewart
Approved by:	sahil (mentor)
MFC after:	3 days
2011-10-16 14:30:28 +00:00