160429 Commits

Author SHA1 Message Date
weongyo
bb5f1411ee MFC r204662:
Hook up the bwn driver.

  Pointed by: nwhitehorn
2010-04-21 00:15:58 +00:00
weongyo
dab09cce00 MFC r204657:
fixes an attached-at-boot issue that bwn(4) using device_identify
  interface didn't be attached automatically at boot time so changes a
  approach to attach children based on leveraging some newbus niceties.

  Submitted by: nwhitehorn
2010-04-21 00:13:44 +00:00
weongyo
647504d46a MFC r204542:
calculates the integer square root if a positive integer X is larger
  than 256 instead of using sqrt_table.

  Reported by: Joe Marcus Clarke <marcus at freebsd dot org>
2010-04-21 00:06:39 +00:00
weongyo
ec6191490a MFC r204437:
fixes a bug to load firmware images for LP PHY. For LP PHY always,
  `lp_' string is contained in its full image names.
2010-04-21 00:05:22 +00:00
weongyo
560508d9af MFC r204436:
supports the adhoc demo mode that it's tested on modified aircrack-ng
  suite and worked.

  Submitted by:	Paul B Mahol <onemda at gmail dot com>
2010-04-21 00:02:48 +00:00
weongyo
bbcedff557 MFC r204385:
don't need to check BWN_RX_PHYST0_SHORTPRMBL flag because it's already
  handled in later.

  Reported from: imp, nwhitehorn
2010-04-21 00:01:38 +00:00
weongyo
bdb3ff2b4c MFC r204343:
Updates what firmware module should be used for LP (low power) PHY
  users and bumps date.
2010-04-20 23:59:02 +00:00
delphij
32d0c03b86 MFC assembler version of match functions for amd64 and i386(*).
This gives approximately 15% improvement on compression case.

(*) i386 assembler version is enabled ONLY when MACHINE_CPU have
'i686' which is not default on FreeBSD/i386.  One can specify
for instance CPUTYPE=pentium4 in /etc/make.conf to get this
feature.
2010-04-20 22:57:05 +00:00
weongyo
a3b0dae83c MFC r204328:
Add bwn(4) driver.
2010-04-20 22:55:07 +00:00
jilles
5e21e0a12d MFC r203576,r203677: sh: Don't stat() $MAIL/$MAILPATH if not interactive.
These may be NFS mounted, and we should not touch them unless we are going
to do something useful with the information.
2010-04-20 22:52:28 +00:00
delphij
6f29dab875 MFC r205472:
Enable mmap for minigzip(1).
2010-04-20 22:52:13 +00:00
delphij
3c3719239a MFC r206387:
Diff reduction against NetBSD and add myself to AUTHORS section of the
manual page as I wrote the unpack functionality.  No actual executable
code change verified with md5(1).
2010-04-20 22:47:24 +00:00
jilles
e8cd22ad02 MFC r200943: sh: Remove setting variables from dotcmd/exportcmd.
It is already done by evalcommand(), unless special-ness has been removed,
in which case variable assignments should not persist. (These are currently
always special builtins, but this may change later: command builtin,
command substitution.)

This also fixes a memory leak when calling . with variable assignments.

Example:
  valgrind --leak-check=full sh -c 'x=1 . /dev/null; x=2'
2010-04-20 22:32:34 +00:00
jilles
754430692e MFC r199282: sh: Allow a newline before "in" in a for command,
as required by POSIX.
2010-04-20 22:20:31 +00:00
weongyo
e24a574792 MFC r203945:
adds bwn(4) driver man page which missed to be merged.

MFC r204327:
  Connect bwn.4 to the build.
2010-04-20 22:00:56 +00:00
weongyo
36d7db0152 MFC r204326:
Add bwn(4) driver to the build.
2010-04-20 21:55:44 +00:00
weongyo
0e46c88529 MFC r204257:
o adds sysctl variables to show device statistics.
  o records RTS success/fail statistics.

  Pointed by:   imp
2010-04-20 21:52:54 +00:00
weongyo
42010fbb3b MFC r204256:
fixes a compile error; invalid type argument of '->'.
2010-04-20 21:51:45 +00:00
weongyo
3c46d4c2eb MFC r204242:
Fix compilation problems with INVARIANTS.

  # also limit RX decryption attempted messages to 50

  Reviewed by:  weongyo

Approved by:	imp (implicit)
2010-04-20 21:48:48 +00:00
weongyo
f665fd7826 MFC r204081:
o print msgs with length if the frame is too short to pass to
    net80211.
  o print key index for debugging if the frame is attempted to decrypt
    for WEP, AES or TKIP though currently HW decryption isn't supported.
2010-04-20 21:41:43 +00:00
weongyo
c8cdd2e9e8 MFC r203945:
adds bwn(4) driver for supporting Broadcom BCM43xx chipsets.

    o uses v4 firmware instead of v3.  A port will be committed to
      create the bwn firmware module.
    o supports B/G and LP(low power) PHYs.
    o supports 32 / 64 bits DMA operations.
    o tested on big / little endian machines so should work on all
      architectures.

  It'd not connected to the build until the firmware port is committed.
2010-04-20 21:40:09 +00:00
weongyo
fd4bc17e03 MFC r203944:
supports SPROM rev8 informations properly which are used to support
  low-power PHY of bwn(4) and LDO voltage adjustments.
2010-04-20 21:37:47 +00:00
weongyo
4b58911942 MFC r203320:
Hook up the siba_bwn module to the build.
2010-04-20 21:35:48 +00:00
luigi
0241e13792 MFC r206551 (forgotten in previous commit): fix builds with ktr 2010-04-20 21:33:14 +00:00
weongyo
7d044ce8d8 MFC r203319:
Adds siba_bwn module which is used with bwn(4).  Main purpose of this
  module is to distinguish parts of Silicon Backplane and of Broadcom
  Wireless.
2010-04-20 21:29:53 +00:00
weongyo
da3887f848 MFC r201978:
Merge from projects/mips to head by hand:

  Merge the siba bus device.  This was moved from mips to dev because
  siba bus can be in other architectures, like ARM.

MFC r202056:
  Move this to the right location.  Grump.

MFC r202057:
  This was somehow copied to the wrong place :(.  Remove the spare copy.

Approved by:	imp
2010-04-20 21:24:32 +00:00
brucec
58afa96862 MFC r205118:
Free the memory allocated via strdup.

PR:	bin/113881
Submitted by:	Alexander Drozdov (dzal_mail at mtu-net.ru)
Approved by:	rrs (mentor)
2010-04-20 20:24:00 +00:00
brucec
4c4a2c02b8 MFC r205119 and r206056:
Prevent the SIZE field being corrupted when a process allocates more than
2TB.

PR:	bin/129706
Submitted by:	brucec
Approved by: 	rrs (mentor)
2010-04-20 20:19:19 +00:00
brucec
c28b4bb227 MFC r204820:
Install /etc/termcap.small .

PR:	conf/78419
Submitted by:	Eygene A.Ryabinkin <rea at mbslab.kiae.ru>
Approved by:	rrs (mentor)
2010-04-20 18:46:00 +00:00
luigi
be47c154d1 MFC geom_sched code, a geom-based disk scheduling framework. 2010-04-20 15:23:12 +00:00
rpaulo
3849eb12d4 MFC r206427, r206706, r206771:
ubthidhci rc.d script to switch an USB bluetooth dongle from HID to
  HCI mode.
2010-04-20 12:07:16 +00:00
kib
c61b9f564a MFC r206553:
Change printf() calls to uprintf() for sigreturn() and trap() complaints
about inacessible or wrong mcontext, and for dreaded "kernel trap with
interrupts disabled" situation. The later is changed when trap is
generated from user mode (shall never be ?).

Normalize the messages to include both pid and thread name.
2010-04-20 08:19:43 +00:00
rmacklem
1f81936a7f MFC: r206236
Harden the experimental NFS server a little, by adding range
checks on the length of the client's open/lock owner name. Also,
add free()'s for one case where they were missing and would
have caused a leak if NFSERR_BADXDR had been replied. Probably
never happens, but the leak is now plugged, just in case.
2010-04-20 01:25:18 +00:00
edwin
92764da683 MFC of tzdata2010i, r206868
- Marocco does have DST this year between May and August.
- Historical data for Taiwan
- Argentina / San Luis does not do DST this year.
2010-04-19 21:01:24 +00:00
trasz
873795b191 MFC r202971:
Return proper error code.

Found with:	clang
2010-04-19 18:22:21 +00:00
trasz
5ac668e1a4 MFC r196987:
Remove useless variable assignment.
2010-04-19 18:19:59 +00:00
pjd
8c8a9bbe79 MFC r204352:
Fixed static linkage.
2010-04-19 14:23:15 +00:00
pjd
3b71454486 MFC r204080:
Create a directory for hast's examples.
2010-04-19 04:54:34 +00:00
rmacklem
7828626669 MFC: r206170
Harden the experimental NFS server a little, by adding extra checks
in the readdir functions for non-positive byte count arguments.
For the negative case, set it to the maximum allowable, since it
was actually a large positive value (unsigned) on the wire.
Also, fix up the readdir function comment a bit.
2010-04-18 22:51:15 +00:00
pjd
7c91ad920c MFC r203504,r204067,r204073,r204101,r204804,r205079,r205080,r205132,r205133,
r205134,r205231,r205253,r205264,r205346,r206051,r206667,r206792,r206793,
    r206794,r206795,r206796,r206797:

r203504:

Open provider for writting when we find the right one. Opening too much
providers for writing provokes huge traffic related to taste events send
by GEOM on close. This can lead to various problems with opening GEOM
providers that are created on top of other GEOM providers.

Reorted by:	Kurt Touet <ktouet@gmail.com>, mr
Tested by:	mr, Baginski Darren <kickbsd@ya.ru>

r204067:

Update comment. We also look for GPT partitions.

r204073:

Add tunable and sysctl to skip hostid check on pool import.

r204101:

Don't set f_bsize to recordsize. It might confuse some software (like squid).

Submitted by:	Alexander Zagrebin <alexz@visp.ru>

r204804:

Remove racy assertion.

Reported by:	Attila Nagy <bra@fsn.hu>
Obtained from:	OpenSolaris, Bug ID 6827260

r205079:

Remove bogus assertion.

Reported by:	Johan Ström <johan@stromnet.se>
Obtained from:	OpenSolaris, Bug ID 6920880

r205080:

Force commit to correct Bug ID:

Obtained from:	OpenSolaris, Bug ID 6920880

r205132:

Don't bottleneck on acquiring the stream locks - this avoids a massive
drop off in throughput with large numbers of simultaneous reads

r205133:

fix compilation under ZIO_USE_UMA

r205134:

make UMA the default allocator for ZFS buffers - this avoids
a great deal of contention in kmem_alloc

r205231:

- reduce contention by breaking up ARC state locks in to 16 for data
  and 16 for metadata
- export L2ARC tunables as sysctls
- add several kstats to track L2ARC state more precisely
- avoid holding a contended lock when atomically incrementing a
  contended counter (no lock protection needed for atomics)

r205253:

use CACHE_LINE_SIZE instead of hardcoding 128 for lock pad

pointed out by Marius Nuennerich and jhb@

r205264:

- cache line align arcs_lock array (h/t Marius Nuennerich)
- fix ARCS_LOCK_PAD to use architecture defined CACHE_LINE_SIZE
- cache line align buf_hash_table ht_locks array

r205346:

The same code is used to import and to create pool.
The order of operations is the following:
1. Try to open vdev by remembered path and guid.
2. If 1 failed, try to find vdev which guid matches and ignore the path.
3. If 2 failed this means either that the vdev we're looking for is gone
   or that pool is being created and vdev doesn't contain proper guid yet.
   To be able to handle pool creation we open vdev by path anyway.

Because of 3 it is possible that we open wrong vdev on import which can lead to
confusions.

The solution for this is to check spa_load_state. On pool creation it will be
equal to SPA_LOAD_NONE and we can open vdev only by path immediately and if it
is not equal to SPA_LOAD_NONE we first open by path+guid and when that fails,
we open by guid. We no longer open wrong vdev on import.

r206051:

IOCPARM_MAX defines maximum size of a structure that can be passed
directly to ioctl(2). Because of how ioctl command is build using _IO*()
macros we have only 13 bits to encode structure size. So the structure
can be up to 8kB-1.

Currently we define IOCPARM_MAX as PAGE_SIZE.

This is IMHO wrong for three main reasons:

1. It is confusing on archs with page size larger than 8kB (not really
   sure if we support such archs (sparc64?)), as even if PAGE_SIZE is
   bigger than 8kB, we won't be able to encode anything larger in ioctl
   command.

2. It is a waste. Why the structure can be only 4kB on most archs if we
   have 13 bits dedicated for that, not 12?

3. It shouldn't depend on architecture and page size. My ioctl command
   can work on one arch, but can't on the other?

Increase IOCPARM_MAX to 8kB and make it independed of PAGE_SIZE and
architecture it is compiled for. This allows to use all the bits on all the
archs for size. Note that this doesn't mean we will copy more on every ioctl(2)
call. No. We still copyin(9)/copyout(9) only exact number of bytes encoded in
ioctl command.

Practical use for this change is ZFS. zfs_cmd_t structure used for ZFS
ioctls is larger than 4kB.

Silence on:	arch@

r206667:

Fix 3-way deadlock that can happen because of ZFS and vnode lock
order reversal.

thread0 (vfs_fhtovp)	thread1 (vop_getattr)	thread2 (zfs_recv)
--------------------	---------------------	------------------
			vn_lock
rrw_enter_read
						rrw_enter_write (hangs)
			rrw_enter_read (hangs)
vn_lock (hangs)

Reported by:	Attila Nagy <bra@fsn.hu>

r206792:

Set ARC_L2_WRITING on L2ARC header creation.

Obtained from:	OpenSolaris

r206793:

Remove racy assertion.

Obtained from:	OpenSolaris

r206794:

Extend locks scope to match OpenSolaris.

r206795:

Add missing list and lock destruction.

r206796:

Style fixes.

r206797:

Restore previous order.
2010-04-18 21:36:34 +00:00
pjd
578c149cf8 MFC r206665:
Use lower priority for GELI worker threads. This improves system
responsiveness under heavy GELI load.
2010-04-18 21:26:59 +00:00
pjd
7d56de6ee5 MFC r206666:
Flush disk write cache after storing and clearing metadata.
2010-04-18 21:24:23 +00:00
pjd
6d8becbd48 MFC r204177,r205738,r206669,r206696,r206697:
r204177:

Changing proto_socketpair.c compilation and linking order revealed
a problem - we should simply ignore proto_server() if address
doesn't start with socketpair://, and not abort.

r205738:

Don't hold connection lock when doing reconnects as it makes I/Os wait for
connection timeouts.

Reported by:	Kevin Day <toasty@dragondata.com>

r206669:

Increase ggate queue size to maximum value.
HAST was not able to stand heavy random load.

Reported by:	Hiroyuki Yamagami

r206696:

Fix control socket leak when worker process exits.

Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>

r206697:

Fix log size calculation which caused message truncation.

Submitted by:	Mikolaj Golub <to.my.trociny@gmail.com>
2010-04-18 21:18:32 +00:00
pjd
61b0f125e6 MFC r204076,r204077,r204083,r205279:
r204076:

Please welcome HAST - Highly Avalable Storage.

HAST allows to transparently store data on two physically separated machines
connected over the TCP/IP network. HAST works in Primary-Secondary
(Master-Backup, Master-Slave) configuration, which means that only one of the
cluster nodes can be active at any given time. Only Primary node is able to
handle I/O requests to HAST-managed devices. Currently HAST is limited to two
cluster nodes in total.

HAST operates on block level - it provides disk-like devices in /dev/hast/
directory for use by file systems and/or applications. Working on block level
makes it transparent for file systems and applications. There in no difference
between using HAST-provided device and raw disk, partition, etc. All of them
are just regular GEOM providers in FreeBSD.

For more information please consult hastd(8), hastctl(8) and hast.conf(5)
manual pages, as well as http://wiki.FreeBSD.org/HAST.

Sponsored by:	FreeBSD Foundation
Sponsored by:	OMCnet Internet Service GmbH
Sponsored by:	TransIP BV

r204077:

Remove some lines left over by accident.

r204083:

Add missing KEYWORD line.

Pointed out by:	dougb

r205279 sys:

Simplify loops.
2010-04-18 21:14:49 +00:00
trasz
083a76a5b6 MFC r202934:
Move out code that does POSIX.1e ACL inheritance into separate routines.

Reviewed by:	rwatson
2010-04-18 20:34:46 +00:00
pjd
48c55b3899 MFC r204075:
Style nits.
2010-04-18 20:23:08 +00:00
trasz
ed3bdb8391 MFC r206160 by jh@:
Add missing MNT_NFS4ACLS.
2010-04-18 19:51:46 +00:00
trasz
ccfb4c6d75 MFC r200829:
Cosmetic fixes.
2010-04-18 19:44:54 +00:00
trasz
d3f9d4d82e MFC r200811:
Add regression test for NFSv4 ACLs on UFS.
2010-04-18 19:40:52 +00:00
trasz
8cabfd7c8b MFC r200796:
Implement NFSv4 ACL support for UFS.

Reviewed by:	rwatson
2010-04-18 19:21:08 +00:00