]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years ago - Wrap lock profiling state variables in #ifdef LOCK_PROFILING blocks.
jeff [Sun, 15 Mar 2009 08:03:54 +0000 (08:03 +0000)]
 - Wrap lock profiling state variables in #ifdef LOCK_PROFILING blocks.

15 years ago - Implement a new mechanism for resetting lock profiling. We now
jeff [Sun, 15 Mar 2009 06:41:47 +0000 (06:41 +0000)]
 - Implement a new mechanism for resetting lock profiling.  We now
   guarantee that all cpus have acknowledged the cleared enable int by
   scheduling the resetting thread on each cpu in succession.  Since all
   lock profiling happens within a critical section this guarantees that
   all cpus have left lock profiling before we clear the datastructures.
 - Assert that the per-thread queue of locks lock profiling is aware of
   is clear on thread exit.  There were several cases where this was not
   true that slows lock profiling and leaks information.
 - Remove all objects from all lists before clearing any per-cpu
   information in reset.  Lock profiling objects can migrate between
   per-cpu caches and previously these migrated objects could be zero'd
   before they'd been removed

Discussed with: attilio
Sponsored by: Nokia

15 years agoDon't adjust ranges at all for subtractive bridges. The simple-minded
imp [Sun, 15 Mar 2009 06:40:57 +0000 (06:40 +0000)]
Don't adjust ranges at all for subtractive bridges.  The simple-minded
stuff we're doing is too simple-minded, so back it out for now.

15 years agoGeneralize the workaround for the Hitachi HT-4840-11. The Contec
imp [Sun, 15 Mar 2009 02:31:34 +0000 (02:31 +0000)]
Generalize the workaround for the Hitachi HT-4840-11.  The Contec
C-NET(PC) has a cfe at location 1 that has both an odd irq mask (it
matches pc98 machines, so maybe it was a flag for pc98 operation) as
well as a memory map.  Since this driver doesn't know how to cope, we
start with cfe2, which is purely an I/O space mapped and that seems to
make it work.  I say 'seems' here, because the card I have doesn't
seem to have the right dongle for full testing...

15 years agono need to for gnu89 any more
sam [Sun, 15 Mar 2009 01:39:16 +0000 (01:39 +0000)]
no need to for gnu89 any more

15 years agoremove gcc-ism; tsinfo isn't used anyway
sam [Sun, 15 Mar 2009 01:38:37 +0000 (01:38 +0000)]
remove gcc-ism; tsinfo isn't used anyway

15 years agoOpps.. I missed a file on the commit :-)
rrs [Sat, 14 Mar 2009 23:13:16 +0000 (23:13 +0000)]
Opps.. I missed a file on the commit :-)

15 years agoFix build breakage due to the interplay between r189801 and r189824.
das [Sat, 14 Mar 2009 22:50:03 +0000 (22:50 +0000)]
Fix build breakage due to the interplay between r189801 and r189824.
In particular, vendor sources that aren't ready for gnu99 should
still be compiled with gnu89. (Before r189824, these would have
generated warnings if you tried to compile them in gnu99 mode,
but the warnings went unheeded due to -Wno-error.)

15 years agoOops. Correct comment in the LICENSE file.
pjd [Sat, 14 Mar 2009 21:59:12 +0000 (21:59 +0000)]
Oops. Correct comment in the LICENSE file.

15 years agoRegression tests for mac_portacl(4).
pjd [Sat, 14 Mar 2009 21:54:19 +0000 (21:54 +0000)]
Regression tests for mac_portacl(4).

15 years ago- Correct logic in if statement - we want to allocate temporary buffer
pjd [Sat, 14 Mar 2009 20:40:06 +0000 (20:40 +0000)]
- Correct logic in if statement - we want to allocate temporary buffer
  when someone is passing new rules, not when he only want to read them.
  Because of this bug, even if the given rules were incorrect, they
  ended up in rule_string.
- Add missing protection for rule_string when coping it.

Reviewed by: rwatson
MFC after: 1 week

15 years agoNamespace: Defining htonl() and friends here instead of arpa/inet.h is
das [Sat, 14 Mar 2009 20:16:54 +0000 (20:16 +0000)]
Namespace: Defining htonl() and friends here instead of arpa/inet.h is
a BSD extension.

15 years agoFix the visibility of several prototypes. Also move pthread_kill() and
das [Sat, 14 Mar 2009 20:10:14 +0000 (20:10 +0000)]
Fix the visibility of several prototypes. Also move pthread_kill() and
pthread_sigmask() to signal.h. In principle, this shouldn't break anything,
since they're already in signal.h on other systems, and the FreeBSD
manpage says that both pthread.h and signal.h need to be included to
get these functions.

Add a hack to declare pthread_t in the P1003.1-2008 namespace
in signal.h.

15 years agoHide dbopen() in the POSIX namespace, and use standard type names
das [Sat, 14 Mar 2009 20:05:27 +0000 (20:05 +0000)]
Hide dbopen() in the POSIX namespace, and use standard type names
throughout so that this compiles in strict POSIX mode.

15 years agoHide numerous BSD extensions in the POSIX namespace.
das [Sat, 14 Mar 2009 20:04:28 +0000 (20:04 +0000)]
Hide numerous BSD extensions in the POSIX namespace.

15 years agoBump __FreeBSD_version to 800071 for gcc patch to add support for C99
das [Sat, 14 Mar 2009 19:44:13 +0000 (19:44 +0000)]
Bump __FreeBSD_version to 800071 for gcc patch to add support for C99
inline functions in c99 and gnu99 mode.

15 years agoMake gcc use C99 inline semantics in c99 and gnu99 mode. This was the
das [Sat, 14 Mar 2009 19:36:13 +0000 (19:36 +0000)]
Make gcc use C99 inline semantics in c99 and gnu99 mode.  This was the
original intent, but the functionality wasn't implemented until after
gcc 4.2 was released. However, if you compiled a program that would
behave differently before and after this change, gcc 4.2 would have
warned you; hence, everything currently in the base system is
unaffected by this change.  This patch also adds additional warnings
about certain inline function-related bogosity, e.g., using a
static non-const local variable in an inline function.

These changes were merged from a snapshot of gcc mainline from March
2007, prior to the GPLv3 switch. I then ran the regression test suite
from a more recent gcc snapshot and fixed the important bugs it found.
I also squelched the following warning unless -pedantic is specified:

    foo is static but used in inline function bar which is not static

This is consistent with LLVM's behavior, but not consistent with gcc 4.3.

Reviewed by: arch@

15 years agoNamespace: aio_waitcomplete() is a BSD extension.
das [Sat, 14 Mar 2009 19:17:00 +0000 (19:17 +0000)]
Namespace: aio_waitcomplete() is a BSD extension.
Also, don't pollute the namespace by including <sys/time.h>.

15 years agoNamespace: adjtime(), futimes(), futimesat(), lutimes(), and settimeofday()
das [Sat, 14 Mar 2009 19:15:13 +0000 (19:15 +0000)]
Namespace: adjtime(), futimes(), futimesat(), lutimes(), and settimeofday()
are BSD extensions.

Also include <sys/select.h> in user code, since this header is
also supposed to define most of the symbols there.

15 years agoNamespace: abort2() is a BSD extension.
das [Sat, 14 Mar 2009 19:13:30 +0000 (19:13 +0000)]
Namespace: abort2() is a BSD extension.

15 years agoNamespace: endpwent, getpwent, and setpwent are XSI extensions.
das [Sat, 14 Mar 2009 19:13:01 +0000 (19:13 +0000)]
Namespace: endpwent, getpwent, and setpwent are XSI extensions.

15 years agoNamespace: dprintf() and getline() are in P1003.1-2008.
das [Sat, 14 Mar 2009 19:12:11 +0000 (19:12 +0000)]
Namespace: dprintf() and getline() are in P1003.1-2008.

15 years agoVarious namespace cleanups, including exposing fchmod() and fchmodat()
das [Sat, 14 Mar 2009 19:11:08 +0000 (19:11 +0000)]
Various namespace cleanups, including exposing fchmod() and fchmodat()
in the POSIX namespace, and hiding eaccess() and setproctitle().
Also move mknodat() from unistd.h to sys/stat.h where it belongs.
The *at() syscalls are only in CURRENT, so this shouldn't cause
problems.

15 years agoNamespace: preadv() and pwritev() are extensions.
das [Sat, 14 Mar 2009 19:07:58 +0000 (19:07 +0000)]
Namespace: preadv() and pwritev() are extensions.

15 years agoNamespace: vsyslog() is a BSD extension.
das [Sat, 14 Mar 2009 19:07:25 +0000 (19:07 +0000)]
Namespace: vsyslog() is a BSD extension.

15 years agoNamespace: semsys() and shmsys() aren't standard.
das [Sat, 14 Mar 2009 19:06:52 +0000 (19:06 +0000)]
Namespace: semsys() and shmsys() aren't standard.

15 years agoUse namespace visibility macros instead of checking for _POSIX_SOURCE.
das [Sat, 14 Mar 2009 19:06:07 +0000 (19:06 +0000)]
Use namespace visibility macros instead of checking for _POSIX_SOURCE.

15 years agoNamespace: setgrent() is an XSI extension.
das [Sat, 14 Mar 2009 19:05:18 +0000 (19:05 +0000)]
Namespace: setgrent() is an XSI extension.

15 years agoDon't prototype _tolower() and _toupper(). They're not supposed to be
das [Sat, 14 Mar 2009 19:04:24 +0000 (19:04 +0000)]
Don't prototype _tolower() and _toupper(). They're not supposed to be
functions, and there's no implementation of them in any case.

15 years agoNamespace: memccpy() and memchr() are XSI, and memrchr() is a BSD extension.
das [Sat, 14 Mar 2009 19:03:34 +0000 (19:03 +0000)]
Namespace: memccpy() and memchr() are XSI, and memrchr() is a BSD extension.

15 years agoNamespace: dbm_forder() and dbm_dirfno() are BSD extensions.
das [Sat, 14 Mar 2009 19:02:28 +0000 (19:02 +0000)]
Namespace: dbm_forder() and dbm_dirfno() are BSD extensions.

15 years agoNamespace: _setjmp() and _longjmp() are XSI extensions.
das [Sat, 14 Mar 2009 19:01:26 +0000 (19:01 +0000)]
Namespace: _setjmp() and _longjmp() are XSI extensions.

15 years agoNamespace: inet_ntoa_r() is a BSD extension.
das [Sat, 14 Mar 2009 19:00:16 +0000 (19:00 +0000)]
Namespace: inet_ntoa_r() is a BSD extension.

15 years agoNamespace: scalb() is withdrawn from POSIX.
das [Sat, 14 Mar 2009 18:58:53 +0000 (18:58 +0000)]
Namespace: scalb() is withdrawn from POSIX.

15 years agoMultibyte character support for cal(1).
das [Sat, 14 Mar 2009 18:55:51 +0000 (18:55 +0000)]
Multibyte character support for cal(1).

PR: 131578

15 years agoEliminate __real__ and __imag__ gccisms.
das [Sat, 14 Mar 2009 18:24:15 +0000 (18:24 +0000)]
Eliminate __real__ and __imag__ gccisms.

15 years agoSwitch over to gnu99 compilation on default for userland.
rdivacky [Sat, 14 Mar 2009 17:55:16 +0000 (17:55 +0000)]
Switch over to gnu99 compilation on default for userland.

Tested by: make universe
Tested by: ports exp build (done by pav)
Reviewed by: ru
Reviewed by: silence on arch
Approved by: ed (mentor)

15 years agoremove stray ;
sam [Sat, 14 Mar 2009 17:54:58 +0000 (17:54 +0000)]
remove stray ;

15 years agoRework MAC Framework synchronization in a number of ways in order to
rwatson [Sat, 14 Mar 2009 16:06:06 +0000 (16:06 +0000)]
Rework MAC Framework synchronization in a number of ways in order to
improve performance:

- Eliminate custom reference count and condition variable to monitor
  threads entering the framework, as this had both significant overhead
  and behaved badly in the face of contention.

- Replace reference count with two locks: an rwlock and an sx lock,
  which will be read-acquired by threads entering the framework
  depending on whether a give policy entry point is permitted to sleep
  or not.

- Replace previous mutex locking of the reference count for exclusive
  access with write acquiring of both the policy list sx and rw locks,
  which occurs only when policies are attached or detached.

- Do a lockless read of the dynamic policy list head before acquiring
  any locks in order to reduce overhead when no dynamic policies are
  loaded; this a race we can afford to lose.

- For every policy entry point invocation, decide whether sleeping is
  permitted, and if not, use a _NOSLEEP() variant of the composition
  macros, which will use the rwlock instead of the sxlock.  In some
  cases, we decide which to use based on allocation flags passed to the
  MAC Framework entry point.

As with the move to rwlocks/rmlocks in pfil, this may trigger witness
warnings, but these should (generally) be false positives as all
acquisition of the locks is for read with two very narrow exceptions
for policy load/unload, and those code blocks should never acquire
other locks.

Sponsored by: Google, Inc.
Obtained from: TrustedBSD Project
Discussed with: csjp (idea, not specific patch)

15 years agoMFamd64 r189785
alc [Sat, 14 Mar 2009 15:37:19 +0000 (15:37 +0000)]
MFamd64 r189785
  Update the pmap's resident page count when a page table page is freed in
  pmap_remove_pde() and pmap_remove_pages().

MFC after: 6 weeks

15 years agoTwo fixes:
imp [Sat, 14 Mar 2009 14:08:53 +0000 (14:08 +0000)]
Two fixes:
(1) Fix pcib_read/write_config prototypes.
(2) When contrainting a resource request for a 'subtractive' bridge,
    it is important to select a range outside the base/limit
    registers, since those are the only values known to not
    possibly work.  On my HP laptop, the base bridge excludes I/O
    ports 0xa000-0xafff, however that was the range we were passing
    up the tree.  Instead, when a range spans the "hole" we now
    arbitrarily pick the range just above the hole to allocate from.

All of my rl and xl cards, at a minimum, started working again on this
laptop with those fixes.

15 years agoFixes several PR-SCTP releated bugs.
rrs [Sat, 14 Mar 2009 13:42:13 +0000 (13:42 +0000)]
Fixes several PR-SCTP releated bugs.
 - When sending large PR-SCTP messages over a
   lossy link we would incorrectly calculate the fwd-tsn
 - When receiving large multipart pr-sctp packets we would
   incorrectly send back a SACK that would renege improperly
   on already received packets thus causing unneeded retransmissions.

15 years ago - When a mutex is destroyed while locked we need to inform lock profiling
jeff [Sat, 14 Mar 2009 11:43:38 +0000 (11:43 +0000)]
 - When a mutex is destroyed while locked we need to inform lock profiling
   that it has been released.

15 years ago - Call lock_profile_release when we're transitioning a lock to be owned by
jeff [Sat, 14 Mar 2009 11:43:02 +0000 (11:43 +0000)]
 - Call lock_profile_release when we're transitioning a lock to be owned by
   LK_KERNPROC.

Discussed with: attilio

15 years ago - Fix an error that occurs when mp_ncpu is an odd number. steal_thresh
jeff [Sat, 14 Mar 2009 11:41:36 +0000 (11:41 +0000)]
 - Fix an error that occurs when mp_ncpu is an odd number.  steal_thresh
   is calculated as 0 which causes errors elsewhere.

Submitted by: KOIE Hidetaka <koie@suri.co.jp>

 - When sched_affinity() is called with a thread that is not curthread we
   need to handle the ON_RUNQ() case by adding the thread to the correct
   run queue.

Submitted by: Justin Teller <justin.teller@gmail.com>

MFC after: 1 Week

15 years agoUpdate the pmap's resident page count when a page table page is freed in
alc [Sat, 14 Mar 2009 08:28:02 +0000 (08:28 +0000)]
Update the pmap's resident page count when a page table page is freed in
pmap_remove_pde() and pmap_remove_pages().

MFC after: 6 weeks

15 years agoCorrect accounting errors in _pmap_allocpte(). Specifically, the pmap's
alc [Sat, 14 Mar 2009 05:33:09 +0000 (05:33 +0000)]
Correct accounting errors in _pmap_allocpte().  Specifically, the pmap's
resident page count and the global wired page count were not correctly
maintained when page table page allocation failed.

MFC after: 6 weeks

15 years agor189349 removed mktemp() from the XSI namespace when
das [Sat, 14 Mar 2009 02:31:48 +0000 (02:31 +0000)]
r189349 removed mktemp() from the XSI namespace when
__XOPEN_SOURCE >= 700, since mktemp() was withdrawn
from the standard. However, __XSI_VISIBLE is set to
700 in the default BSD envrionment, where mktemp()
should still exist; hence, check for this.

15 years agoDon't suggest mounting procfs in diskless configurations.
rwatson [Fri, 13 Mar 2009 23:42:34 +0000 (23:42 +0000)]
Don't suggest mounting procfs in diskless configurations.

MFC after: 3 days

15 years ago- Fix object directory creation when running threaded buildworld
gabor [Fri, 13 Mar 2009 22:41:30 +0000 (22:41 +0000)]
- Fix object directory creation when running threaded buildworld

15 years agoHID usage minimum can be equal to the maximum.
thompsa [Fri, 13 Mar 2009 22:28:37 +0000 (22:28 +0000)]
HID usage minimum can be equal to the maximum.

Submitted by: Hans Petter Selasky
Tested by: Andreas Tobler

15 years agofix portability; linux does not have sa_len/sun_len
sam [Fri, 13 Mar 2009 19:05:34 +0000 (19:05 +0000)]
fix portability; linux does not have sa_len/sun_len

15 years agoFix comment explaining where this driver came from.
rpaulo [Fri, 13 Mar 2009 16:43:31 +0000 (16:43 +0000)]
Fix comment explaining where this driver came from.

MFC after: 2 weeks

15 years agoRename the k8temp(4) man page to amdtemp(4) and update its contents for
rpaulo [Fri, 13 Mar 2009 16:42:24 +0000 (16:42 +0000)]
Rename the k8temp(4) man page to amdtemp(4) and update its contents for
the new families.

MFC after: 2 weeks

15 years ago- Add an entry about enabling libc NLS support
gabor [Fri, 13 Mar 2009 16:40:56 +0000 (16:40 +0000)]
- Add an entry about enabling libc NLS support

15 years agoImplement new way of branding ELF binaries by looking to a
dchagin [Fri, 13 Mar 2009 16:40:51 +0000 (16:40 +0000)]
Implement new way of branding ELF binaries by looking to a
".note.ABI-tag" section.

The search order of a brand is changed, now first of all the
".note.ABI-tag" is looked through.

Move code which fetch osreldate for ELF binary to check_note() handler.

PR: 118473
Approved by: kib (mentor)

15 years agoMention k8temp -> amdtemp rename.
rpaulo [Fri, 13 Mar 2009 16:30:33 +0000 (16:30 +0000)]
Mention k8temp -> amdtemp rename.

MFC after: 2 weeks

15 years agoRename all the variables/function names/structs/etc. to reflect the
rpaulo [Fri, 13 Mar 2009 16:28:25 +0000 (16:28 +0000)]
Rename all the variables/function names/structs/etc. to reflect the
driver name change.
While there, update copyright.

MFC after: 2 weeks

15 years agoRename the k8temp driver to amdtemp.
rpaulo [Fri, 13 Mar 2009 16:08:08 +0000 (16:08 +0000)]
Rename the k8temp driver to amdtemp.

MFC after: 2 weeks

15 years agoSwitch to using official English short country names.
ru [Fri, 13 Mar 2009 14:35:58 +0000 (14:35 +0000)]
Switch to using official English short country names.

15 years ago- Reenable Native Language Support in libc. This feature was disabled due
gabor [Fri, 13 Mar 2009 10:40:38 +0000 (10:40 +0000)]
- Reenable Native Language Support in libc.  This feature was disabled due
  to possible breakages in the catalog handling code.  Since then, that
  code has been replaced by the secure code from NetBSD but NLS in libc
  remained turned off.  Tests have shown that the feature is stable and
  working so we can now turn it on again.

- Add several new catalog files:
  - ca_ES.ISO8859-1
  - de_DE.ISO8859-1
  - el_GR.ISO8859-7  (by manolis@ and keramida@)
  - es_ES.ISO8859-1  (kern/123179, by carvay@)
  - fi_FI.ISO8859-1
  - fr_FR.ISO8859-1  (kern/78756, by thierry@)
  - hu_HU.ISO8859-2  (by gabor@)
  - it_IT.ISO8859-15
  - nl_NL.ISO8859-1  (corrections by rene@)
  - no_NO.ISO8859-1
  - mn_MN.UTF-8      (by ganbold@)
  - sk_SK.ISO8859-2
  - sv_SE.ISO8859-1
  (The catalogs without explicit source has been obtained from NetBSD.)

Approved by: attilio

15 years agoDon't put "install-info" to the list of install-tools if we're
ru [Fri, 13 Mar 2009 10:09:08 +0000 (10:09 +0000)]
Don't put "install-info" to the list of install-tools if we're
installing with -DWITHOUT_INFO, otherwise one can experience a
failure trying to installworld on a system that is built with
-DWITHOUT_INFO (i.e., without /usr/bin/install-info).

Reported by: bland
MFC after: 3 days

15 years ago1. Clean up usage() output a bit by grouping options that take an argument
dougb [Fri, 13 Mar 2009 08:48:33 +0000 (08:48 +0000)]
1. Clean up usage() output a bit by grouping options that take an argument
2. Fix a comment to refer to the right loop

15 years agoBackout this commit whil a better solution is developed
guido [Fri, 13 Mar 2009 08:13:51 +0000 (08:13 +0000)]
Backout this commit whil a better solution is developed

15 years agoWhen using the -D option:
dougb [Fri, 13 Mar 2009 07:34:05 +0000 (07:34 +0000)]
When using the -D option:
1. The new mtree file should be created in the "host" system /tmp
2. The existing mtree file in the "host" system should not be deleted

Submitted by: scf

15 years agoImplement the xdev target. When you define XDEV=arch XDEV_ARCH=arch,
imp [Fri, 13 Mar 2009 07:23:58 +0000 (07:23 +0000)]
Implement the xdev target.  When you define XDEV=arch XDEV_ARCH=arch,
you can build the cross development tools and install them as
$XDEV-freebsd-xxx for each tool.  This allows one to use autoconf to
find the tools for cross building scenarios.

15 years agoAdd support for setting the debug flags on wlan interfaces after the are
brooks [Fri, 13 Mar 2009 07:12:25 +0000 (07:12 +0000)]
Add support for setting the debug flags on wlan interfaces after the are
created using wlandebug_<ifn> variables.

15 years agoRemove the null_islocked() overloaded vop because the standard one does
attilio [Fri, 13 Mar 2009 07:09:20 +0000 (07:09 +0000)]
Remove the null_islocked() overloaded vop because the standard one does
the same.

15 years agoMake MPC85xx LAW handling and reset routines aware of the MPC8548 variant.
raj [Fri, 13 Mar 2009 06:28:20 +0000 (06:28 +0000)]
Make MPC85xx LAW handling and reset routines aware of the MPC8548 variant.

Inspired by discussion with Alexey V Fedorov on freebsd-powerpc@.

15 years ago1) Check NULL pointer before calling umtx_pi_adjust_locked(), this avoids
davidxu [Fri, 13 Mar 2009 06:06:20 +0000 (06:06 +0000)]
1) Check NULL pointer before calling umtx_pi_adjust_locked(), this avoids
   a PANIC.
2) Rework locking for POSIX priority-mutex, this fixes a
   race where a thread may wait there forever even if the mutex is unlocked.

15 years agoMinorly improved debugging. Use the DEVPRINTF macro and report the
imp [Fri, 13 Mar 2009 05:31:27 +0000 (05:31 +0000)]
Minorly improved debugging.  Use the DEVPRINTF macro and report the
offset for memory when mapping in the CIS.

15 years agoAdd menus to read install.cfg from any disk device sysinstall can see
grog [Fri, 13 Mar 2009 03:51:41 +0000 (03:51 +0000)]
Add menus to read install.cfg from any disk device sysinstall can see
(eg USB key, CD) rather than just floppy.

Handle \r\n line termination in a cfg file.

Add keeprcconf variable.

Submitted by: Daniel O'Connor

15 years agoWe need to initialize the console for dcons to work.
imp [Fri, 13 Mar 2009 02:15:49 +0000 (02:15 +0000)]
We need to initialize the console for dcons to work.

Submitted by: nork@

15 years agoThe recent change to use memory > 1MB for the heap by default broke CD
jhb [Thu, 12 Mar 2009 20:41:52 +0000 (20:41 +0000)]
The recent change to use memory > 1MB for the heap by default broke CD
booting because the CD driver did not use bounce buffers to ensure
request buffers sent to the BIOS were always in the first 1MB.  Copy over
the bounce buffer logic from the BIOS disk driver (minus the 64k boundary
code for floppies) to fix this.

Reported by: kensmith

15 years agoAdd support for 10h and 11h family of processors. Also, make the sysctl
rpaulo [Thu, 12 Mar 2009 18:59:39 +0000 (18:59 +0000)]
Add support for 10h and 11h family of processors. Also, make the sysctl
look like a temperature.

This driver will most likely be renamed to something more meaningful in
the near future.

Submitted by: nork
MFC after: 2 weeks

15 years agopreliminary ar9280 support:
sam [Thu, 12 Mar 2009 18:18:28 +0000 (18:18 +0000)]
preliminary ar9280 support:
o add 9280 attach that sets up ini, cal, etc.
o new rf backend for 9280 and later parts
o split ini setup and spur mitigation support out to methods
  and provide 9280-specific support
o minor fixups to shared code to handle 9280-specific work

Obtained from: Atheros (ini values and some code)

15 years agoChange the sysctls for maxbcache and maxswzone from int to long. I missed
jhb [Thu, 12 Mar 2009 17:23:02 +0000 (17:23 +0000)]
Change the sysctls for maxbcache and maxswzone from int to long.  I missed
this earlier since these sysctls don't exist in 7.x yet.

15 years agoExport the current values of nbuf, ncallout, and nswbuf via read-only
jhb [Thu, 12 Mar 2009 17:21:58 +0000 (17:21 +0000)]
Export the current values of nbuf, ncallout, and nswbuf via read-only
sysctls that match the tunable names.

MFC after: 3 days

15 years agoAdd myself.
rdivacky [Thu, 12 Mar 2009 16:55:16 +0000 (16:55 +0000)]
Add myself.

Approved by: ed (mentor)

15 years agoo Turn the batch mode on if stdout is not tty.
maxim [Thu, 12 Mar 2009 13:17:46 +0000 (13:17 +0000)]
o Turn the batch mode on if stdout is not tty.

Submitted by: vsevolod
MFC after: 1 week

15 years agoo Sync synopsis with reality. Remove BUG section -- there is
maxim [Thu, 12 Mar 2009 13:03:33 +0000 (13:03 +0000)]
o Sync synopsis with reality.  Remove BUG section -- there is
a batch mode in gpart(8) now.

15 years agoThe non-modifying EA VOPs are executed with only shared vnode lock taken.
kib [Thu, 12 Mar 2009 12:43:56 +0000 (12:43 +0000)]
The non-modifying EA VOPs are executed with only shared vnode lock taken.
Provide a custom lock around initializing and tearing down EA area,
to prevent both memory leaks and double-free of it. Count the number
of EA area accessors.

Lock protocol requires either holding exclusive vnode lock to modify
i_ea_area, or shared vnode lock and owning IN_EA_LOCKED flag in i_flag.

Noted by: YAMAMOTO, Taku <taku tackymt homeip net>
Tested by: pho (previous version)
MFC after: 2 weeks

15 years agoEnsure that the semaphore value is re-checked after sem_lock
bms [Thu, 12 Mar 2009 10:36:39 +0000 (10:36 +0000)]
Ensure that the semaphore value is re-checked after sem_lock
is re-acquired, after the condition variable is signalled.

PR:             http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/127545
MFC after:      5 days
Reviewed by:    attilio

15 years agoMake semaphore debugging output more useful.
bms [Thu, 12 Mar 2009 10:34:16 +0000 (10:34 +0000)]
Make semaphore debugging output more useful.

PR:             http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/127545
MFC after:      5 days
Submitted by:   Philip Semanchuk

15 years agotxp(4) should work on all architectures now.
brueffer [Thu, 12 Mar 2009 09:52:42 +0000 (09:52 +0000)]
txp(4) should work on all architectures now.

15 years agoMove the deactivation of the device's BAR to before the loop where we
imp [Thu, 12 Mar 2009 08:42:27 +0000 (08:42 +0000)]
Move the deactivation of the device's BAR to before the loop where we
turn deactivate the resources.  While this likely doesn't matter, it
is likely to be safer.

15 years agoFix the whitespace in this file to be consistent with itself and with
imp [Thu, 12 Mar 2009 07:18:27 +0000 (07:18 +0000)]
Fix the whitespace in this file to be consistent with itself and with
the rest of the project's files.

s/sn_/fe_/ in a routine name that I copied from sn.

15 years agoread_ivar takes a uintptr_t * not a u_char *.
imp [Thu, 12 Mar 2009 06:36:44 +0000 (06:36 +0000)]
read_ivar takes a uintptr_t * not a u_char *.

15 years agoo writereg needs to return a vlue.
imp [Thu, 12 Mar 2009 06:35:00 +0000 (06:35 +0000)]
o writereg needs to return a vlue.
o Add TJ PTJ-LAN_T card.  Some more work may be needed to make this
  actually function correctly.

15 years agoMake the bit-bang callbacks for i2c implementation match their prototypes.
imp [Thu, 12 Mar 2009 06:32:30 +0000 (06:32 +0000)]
Make the bit-bang callbacks for i2c implementation match their prototypes.

15 years agoCheck the Disk FUNCE recorded in the CIS to see if we should probe for
imp [Thu, 12 Mar 2009 06:30:59 +0000 (06:30 +0000)]
Check the Disk FUNCE recorded in the CIS to see if we should probe for
both disks, or if we should suppress the slave drive.  Default to
suppressing the slave, in the case that this REQIURED tuple turns out
to not actually be present...

15 years agoBetter name for this routine... it doesn't reset the card, but resets
imp [Thu, 12 Mar 2009 06:25:30 +0000 (06:25 +0000)]
Better name for this routine...  it doesn't reset the card, but resets
the power to the card...

15 years agoDon't need to set symbol, default value is OK.
obrien [Thu, 12 Mar 2009 04:44:09 +0000 (04:44 +0000)]
Don't need to set symbol, default value is OK.

15 years agoo change a lock model based on HAL preemption lock to a normal mtx.
weongyo [Thu, 12 Mar 2009 02:51:55 +0000 (02:51 +0000)]
o change a lock model based on HAL preemption lock to a normal mtx.
  Based on the HAL preemption lock there is a problem on SMP machines
  and causes a panic.
o When a device detached the current tactic to detach NDIS USB driver is
  to call SURPRISE_REMOVED event.  So it don't need to call
  ndis_halt_nic() again.  This fixes some page faults when some drivers
  work abnormal.
o it assumes now that URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER is in
  DISPATCH_LEVEL (non-sleepable) and as further work
  URB_FUNCTION_VENDOR_XXX and URB_FUNCTION_CLASS_XXX should be.

Reviewed by: Hans Petter Selasky <hselasky_at_freebsd.org>
Tested by: Paul B. Mahol <onemda_at_gmail.com>

15 years agoMFp4 //depot/projects/usb 159004,159053,159091
thompsa [Thu, 12 Mar 2009 02:32:54 +0000 (02:32 +0000)]
MFp4 //depot/projects/usb  159004,159053,159091

More HID parsing fixes for usb mice.
 - be less strict on the last HID item usage.
 - preserve item size and count accross items
 - improve default HID usage selection.

Tested by: ache
Submitted by: Hans Petter Selasky

15 years agoXref altq.4 and bump .Dd
yongari [Thu, 12 Mar 2009 01:27:15 +0000 (01:27 +0000)]
Xref altq.4 and bump .Dd

15 years agoAdd txp(4) to the list of drivers supporting ALTQ.
yongari [Thu, 12 Mar 2009 01:21:48 +0000 (01:21 +0000)]
Add txp(4) to the list of drivers supporting ALTQ.

15 years agoUncomment txp(4), txp(4) should work on all architectures.
yongari [Thu, 12 Mar 2009 01:17:35 +0000 (01:17 +0000)]
Uncomment txp(4), txp(4) should work on all architectures.

15 years agobus_dma(9) conversion and make txp(4) work on all architectures.
yongari [Thu, 12 Mar 2009 01:14:47 +0000 (01:14 +0000)]
bus_dma(9) conversion and make txp(4) work on all architectures.
o Header file cleanup.
o bus_dma(9) conversion.
  - Removed all consumers of vtophys(9) and converted to use
    bus_dma(9).
  - Typhoon2 functional specification says the controller supports
    64bit DMA addressing. However all Typhoon controllers are known
    to lack of DAC support so 64bit DMA support was disabled.
  - The hardware can't handle more 16 fragmented Tx DMA segments so
    teach txp(4) to collapse these segments to be less than 16.
  - Added Rx buffer alignment requirements(4 bytes alignment) and
    implemented fixup code to align receive frame. Previously
    txp(4) always copied Rx frame to align it on 2 byte boundary
    but its copy overhead is much higher than unaligned access on
    i386/amd64. Alignment fixup code is now applied only for
    strict-alignment architectures. With this change i386 and
    amd64 will get instant Rx performance boost. Typhoon2 datasheet
    mentions a command that pads arbitrary bytes in Rx buffer but
    that command does not work.
  - Nuked pointer trick in descriptor ring. This does not work on
    sparc64 and replaced it with bcopy. Alternatively txp(4) can
    embed a 32 bits index value into the descriptor and compute
    real buffer address but it may make code complicated.
  - Added endianness support code in various Tx/Rx/command/response
    descriptor access. With this change txp(4) should work on all
    architectures.
o Added comments for known firmware bugs(Tx checksum offloading,
  TSO, VLAN stripping and Rx buffer padding control).
o Prefer faster memory space register access to I/O space access.
  Added fall-back mechanism to use alternative I/O space access.
  The hardware supports both memory and I/O mapped access. Users
  can still force to use old I/O space access by setting
  hw.txp.prefer_iomap tunable to 1 in /boot/loader.conf.
o Added experimental suspend/resume methods.
o Nuke error prone Rx buffer handling code and implemented local
  buffer management with TAILQ. Be definition the controller can't
  pass the last received frame to host if no Rx free buffers are
  available to use as head and tail pointer of Rx descriptor ring
  can't have the same value. In that case the Rx buffer pointer in
  Rx buffer ring still holds a valid buffer and txp_rxbuf_reclaim()
  can't fill Rx buffers as the first buffer is still valid. Instead
  of relying on the value of Rx buffer ring, introduce local buffer
  management code to handle empty buffer situation. This should fix
  a long standing bug which completely hangs the controller under
  high network load. I could easily trigger the issue by sending 64
  bytes UDP frames with netperf. I have no idea how this bugs was
  not fixed for a long time.
o Converted ithread interrupt handler to filter based one.
o Rearranged txp_detach routine such that it's now used for general
  clean-up routine.
o Show sleep image version on device attach time. This will help
  to know what action should be taken depending on sleep image
  version. The version information in datasheet was wrong for newer
  NV images so I followed Linux which seems to correctly extract
  version numbers from response descriptors.
o Firmware image is no longer downloaded in device attach time. Now
  it is reloaded whenever if_init is invoked. This is to ensure
  correct operation of hardware when something goes wrong.
  Previously the controller always run without regard to running
  state of firmware. This change will add additional controller
  initialization time but it give more robust operation as txp(4)
  always start off from a known state. The controller is put into
  sleep state until administrator explicitly up the interface.
o As firmware is loaded in if_init handler, it's now possible to
  implement real watchdog timeout handler. When watchdog timer is
  expired, full-reset the controller and initialize the hardware
  again as most other drivers do. While I'm here use our own timer
  for watchdog instead of using if_watchdog/if_timer interface.
o Instead of masking specific interrupts with TXP_IMR register,
  program TXP_IER register with the interrupts to be raised and
  use TXP_IMR to toggle interrupt generation.
o Implemented txp_wait() to wait a specific state of a controller.
o Separate boot related code from txp_download_fw() and name it
  txp_boot() to handle boot process.
o Added bus_barrier(9) to host to ARM communication.
o Added endianness to all typhoon command processing. The ARM93C
  always expects little-endian format of command/data.
o Removed __STRICT_ALIGNMENT which is not valid on FreeBSD.
  __NO_STRICT_ALIGNMENT is provided for that purpose on FreeBSD.
  Previously __STRICT_ALIGNMENT was unconditionally defined for
  all architectures.
o Rewrote SIOCSIFCAP ioctl handler such that each capability can be
  controlled by ifconfig(8). Note, disabling VLAN hardware tagging
  has no effect due to the bug of firmware.
o Don't send TXP_CMD_CLEAR_STATISTICS to clear MAC statistics in
  txp_tick(). The command is not atomic. Instead, just read the
  statistics and reflect saved statistics to the statistics.
  dev.txp.%d.stats sysctl node provides detailed MAC statistics.
  This also reduces a lot of waste of CPU cycles as processing a
  command ring takes a very long time on ARM93C. Note, Rx
  multicast and broadcast statistics does not seem to right. It
  might be another bug of firmware.
o Implemented link state change handling in txp_tick(). Now sending
  packets is allowed only after establishing a valid link. Also
  invoke link state change notification whenever its state is
  changed so pseudo drivers like lagg(4) that relies on link state
  can work with failover or link aggregation without hacks.
  if_baudrate is updated to resolved speed so SNMP agents can get
  correct bandwidth parameters.
o Overhauled Tx routine such that it now honors number of allowable
  DMA segments and checks for 4 free descriptors before trying to
  send a frame. A frame may require  4 descriptors(1 frame
  descriptor, 1 or more frame descriptors, 1 TSO option descriptor,
  one free descriptor to prevent descriptor wrap-around) at least
  so it's necessary to check available free descriptors prior to
  setting up DMA operation.
o Added a sysctl variable dev.txp.%d.process_limit to control
  how many received frames should be served in Rx handler. Valid
  ranges are 16 to 128(default 64) in unit of frames.
o Added ALTQ(4) support.
o Added missing IFCAP_VLAN_HWCSUM as txp(4) can offload checksum
  calculation as well as VLAN tag insertion/stripping.
o Fixed media header length for VLAN.
o Don't set if_mtu in device attach, it's already set in
  ether_ifattach().
o Enabled MWI.
o Fixed module unload panic when bpf listeners are active.
o Rearranged ethernet address programming logic such that it works
   on strict-alignment architectures.
o Removed unused member variables in softc.
o Added support for WOL.
o Removed now unused TXP_PCI_LOMEM/TXP_PCI_LOIO.
o Added wakeup command TXP_BOOTCMD_WAKEUP definition.
o Added a new firmware version query command, TXP_CMD_READ_VERSION.
o Removed volatile keyword in softc as bus_dmamap_sync(9) should
  take care of this.
o Removed embedded union trick of a structure used to to access
  a pointer on LP64 systems.
o Added a few TSO related definitions for struct txp_tcpseg_desc.
  However TSO is not used at all due to the limitation of hardware.
o Redefined PKT_MAX_PKTLEN to theoretical maximum size of a frame.
o Switched from bus_space_{read|write}_4 to bus_{read|write}_4.
o Added a new macro TXP_DESC_INC to compute next descriptor index.

Tested by: don.nasco <> gmail dot com

15 years agoadd asserts
sam [Thu, 12 Mar 2009 00:09:29 +0000 (00:09 +0000)]
add asserts