]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agoRemove comment about 'ftlk' LOR.
dchagin [Sun, 13 Feb 2011 18:46:34 +0000 (18:46 +0000)]
Remove comment about 'ftlk' LOR.

13 years agoStop printing the LOR, as this is expected behavior.
dchagin [Sun, 13 Feb 2011 18:41:40 +0000 (18:41 +0000)]
Stop printing the LOR, as this is expected behavior.

13 years agoOnly print the unit number when invoked with the -n flag.
brucec [Sun, 13 Feb 2011 18:30:17 +0000 (18:30 +0000)]
Only print the unit number when invoked with the -n flag.

PR: bin/144300
Submitted by: arundel
MFC after: 3 days

13 years agoMove potentially offensive fortune to fortunes-o.
brucec [Sun, 13 Feb 2011 18:18:56 +0000 (18:18 +0000)]
Move potentially offensive fortune to fortunes-o.

PR: bin/137702
MFC after: 3 days

13 years agoThe bitset field of freshly created futex should be initialized explicity.
dchagin [Sun, 13 Feb 2011 17:56:22 +0000 (17:56 +0000)]
The bitset field of freshly created futex should be initialized explicity.
Otherwise, REQUEUE operations fails.

13 years agoDocument some more sysconf(3) variables.
brucec [Sun, 13 Feb 2011 17:43:56 +0000 (17:43 +0000)]
Document some more sysconf(3) variables.

MFC after: 1 month

13 years agoThis should be TX stream, not RX stream.
adrian [Sun, 13 Feb 2011 15:14:13 +0000 (15:14 +0000)]
This should be TX stream, not RX stream.

13 years agoFix a bug reported by Jonathan Leighton in his web-sctp testing
rrs [Sun, 13 Feb 2011 14:48:11 +0000 (14:48 +0000)]
Fix a bug reported by Jonathan Leighton in his web-sctp testing
at the Univ-of-Del. Basically when a 1-to-1 socket did a
socket/bind/send(data)/close. If the timing was right
we would dereference a socket that is NULL.

MFC after: 1 month

13 years agoEliminate tn_reg.tn_aobj_pages. Instead, correctly maintain the vm
alc [Sun, 13 Feb 2011 14:46:39 +0000 (14:46 +0000)]
Eliminate tn_reg.tn_aobj_pages.  Instead, correctly maintain the vm
object's size field.  Previously, that field was always zero, even
when the object tn_reg.tn_aobj contained numerous pages.

Apply style fixes to tmpfs_reg_resize().

In collaboration with: kib

13 years agoFix several bugs related to stream scheduling.
tuexen [Sun, 13 Feb 2011 13:53:28 +0000 (13:53 +0000)]
Fix several bugs related to stream scheduling.

Obtained from: Robin Seggelmann
MFC after: 3 months.

13 years ago* add in new EEPROM fields from later revisions
adrian [Sun, 13 Feb 2011 13:11:00 +0000 (13:11 +0000)]
* add in new EEPROM fields from later revisions
* add in printing futureBase

13 years ago- Added following port committers:
miwi [Sun, 13 Feb 2011 06:19:38 +0000 (06:19 +0000)]
- Added following port committers:

Marcus von Appen (mva@) (mentor: beech, miwi)
Dennis Herrmann (dhn@) (mentor: tabthorpe, miwi)
Brendan Fabeny (bf@)  (mentor: makc, miwi)
Kris Moore (kmoore@)  (mentor: brooks, miwi)
Sylvio Cesar Teixeira <sylvio@> (mentor: itetcu, miwi)
Lars Engels (lme) (mentor: miwi)

13 years agoOops, revert an accidental local change that got added in
deischen [Sun, 13 Feb 2011 04:44:06 +0000 (04:44 +0000)]
Oops, revert an accidental local change that got added in
my last commit (r218627).  No damage was done in the last
commit, just some duplicated code was added (which is now
removed).

13 years agoAllow the SO_SETFIB socket option to select the default (0)
deischen [Sun, 13 Feb 2011 00:14:13 +0000 (00:14 +0000)]
Allow the SO_SETFIB socket option to select the default (0)
routing table.

Reviewed by: julian

13 years agosh: Detect dividing the smallest integer by -1.
jilles [Sat, 12 Feb 2011 23:44:05 +0000 (23:44 +0000)]
sh: Detect dividing the smallest integer by -1.

This overflows and on some architectures such as amd64 it generates SIGFPE.
Generate an error on all architectures.

13 years agoFix Incorrectly formatted ClientHello SSL/TLS handshake messages could
simon [Sat, 12 Feb 2011 21:30:46 +0000 (21:30 +0000)]
Fix Incorrectly formatted ClientHello SSL/TLS handshake messages could
cause OpenSSL to parse past the end of the message.

Note: Applications are only affected if they act as a server and call
SSL_CTX_set_tlsext_status_cb on the server's SSL_CTX. This includes
Apache httpd >= 2.3.3, if configured with "SSLUseStapling On".

Security: http://www.openssl.org/news/secadv_20110208.txt
Security: CVE-2011-0014
Obtained from: OpenSSL CVS

13 years agoAdd missing USB_HOST_ALIGN option.
hselasky [Sat, 12 Feb 2011 21:17:38 +0000 (21:17 +0000)]
Add missing USB_HOST_ALIGN option.

Approved by: thompsa (mentor)

13 years agoRename used_requeue and use it as bitwise field to store more flags.
dchagin [Sat, 12 Feb 2011 20:58:59 +0000 (20:58 +0000)]
Rename used_requeue and use it as bitwise field to store more flags.
Reimplement used_requeue logic with LINUX_XDEPR_REQUEUEOP flag.

13 years agoIf the pf.conf(5) example file is copied when setting up a firewall it's
brucec [Sat, 12 Feb 2011 20:42:53 +0000 (20:42 +0000)]
If the pf.conf(5) example file is copied when setting up a firewall it's
easy to forget about icmp. Update the file to show allowing icmp through
the firewall.

PR: docs/144986
MFC after: 1 month

13 years agoFix typos.
brucec [Sat, 12 Feb 2011 20:28:15 +0000 (20:28 +0000)]
Fix typos.

PR: docs/131625
Submitted by: Andrew Wright <andrew at qemg.org>
MFC after: 1 month

13 years agoSlightly rewrite linux_fork:
dchagin [Sat, 12 Feb 2011 20:16:25 +0000 (20:16 +0000)]
Slightly rewrite linux_fork:

1) Remove bogus error checking.
2) A new process exit from kernel through fork_trampoline(),
   so remove bogus check.

13 years agoRemove bogus include <machine/frame.h>
dchagin [Sat, 12 Feb 2011 19:14:57 +0000 (19:14 +0000)]
Remove bogus include <machine/frame.h>

13 years agoMove linux_clone(), linux_fork(), linux_vfork() to a MI path.
dchagin [Sat, 12 Feb 2011 18:17:12 +0000 (18:17 +0000)]
Move linux_clone(), linux_fork(), linux_vfork() to a MI path.

13 years agoIn preparation for moving linux_clone() to a MI path
dchagin [Sat, 12 Feb 2011 16:33:00 +0000 (16:33 +0000)]
In preparation for moving linux_clone() to a MI path
introduce linux_set_upcall_kse().

13 years agoIn preparation for moving linux_clone () to a MI path
dchagin [Sat, 12 Feb 2011 15:50:21 +0000 (15:50 +0000)]
In preparation for moving linux_clone () to a MI path
move the TLS code in a separate function.

Use function parameter instead of direct using register.

13 years agoRegen for r218610.
dchagin [Sat, 12 Feb 2011 15:36:25 +0000 (15:36 +0000)]
Regen for r218610.

13 years agoThe fourth argument of linux_clone is a pointer to the TLS. Change clone syscall...
dchagin [Sat, 12 Feb 2011 15:33:25 +0000 (15:33 +0000)]
The fourth argument of linux_clone is a pointer to the TLS. Change clone syscall definition to match actual linux one.

13 years agoRemove unused since r134586 thr_exit1() declaration.
dchagin [Sat, 12 Feb 2011 15:24:52 +0000 (15:24 +0000)]
Remove unused since r134586 thr_exit1() declaration.

13 years agoRestore DH89xxCC/Patsburg chip IDs accentally dropped at r218596.
mav [Sat, 12 Feb 2011 13:28:50 +0000 (13:28 +0000)]
Restore DH89xxCC/Patsburg chip IDs accentally dropped at r218596.

13 years agoIn checker, read journal by sectors.
kib [Sat, 12 Feb 2011 13:17:14 +0000 (13:17 +0000)]
In checker, read journal by sectors.

Due to UFS insistence to pretend that device sector size is 512 bytes,
sector size is obtained from ioctl(DIOCGSECTORSIZE) for real devices,
and from the label otherwise. The file images without label have to
be made with 512 sector size.

In collaboration with: pho
Reviewed by: jeff
Tested by: bz, pho

13 years agoWhen creating a directory entry for the journal, always read at least
kib [Sat, 12 Feb 2011 13:12:45 +0000 (13:12 +0000)]
When creating a directory entry for the journal, always read at least
the fragment, and write the full block. Reading less might not work
due to device sector size bigger then size of direntries in the
last directory fragment.

Reported by: bz
In collaboration with: pho
Reviewed by: jeff
Tested by: bz, pho

13 years agoUse the native sector size of the device backing the UFS volume for SU+J
kib [Sat, 12 Feb 2011 12:52:12 +0000 (12:52 +0000)]
Use the native sector size of the device backing the UFS volume for SU+J
journal blocks, instead of hard coding 512 byte sector size. Journal need
to atomically write the block, that can only be guaranteed at the device
sector size, not larger. Attempt to write less then sector size results in
driver errors.

Note that this is the first structure in UFS that depends on the
sector size. Other elements are written in the units of fragments.

In collaboration with: pho
Reviewed by: jeff
Tested by: bz, pho

13 years agoReplace ERROR() macro with inline function. In-tree gcc cannot tolerate
kib [Sat, 12 Feb 2011 12:46:00 +0000 (12:46 +0000)]
Replace ERROR() macro with inline function. In-tree gcc cannot tolerate
the construct like printf("%\s", NULL) resulting from macroexpand of
ERROR(u, NULL), making it impossible to use LIBUFS_DEBUGGING.

With inline function, compiler cannot detect the NULL argument to
known function and does not try to convert it into puts().

In collaboration with: pho

13 years agoDisable NCQ for multiport Marvell 88SX61XX SATA controllers. Simultaneous
mav [Sat, 12 Feb 2011 07:06:40 +0000 (07:06 +0000)]
Disable NCQ for multiport Marvell 88SX61XX SATA controllers. Simultaneous
active I/O to several disks (copying large file on ZFS) causes timeout after
just a few seconds of run. Single port 88SX6111 seems like not affected.

Skip reading transferred bytes count for these controllers. It works for
88SX6111, but 88SX6145 always returns zero there. Haven't tested others,
but better to be safe.

13 years agoFix build.
nyan [Sat, 12 Feb 2011 06:22:23 +0000 (06:22 +0000)]
Fix build.

13 years agoThe Lanner MR-730 uses the first two MACs at its MAC base for the 10/100
jmallett [Sat, 12 Feb 2011 02:41:33 +0000 (02:41 +0000)]
The Lanner MR-730 uses the first two MACs at its MAC base for the 10/100
management ports, and gigabit ports start at an offset of 2 from the MAC
base.

13 years agoThe current code used the fields in ath_set11nratescenario() . Use them
adrian [Sat, 12 Feb 2011 02:14:19 +0000 (02:14 +0000)]
The current code used the fields in ath_set11nratescenario()  . Use them
correctly:

* pass in whether to allow the hardware to override the duration field
  in the main data frame (durupdate_en) - PS_POLL frames in particular
  don't have the duration bit overriden;
* there's no rts/cts duration here; that's done elsehwere

13 years agoUse CPU_FOREACH rather than expecting CPUs 0 through mp_ncpus-1 to be present.
jmallett [Sat, 12 Feb 2011 02:10:08 +0000 (02:10 +0000)]
Use CPU_FOREACH rather than expecting CPUs 0 through mp_ncpus-1 to be present.
Don't micro-optimize the uniprocessor case; use the same loop there.

Submitted by: Bhanu Prakash
Reviewed by: kib, jhb

13 years agoAllow the platform code to return a bitmask of running cores rather than just
jmallett [Sat, 12 Feb 2011 02:08:24 +0000 (02:08 +0000)]
Allow the platform code to return a bitmask of running cores rather than just
a number of cores, this allows for a sparse set of CPUs.  Implement support
for sparse core masks on Octeon.

XXX jeff@ suggests that all_cpus should include cores that are offline or
    running other applications/OSes, so the platform API should be further
    extended to allow us to set all_cpus to include all cores that are
    physically-present as opposed to only those that are running FreeBSD.

Submitted by: Bhanu Prakash (with modifications)
Reviewed by: jchandra
Glanced at by: kib, jeff, jhb

13 years agoMerge ACPICA 20110211.
jkim [Sat, 12 Feb 2011 01:03:15 +0000 (01:03 +0000)]
Merge ACPICA 20110211.

13 years agoRetire VFS_BIO_DEBUG. Convert those checks that were still valid into
alc [Sat, 12 Feb 2011 01:00:00 +0000 (01:00 +0000)]
Retire VFS_BIO_DEBUG.  Convert those checks that were still valid into
KASSERT()s and eliminate the rest.

Replace excessive printf()s and a panic() in bufdone_finish() with a
KASSERT() in vm_page_io_finish().

Reviewed by: kib

13 years agoFix the shared code to be consistent with Intel-internal,
jfv [Sat, 12 Feb 2011 00:07:40 +0000 (00:07 +0000)]
Fix the shared code to be consistent with Intel-internal,
and now build.

13 years agoRestore 2 prototypes that seem to have been mistakenly removed in r218582.
dougb [Fri, 11 Feb 2011 23:08:34 +0000 (23:08 +0000)]
Restore 2 prototypes that seem to have been mistakenly removed in r218582.

I've manually twiddled the whitespace for e1000_commit_fc_settings_generic
to match the others in the file.

Submitted by: dim
Tested by: me

13 years agoImport ACPICA 20110211.
jkim [Fri, 11 Feb 2011 22:56:14 +0000 (22:56 +0000)]
Import ACPICA 20110211.

13 years agoWith smp_topo_none, set cg_mask to all_cpus rather than setting the mp_ncpus
jmallett [Fri, 11 Feb 2011 22:43:10 +0000 (22:43 +0000)]
With smp_topo_none, set cg_mask to all_cpus rather than setting the mp_ncpus
low bits.

Submitted by: Bhanu Prakash
Reviewed by: jeffr

13 years agoSomehow the RX ring depletion fix got partially removed,
jfv [Fri, 11 Feb 2011 19:49:07 +0000 (19:49 +0000)]
Somehow the RX ring depletion fix got partially removed,
replace the missing pieces.

13 years agoRevert changes made here, they will cause a conflict
jfv [Fri, 11 Feb 2011 19:03:00 +0000 (19:03 +0000)]
Revert changes made here, they will cause a conflict
later on with our shared code.

13 years agoInconsistencies in the updated igb shared code and the older
jfv [Fri, 11 Feb 2011 17:18:42 +0000 (17:18 +0000)]
Inconsistencies in the updated igb shared code and the older
em/lem, breaking the build, correcting that.

13 years agoAdd release notes for xz update to 5.0.0.
mm [Fri, 11 Feb 2011 14:55:17 +0000 (14:55 +0000)]
Add release notes for xz update to 5.0.0.

13 years agoMfp4 CH=177255:
bz [Fri, 11 Feb 2011 14:17:58 +0000 (14:17 +0000)]
Mfp4 CH=177255:

  Resort the CURVNET_SET* macros in the non-VNET_DEBUG case to match
  the call order of the VNET_DEBUG case.

  Add the VNET_ASSERT() to the non-VNET_DEBUG case as well so that
  INVARIANTS will still catch problems.

  Sponsored by: The FreeBSD Foundation
  Sponsored by: CK Software GmbH
  Reviewed by:  jhb

MFC after: 2 weeks

13 years ago.. how'd this compile before I commit it and then not now?
adrian [Fri, 11 Feb 2011 14:07:27 +0000 (14:07 +0000)]
.. how'd this compile before I commit it and then not now?

Fixed.

13 years agoMfp4 CH=177255:
bz [Fri, 11 Feb 2011 13:27:00 +0000 (13:27 +0000)]
Mfp4 CH=177255:

  Make VNET_ASSERT() available with either VNET_DEBUG or INVARIANTS.

  Change the syntax to match KASSERT() to allow more flexible panic
  messages rather than having a printf with hardcoded arguments
  before panic.

  Adjust the few assertions we have to the new format (and enhance
  the output).

  Sponsored by: The FreeBSD Foundation
  Sponsored by: CK Software GmbH
  Reviewed by: jhb

MFC after: 2 weeks

13 years agoAdd support to write boot menu.
nyan [Fri, 11 Feb 2011 13:18:00 +0000 (13:18 +0000)]
Add support to write boot menu.

13 years agoAdd the pc98boot image which concatenates boot0 and boot0.5.
nyan [Fri, 11 Feb 2011 13:14:17 +0000 (13:14 +0000)]
Add the pc98boot image which concatenates boot0 and boot0.5.
It's required by the gpart to write bootcode.

13 years agoThe last parameter to ath_computedur_ht() is short-GI, not short-preamble.
adrian [Fri, 11 Feb 2011 13:05:15 +0000 (13:05 +0000)]
The last parameter to ath_computedur_ht() is short-GI, not short-preamble.

13 years agoMfp4 CH=177255:
bz [Fri, 11 Feb 2011 12:56:05 +0000 (12:56 +0000)]
Mfp4 CH=177255:

  Use __func__ rather than __FUNCTION__.

MFC after: 2 weeks

13 years agoFor UIO_NOCOPY case of reading request on zfs vnode, which has vm object
kib [Fri, 11 Feb 2011 10:46:15 +0000 (10:46 +0000)]
For UIO_NOCOPY case of reading request on zfs vnode, which has vm object
attached, activate the page after the successful read, and free the page
if read was unsuccessfull.

Freshly allocated page is not on any queue yet, and not activating (or
deactivating) the page leaves it on no queue, excluding the page from
pagedaemon scans and making the memory disappeared until the vnode
reclaimed.

Reviewed by: avg
MFC after: 1 week

13 years agoAfter r218530 export several functions which are no longer private to
bz [Fri, 11 Feb 2011 09:58:38 +0000 (09:58 +0000)]
After r218530 export several functions which are no longer private to
e1000_mac.c but part of the e1000_api.

X-MFC with: 218530 by jfv

13 years agoAdd an example Khelp module, which will be referenced in the forthcoming Khelp
lstewart [Fri, 11 Feb 2011 07:26:17 +0000 (07:26 +0000)]
Add an example Khelp module, which will be referenced in the forthcoming Khelp
documentation.

Sponsored by: FreeBSD Foundation
Discussed with: David Hayes <dahayes at swin edu au>
MFC after: 5 weeks
X-MFC with: r216615

13 years agoGenerate MACHINE= and MACHINE_ARCH= lines based on the machine
imp [Fri, 11 Feb 2011 06:35:53 +0000 (06:35 +0000)]
Generate MACHINE= and MACHINE_ARCH= lines based on the machine
directive.  Once this is MFC'd, we can move these out of the template
files where they are (incosnsitently) defined.

MFC after: 1 week

13 years agowhitespace nit.
imp [Fri, 11 Feb 2011 05:50:28 +0000 (05:50 +0000)]
whitespace nit.

13 years agoSynthesize the change from NetBSD's 1.33:
dougb [Fri, 11 Feb 2011 05:33:35 +0000 (05:33 +0000)]
Synthesize the change from NetBSD's 1.33:

"Do not crash if a date cannot be represented (localtime returning
NULL), use the Epoch value instead."

Obtained from:  njoly@NetBSD.org

13 years agoHmmm, specifying TARGET and TARGET_ARCH in the environment doesn't
imp [Fri, 11 Feb 2011 04:03:39 +0000 (04:03 +0000)]
Hmmm, specifying TARGET and TARGET_ARCH in the environment doesn't
seem to work when building xdev anymore (most likely my changes lately
moving the TARGET guessing stuff to Makefile from Makefile.inc1, but I
really don't grok why).  Fix make xdev by putting them on the command
line.  This will work either way while I try to figure it out.

13 years agoCPUTYPE is now a required define for calling Makefile.inc1 diretly, so
imp [Fri, 11 Feb 2011 02:37:47 +0000 (02:37 +0000)]
CPUTYPE is now a required define for calling Makefile.inc1 diretly, so
make sure we define it for the xdev stuff.

Move xdev stuff to be last again in this file.

# xdev-build works now, but xdev-install appears to be broken though.

13 years agoRevert last commit: CPUTYPE will be defined here
imp [Fri, 11 Feb 2011 02:34:26 +0000 (02:34 +0000)]
Revert last commit: CPUTYPE will be defined here

13 years agoDon't require CPUTYPE to be defined for ARM, but use it if it is.
imp [Fri, 11 Feb 2011 02:24:04 +0000 (02:24 +0000)]
Don't require CPUTYPE to be defined for ARM, but use it if it is.

13 years agoAdd support for the new I350 family of 1G interfaces.
jfv [Fri, 11 Feb 2011 01:00:26 +0000 (01:00 +0000)]
Add support for the new I350 family of 1G interfaces.
    - this also includes virtualization support on these devices

Correct some vlan issues we were seeing in test, jumbo frames on vlans
did not work correctly, this was all due to confused logic around HW
filters, the new code should now work for all uses.

Important fix: when mbuf resources are depeleted, it was possible to
completely empty the RX ring, and then the RX engine would stall
forever. This is fixed by a flag being set whenever the refresh code
fails due to an mbuf shortage, also the local timer now makes sure
that all queues get an interrupt when it runs, the interrupt code
will then always call rxeof, and in that routine the first thing done
is now to check the refresh flag and call refresh_mbufs. This has been
verified to fix this type 'hang'. Similar code will follow in the other
drivers.

Finally, sync up shared code for the I350 support.

Thanks to everyone that has been reporting issues, and helping in the
debug/test process!!

13 years ago- Updated firmware which improves small packet performance.
davidch [Fri, 11 Feb 2011 00:41:49 +0000 (00:41 +0000)]
- Updated firmware which improves small packet performance.

MFC after: 2 weeks

13 years agoAdd 'generic' flash images. This is for projects producing generic
imp [Thu, 10 Feb 2011 23:36:39 +0000 (23:36 +0000)]
Add 'generic' flash images.  This is for projects producing generic
images that are of a certain size.  The geometery is bogus, but that
doesn't matter since the new packet mode onviates the need to get the
geometry right.

13 years ago- Added error checking to nvram read functions.
davidch [Thu, 10 Feb 2011 22:36:23 +0000 (22:36 +0000)]
- Added error checking to nvram read functions.
- Minor style updates.

Submitted by: gcooper@freebsd.org
MFC after: 2 weeks

13 years agoYou are now *REQUIRED* to pass both TARGET and TARGET_ARCH to any
imp [Thu, 10 Feb 2011 19:58:21 +0000 (19:58 +0000)]
You are now *REQUIRED* to pass both TARGET and TARGET_ARCH to any
invocations of Makefile.inc1 (since that's supposed to be an internal
interface for world and related targets).  Document this with a .error
message.  For a transition period, support passing in just TARGET, but
give a .warning for that case: I plan on removing it in 9.0...

13 years agoAdd LIBEXECDIR to the bsd.own.mk vars, pointing to /usr/libexec by default
keramida [Thu, 10 Feb 2011 19:13:54 +0000 (19:13 +0000)]
Add LIBEXECDIR to the bsd.own.mk vars, pointing to /usr/libexec by default

Some of the patches we are preparing for porting ATF from NetBSD
refer to '/usr/libexec' several times.  Instead of repeating the
path all over the place, add ${LIBEXECDIR} to match ${LIBDATADIR}
and reduce the redundancy of the relevant makefiles.

Submitted by: Garrett Cooper <yanegomi@gmail.com>
Approved by: ru
MFC after: 1 month

13 years ago- Add a new UNIVERSE_TARGET variable for 'make universe'. If it is set,
jhb [Thu, 10 Feb 2011 18:54:52 +0000 (18:54 +0000)]
- Add a new UNIVERSE_TARGET variable for 'make universe'.  If it is set,
  then that target is invoked for each architecture rather than the
  default action of building world and kernels for each architecture.
- Add a 'make toolchains' wrapper which uses UNIVERSE_TARGET to build
  toolchains for all architectures.
- Document JFLAG, MAKE_JUST_KERNELS, and MAKE_JUST_WORLDS variables for
  'make universe'.

Reviewed by: bz
MFC after: 1 week

13 years agoNetgear renamed the WG311 to the WG311v1 after they released a second
jpaetzel [Thu, 10 Feb 2011 15:41:32 +0000 (15:41 +0000)]
Netgear renamed the WG311 to the WG311v1 after they released a second
version of it.  There is also a WG311v3 which uses a chipset covered by
malo(4). Along the way add the WG311T to the list which is also an
atheros chipset.

PR: docs/154589
Approved by: kib (mentor)
MFC after: 3 days

13 years agoRemove addresses from endpoint when there are no associations.
tuexen [Thu, 10 Feb 2011 14:46:37 +0000 (14:46 +0000)]
Remove addresses from endpoint when there are no associations.
This fixes a bug reported by brucec@.

MFC after: 3 months.

13 years agoWrap long line.
netchild [Thu, 10 Feb 2011 08:06:56 +0000 (08:06 +0000)]
Wrap long line.

Noticed by: bz

13 years agoFix a bug where the wrong argument was passed to SET_FLOAT_WORD().
das [Thu, 10 Feb 2011 07:38:38 +0000 (07:38 +0000)]
Fix a bug where the wrong argument was passed to SET_FLOAT_WORD().
This bug results in a type mismatch that happens to be harmless
because of the way SET_FLOAT_WORD() works.

Submitted by: bde

13 years agoFix a bug where the wrong argument was passed to INSERT_WORDS().
das [Thu, 10 Feb 2011 07:38:13 +0000 (07:38 +0000)]
Fix a bug where the wrong argument was passed to INSERT_WORDS().
This bug results in a type mismatch that happens to be harmless
because of the way INSERT_WORDS() works.

Submitted by: bde

13 years agoFor small arguments, these functions use simple approximations,
das [Thu, 10 Feb 2011 07:37:50 +0000 (07:37 +0000)]
For small arguments, these functions use simple approximations,
e.g. cos(small) = 1, sin(small) = small.  This commit tightens
the thresholds at which the simple approximations are used.

Reviewed by: bde

13 years agoFix a bogus threshold that was copied from the double precision version.
das [Thu, 10 Feb 2011 07:37:29 +0000 (07:37 +0000)]
Fix a bogus threshold that was copied from the double precision version.
This commit should have no effect on correctness; it merely changes the
threshold at which a simpler approximation can be used.

Reviewed by: bde

13 years agoAdd tmpfs(5) to NOTES
kevlo [Thu, 10 Feb 2011 05:33:40 +0000 (05:33 +0000)]
Add tmpfs(5) to NOTES

13 years agoDocument requirement that sys/types.h be included before rman.h.
imp [Thu, 10 Feb 2011 04:55:51 +0000 (04:55 +0000)]
Document requirement that sys/types.h be included before rman.h.

Submitted by: Raphael Kubo da Costa
MFC after: 2 weeks

13 years agosys/rman.h now requires sys/types.h. Include it to make the API match
imp [Thu, 10 Feb 2011 04:53:09 +0000 (04:53 +0000)]
sys/rman.h now requires sys/types.h.  Include it to make the API match
the man page again.

Submitted by: Raphael Kubo da Costa
MFC after: 2 weeks

13 years agoAs info.rti_info[RTAX_DST] can point inside of rtm we must not free the rtm
mlaier [Thu, 10 Feb 2011 01:24:09 +0000 (01:24 +0000)]
As info.rti_info[RTAX_DST] can point inside of rtm we must not free the rtm
until rt_dispatch is done with the sockaddr.

Found by: memguard
MFC after: 3 days

13 years agoLinux' shm_open() fails because it wants to find some funky shmfs
netchild [Wed, 9 Feb 2011 20:23:22 +0000 (20:23 +0000)]
Linux' shm_open() fails because it wants to find some funky shmfs
to construct the full pathname. It starts to search at the default
mountpoint which is /dev/shm. If this fails it runs through fstab
and searches for shmfs and tmpfs. Whatever it finds will be
statfs()'ed to be checked for Linux' fs magic for shmfs (0x01021994).

Ideally our tmpfs should deliver this fs magic to Linux processes, but
as our tmpfs is considered to be an experimental feature we can not
assume that there is always a tmpfs available.

To make shared memory work in the Linuxulator, force the fs type of
/dev/shm (which can be a symlink) to match what Linux expects. The user
is responsible (info has to be added to the linux base ports and the docs)
to setup a suitable link for /dev/shm.

Noticed by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com>
MFC after: 1 month

13 years agoUse the preload_fetch_addr() and preload_fetch_size() convenience
marcel [Wed, 9 Feb 2011 19:31:10 +0000 (19:31 +0000)]
Use the preload_fetch_addr() and preload_fetch_size() convenience
functions and only create the MD device when we have a non-zero
pointer and size.

Sponsored by: Juniper Networks

13 years agoProvide convenience function for obtaining MODINFO_ADDR and MODINFO_SIZE
marcel [Wed, 9 Feb 2011 19:08:21 +0000 (19:08 +0000)]
Provide convenience function for obtaining MODINFO_ADDR and MODINFO_SIZE
attributes for preloaded modules/images. In particular, MODINFO_ADDR has
the added complexity of not always being relocated properly. Rather than
kluging this in the various components that are affected, we handle it
in a centralized place (preload_fetch_addr()). To that end, expose a new
variable, preload_addr_relocate, that MD initialization code can set and
that turns the address attribute into a valid kernel VA.

Architectures that need the relocation: arm & powerpc (at least).
Components that can utilize this: acpi(4), md(4), fb(4), pci(4), ZFS, geli.

Sponsored by: Juniper Networks

13 years agoSetting VV_TEXT here is redundant. It is already set by do_execve().
alc [Wed, 9 Feb 2011 18:45:33 +0000 (18:45 +0000)]
Setting VV_TEXT here is redundant.  It is already set by do_execve().

Reviewed by: kib

13 years agoRework beacon handling re-enable run_updateslot().
bschmidt [Wed, 9 Feb 2011 18:09:27 +0000 (18:09 +0000)]
Rework beacon handling re-enable run_updateslot().

Drivers which rely on net80211 to create the beacon need to call
ieee80211_beacon_update() on iv_update_beacon() calls. This is required
that certain bits, e.g. TIM, get updated. A call to ieee80211_beacon_alloc()
is not enough because it does not care about flags which can only change
during runtime. By design a beacon is supposed to be allocated only once
while moving into RUN state.

To handle all possible calls to iv_update_beacon() the run_updateslot()
function has been revived and run_updateprot() has been added.
run_updateslot() handles slot time changes and run_updateprot() changes
to protection, both can change while nodes associate/leave.

Submitted by: Alexander Zagrebin <alex at zagrebin.ru>,
PseudoCylon <moonlightakkiy atyahoo.ca>
MFC after: 3 weeks

13 years agoExpose the 4k transaction workaround hooks to the driver, but don't (yet)
adrian [Wed, 9 Feb 2011 16:37:29 +0000 (16:37 +0000)]
Expose the 4k transaction workaround hooks to the driver, but don't (yet)
fix the descriptor allocation.

13 years agoAdd in the (very!) optional glue to flip the 11n bits for if_ath.
adrian [Wed, 9 Feb 2011 15:43:38 +0000 (15:43 +0000)]
Add in the (very!) optional glue to flip the 11n bits for if_ath.

There's still a lot of random issues to sort out with the radio side of
things and AMPDU RX handling (and completely missing AMPDU TX handling!)
but if people wish to give this a go and assist in debugging the
issues, they can define ATH_DO_11N to enable it.

I'm just re-iterating - this is here to allow people to assist in
further 11n development; it is not any indication that the 11n support
is complete and functional.

Important notes:

* This doesn't support 1-stream cards yet - (eg AR9285) - the various bits
  that negotiate TX/RX MCS don't know not to try >1 stream TX or negotiate
  1-stream RX; so don't enable 11n unless you've first taught the rate
  control module and the net80211 stack to negotiate 1-stream stuff;

* The only rate control module minimally 11n aware is ath_rate_sample;

* ath_rate_sample doesn't know about HT/40; so airtime will be incorrectly
  calculated;

* The AR9160 and AR9280 radio code is unreliable at the higher MCS rates for
  some reason; this will definitely impact 11n performance;

* AMPDU-TX isn't yet implemented;

* AMPDU-RX may be a bit buggy still and will definitely suffer from the
  radio unreliability mentioned above (ie, don't expect 150/300mbit
  RX just yet.)

13 years agoAdd some FEATURE macros for some UFS features.
netchild [Wed, 9 Feb 2011 15:33:13 +0000 (15:33 +0000)]
Add some FEATURE macros for some UFS features.

SU+J is not included as a FEATURE macro:
 - it was not in the tree during the GSoC
 - I do not see an option to en-/disable it in NOTES

Two minor changes where made during the review compared to what was developed
during GSoC 2010.

No FreeBSD version bump, the userland application to query the features will
be committed last and can serve as an indication of the availablility if
needed.

Sponsored by: Google Summer of Code 2010
Submitted by: kibab
Reviewed by: kib
X-MFC after: to be determined in last commit with code from this project

13 years agoFix the keycache behaviour for multicast keycache search.
adrian [Wed, 9 Feb 2011 15:23:16 +0000 (15:23 +0000)]
Fix the keycache behaviour for multicast keycache search.

The correct bit to set is 0x1 in the high MAC address byte, not 0x80.
The hardware isn't programmed with that bit (which is the multicast
adress bit.)

The linux ath9k keycache code uses that bit in the MAC as a "this is
a multicast key!" and doesn't set the AR_KEYTABLE_VALID bit.
This tells the hardware the MAC isn't to be used for unicast destination
matching but it can be used for multicast bssid traffic.

This fixes some encryption problems in station mode.

PR: kern/154598

13 years agoWhitespace tweak.
jhb [Wed, 9 Feb 2011 14:37:33 +0000 (14:37 +0000)]
Whitespace tweak.

13 years agoCorrect signedness and off-by-one issues in parameters used for DMA tag
marius [Wed, 9 Feb 2011 11:28:57 +0000 (11:28 +0000)]
Correct signedness and off-by-one issues in parameters used for DMA tag
creation.

PR: 154259
Submitted by: Vladislav Movchan (partially)
MFC after: 3 days

13 years agoFix termcap entry typo.
uqs [Wed, 9 Feb 2011 10:06:31 +0000 (10:06 +0000)]
Fix termcap entry typo.

MFC after: 2 weeks

13 years agoUse sigsetjmp/siglongjmp with disabled signal mask access for
kib [Wed, 9 Feb 2011 09:20:27 +0000 (09:20 +0000)]
Use sigsetjmp/siglongjmp with disabled signal mask access for
lock upgrade in rtld. There is no need to care about the mask,
which causes a lot of unneeded sigprocmask(2) calls during each
symbol lookup.

13 years agoMinor cleanup:
hselasky [Wed, 9 Feb 2011 08:01:45 +0000 (08:01 +0000)]
Minor cleanup:
 - use device_printf() instead of printf() to give more accurate warnings.
 - use memcpy() instead of bcopy().
 - add missing #if's for non-FreeBSD compilation.

Approved by: thompsa (mentor)

13 years agoWhen we decide to unlink socket file, sun_path must be set. If it is set,
pjd [Wed, 9 Feb 2011 08:01:10 +0000 (08:01 +0000)]
When we decide to unlink socket file, sun_path must be set. If it is set,
but there is problem unlinking the file, log a warning.

MFC after: 1 week

13 years agoAlways convert Paskha day from Julian (old) to Gregorian (new) style by
osa [Wed, 9 Feb 2011 06:38:32 +0000 (06:38 +0000)]
Always convert Paskha day from Julian (old) to Gregorian (new) style by
adding 13 days.  Bug introduced in 1.13 revision.