]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
18 years agoAdd POSIX siginfo_t's si_code, this is for upcoming POSIX realtime signal
David Xu [Fri, 14 Oct 2005 03:01:14 +0000 (03:01 +0000)]
Add POSIX siginfo_t's si_code, this is for upcoming POSIX realtime signal
support in kernel.

Earlier patch reviewed by: jhb, deischen

18 years agoFurther clean up the bridge hooks in if_ethersubr.c and ng_ether.c
Andrew Thompson [Fri, 14 Oct 2005 02:38:47 +0000 (02:38 +0000)]
Further clean up the bridge hooks in if_ethersubr.c and ng_ether.c

- move the function pointer definitions to if_bridgevar.h
- move most of the logic to the new BRIDGE_INPUT and BRIDGE_OUTPUT macros
- remove unneeded functions from if_bridgevar.h and sort a little.

18 years agoRestore the UP optimization to reduce the number of TLB invalidations. The
Alan Cox [Thu, 13 Oct 2005 23:42:12 +0000 (23:42 +0000)]
Restore the UP optimization to reduce the number of TLB invalidations.  The
previous revision only restored the MP optimization.

Describe the optimization strategy for TLB invalidations in a comment.

Reviewed by: ups@
MFC after: 3 days

18 years agoFrom 101 ways to panic your kernel.
Andrew Thompson [Thu, 13 Oct 2005 23:05:55 +0000 (23:05 +0000)]
From 101 ways to panic your kernel.

Use bridge_ifdetach() to notify the bridge that a member has been detached. The
bridge can then remove it from its interface list and not try to send out via a
dead pointer.

18 years agoIf we can't probe the RTL80x9 for some reason, fall back to probing it
Warner Losh [Thu, 13 Oct 2005 22:12:34 +0000 (22:12 +0000)]
If we can't probe the RTL80x9 for some reason, fall back to probing it
as a Novell NE-2000.  This is necessary for unpatched qemu working
correctly.  qemu claims to be a RTL8029, but doesn't implement the
RTL8029 specific registers at this time.  I've created patches for
that, but there's no reason we can't use qemu's emulation w/o these
patches.  This should make life easier for those folks that boot
FreeBSD via qemu.

18 years agoo Fix probing of rtl80x9 parts. We shouldn't be calling
Warner Losh [Thu, 13 Oct 2005 22:06:02 +0000 (22:06 +0000)]
o Fix probing of rtl80x9 parts.  We shouldn't be calling
  ed_probe_generic8390 where we're calling it.  It will be done as part
  of ed_probe_Novel_generic after things are setup in a way that
  ed_probe_generic8390 will grok.
o Fix operator precedence botch that causes a panic when setting the media
  type for 10baseT connections.
o Save the type of device so that it prints with the rest of the probe.

# this should make it work with qemu again, but only if it has my patches
# to actually implement the RTL8029 specific registers.

18 years agoConsolidate two adjacent conditional blocks
Julian Elischer [Thu, 13 Oct 2005 21:48:27 +0000 (21:48 +0000)]
Consolidate two adjacent conditional blocks
I actually believe the code in question should be elsewhere (in the preceding
function).

MFC after: 1 week

18 years agoIn detach method, move if_free() after bus_teardown_intr().
Ruslan Ermilov [Thu, 13 Oct 2005 21:11:20 +0000 (21:11 +0000)]
In detach method, move if_free() after bus_teardown_intr().

18 years agoMinor tweaks and fixups:
John Baldwin [Thu, 13 Oct 2005 20:22:07 +0000 (20:22 +0000)]
Minor tweaks and fixups:
- Use device_printf() and if_printf() and remove nge_unit.
- Use callout_init_mtx() and remove nge_tick_locked() as nge_tick() is now
  always called with the driver lock held.
- Use M_ZERO to contigmalloc() when allocating nge_ldata.  It was possible
  for the random garbage to be used in certain cases otherwise.
- Cleanup attach error handling including no longer leaking nge_ldata.
- Add locking to the ifmedia callouts.
- Lock accesses to if_hwassist and if_capenable in nge_ioctl().

Submitted by: Yuriy N. Shkandybin jura at networks dot ru (1, 3, 4)
Tested by: Yuriy N. Shkandybin jura at networks dot ru
MFC after: 3 days

18 years agoAdd support for ATI IXP[234]00.
Joel Dahl [Thu, 13 Oct 2005 18:28:26 +0000 (18:28 +0000)]
Add support for ATI IXP[234]00.

18 years agofixed a crush when either -lh or -ls option is used.
Hajimu UMEMOTO [Thu, 13 Oct 2005 18:12:46 +0000 (18:12 +0000)]
fixed a crush when either -lh or -ls option is used.

Obtained from: KAME

18 years agosetkey(8) is not WARNS=2 compliant, yet.
Hajimu UMEMOTO [Thu, 13 Oct 2005 17:57:34 +0000 (17:57 +0000)]
setkey(8) is not WARNS=2 compliant, yet.

18 years agoRemove a stale comment.
Ruslan Ermilov [Thu, 13 Oct 2005 17:26:14 +0000 (17:26 +0000)]
Remove a stale comment.

18 years agoLanguage nits.
Xin LI [Thu, 13 Oct 2005 17:25:28 +0000 (17:25 +0000)]
Language nits.

Submitted by: nukq at newsmth org, me

18 years agoMention that hptmv(4) actually works for the amd64 platform as well.
Xin LI [Thu, 13 Oct 2005 17:20:06 +0000 (17:20 +0000)]
Mention that hptmv(4) actually works for the amd64 platform as well.

Suggested by: Mikhail Teterin [mi+mx aldan algebra com]
Submitted by: me
PR: docs/87302

18 years ago- Clarify when the softc is allocated. It is allocated when a device is
John Baldwin [Thu, 13 Oct 2005 16:57:53 +0000 (16:57 +0000)]
- Clarify when the softc is allocated.  It is allocated when a device is
  probed and attached, not on the first call to device_get_softc().
- Add a cross reference to DEVICE_PROBE regarding the caveats of using the
  softc in a driver's probe routine.
- Fix a grammar bogon.

PR: docs/87176 (1)
Submitted by: Devon H. O'Dell dodell at offmyserver dot com (1)
MFC after: 3 days

18 years ago- When bintime was added to this manpage, standalone .Nm changed from
John Baldwin [Thu, 13 Oct 2005 16:01:28 +0000 (16:01 +0000)]
- When bintime was added to this manpage, standalone .Nm changed from
  microtime to bintime.  However, one standaline .Nm wasn't changed, and as
  a result, the manpage claimed that bintime was added in both 5.0 and 3.0.
  Fix by listing microtime explicitly.
- Fix a grammar bogon.

PR: docs/87147 (1)
Submitted by: Matthew Luckie (1)
MFC after: 3 days

18 years ago- When flushing node input queue, check whether item has a callback. If
Gleb Smirnoff [Thu, 13 Oct 2005 11:55:50 +0000 (11:55 +0000)]
- When flushing node input queue, check whether item has a callback. If
  it does, then call it suppling ENOENT as error value.
- Add assert, that helped to catch the above error.

18 years agoClean up the if_bridge hooks a bit in if_ethersubr.c and ng_ether.c, move
Andrew Thompson [Thu, 13 Oct 2005 09:43:30 +0000 (09:43 +0000)]
Clean up the if_bridge hooks a bit in if_ethersubr.c and ng_ether.c, move
the broadcast/multicast test to bridge_input().

Requested by: glebius

18 years agoMinor cleanups, no functional changes
Søren Schmidt [Thu, 13 Oct 2005 08:05:21 +0000 (08:05 +0000)]
Minor cleanups, no functional changes

18 years ago1) Use GNU libtool to build shared libraries on non-FreeBSD
Tim Kientzle [Thu, 13 Oct 2005 05:51:38 +0000 (05:51 +0000)]
1) Use GNU libtool to build shared libraries on non-FreeBSD
   systems (or on FreeBSD systems when using ports).

2) Overhaul the versioning logic.  In particular,
   SHLIB_MAJOR number is now computed as "major+minor",
   which ensures library versions are the same for
   the FreeBSD build system and the portable
   libtool/autoconf/automake build system.

18 years agoRestore optimizations to reduce TLB shootdowns.
Stephan Uphoff [Thu, 13 Oct 2005 03:55:25 +0000 (03:55 +0000)]
Restore optimizations to reduce TLB shootdowns.
Alan Cox pointed out that they are really useful for
sendfile().

MFC after: 3 days

18 years agoFix tinderbox box by removing incomplete/bad spl usage. Proper giant free
Doug Ambrisko [Wed, 12 Oct 2005 22:33:22 +0000 (22:33 +0000)]
Fix tinderbox box by removing incomplete/bad spl usage.  Proper giant free
locking is required in for aio.

Pointed out by: imp

18 years agoFirst start rc.d/ipsec and then rc.d/mountcritremote, so we can mount
Pawel Jakub Dawidek [Wed, 12 Oct 2005 22:14:44 +0000 (22:14 +0000)]
First start rc.d/ipsec and then rc.d/mountcritremote, so we can mount
NFS file system over IPsec.

Suggested by: Tomasz Pi³at <tomasz.pilat@axelspringer.pl>

18 years agosetkey(8) was moved to /sbin/.
Pawel Jakub Dawidek [Wed, 12 Oct 2005 21:43:47 +0000 (21:43 +0000)]
setkey(8) was moved to /sbin/.

18 years agosetkey(8) was repo-copied from usr.sbin/ to sbin/.
Pawel Jakub Dawidek [Wed, 12 Oct 2005 21:40:41 +0000 (21:40 +0000)]
setkey(8) was repo-copied from usr.sbin/ to sbin/.
This will allow for NFS mount of /usr over IPsec.

Discussed on: arch@

18 years agoMFen:
Xin LI [Wed, 12 Oct 2005 20:30:39 +0000 (20:30 +0000)]
MFen:
errata/article.sgml: 1.72 -> 1.73.2.1
hardware/amd64/proc-amd64.sgml: 1.3.4.1 -> 1.5.2.1 [dummy merge]
hardware/common/artheader.sgml: 1.6 -> 1.7
hardware/common/dev.sgml: 1.277 -> 1.282.2.3
hardware/common/intro.sgml: 1.6 -> 1.7
installation/common/artheader.sgml: 1.5 -> 1.6
installation/common/trouble.sgml: 1.17 -> 1.19
installation/common/upgrade.sgml: 1.12 -> 1.13
readme/article.sgml:        1.31.2.2 -> 1.37
relnotes/common/new.sgml: 1.849 -> 1.883.2.7
Makefile: 1.3 -> 1.7

Follow the English revision to remove early adopter guide.

This is intended for a RELENG_6 and RELENG_6_0 merge.

Obtained from: The FreeBSD Simplified Chinese Project (delphij)

18 years agoAdd support for the ATI IXP[234]00 series chipsets.
Søren Schmidt [Wed, 12 Oct 2005 20:00:26 +0000 (20:00 +0000)]
Add support for the ATI IXP[234]00 series chipsets.

HW donated by: sentex

18 years agoChange the reference counting to count the number of cloned interfaces for each
Andrew Thompson [Wed, 12 Oct 2005 19:52:16 +0000 (19:52 +0000)]
Change the reference counting to count the number of cloned interfaces for each
cloner. This ensures that ifc->ifc_units is not prematurely freed in
if_clone_detach() before the clones are destroyed, resulting in memory modified
after free. This could be triggered with if_vlan.

Assert that all cloners have been destroyed when freeing the memory.

Change all simple cloners to destroy their clones with ifc_simple_destroy() on
module unload so the reference count is properly updated. This also cleans up
the interface destroy routines and allows future optimisation.

Discussed with: brooks, pjd, -current
Reviewed by: brooks

18 years agoBe pedantic here: We're converting from network byte order to host
Warner Losh [Wed, 12 Oct 2005 19:12:46 +0000 (19:12 +0000)]
Be pedantic here: We're converting from network byte order to host
byte order in these cases.  This is a nop in terms of the generated
code, but is logically incorrect.

PR: 73852

18 years agoDocument that changes to nsswitch.conf might be needed when
Bjoern A. Zeeb [Wed, 12 Oct 2005 19:05:22 +0000 (19:05 +0000)]
Document that changes to nsswitch.conf might be needed when
compiling with NO_NIS.

PR: bin/87221
Reviewed by: simon
MFC after: 4 weeks

18 years agoo INP_ONESBCAST is inpcb.inp_vflag flag not inp_flags. The confusion
Maxim Konovalov [Wed, 12 Oct 2005 18:13:25 +0000 (18:13 +0000)]
o INP_ONESBCAST is inpcb.inp_vflag flag not inp_flags.  The confusion
with IP_PORTRANGE_HIGH leads to the incorrect checksum calculation.

PR: kern/87306
Submitted by: Rickard Lind
Reviewed by: bms
MFC after: 2 weeks

18 years agoUse a better EVFILT_LIO description!
Doug Ambrisko [Wed, 12 Oct 2005 18:07:13 +0000 (18:07 +0000)]
Use a better EVFILT_LIO description!

Submitted by: alc

18 years agoThis test can run now.
Doug Ambrisko [Wed, 12 Oct 2005 18:04:18 +0000 (18:04 +0000)]
This test can run now.

18 years agoAdd in kqueue support to LIO event notification and fix how it handled
Doug Ambrisko [Wed, 12 Oct 2005 17:51:31 +0000 (17:51 +0000)]
Add in kqueue support to LIO event notification and fix how it handled
notifications when LIO operations completed.  These were the problems
with LIO event complete notification:
      - Move all LIO/AIO event notification into one general function
so we don't have bugs in different data paths.  This unification
got rid of several notification bugs one of which if kqueue was
used a SIGILL could get sent to the process.
      - Change the LIO event accounting to count all AIO request that
could have been split across the fast path and daemon mode.
The prior accounting only kept track of AIO op's in that
mode and not the entire list of operations.  This could cause
a bogus LIO event complete notification to occur when all of
the fast path AIO op's completed and not the AIO op's that
ended up queued for the daemon.

Suggestions from: alc

18 years agoMake some purely internal symbols static to reduce link pollution.
Tim Kientzle [Wed, 12 Oct 2005 15:38:45 +0000 (15:38 +0000)]
Make some purely internal symbols static to reduce link pollution.

18 years agoWhen performing a VOP_LOOKUP() as part of UFS1 extended attribute
Robert Watson [Wed, 12 Oct 2005 14:18:58 +0000 (14:18 +0000)]
When performing a VOP_LOOKUP() as part of UFS1 extended attribute
auto-start, set cnp.cn_lkflags to LK_EXCLUSIVE.  This flag must now
be set so that lockmgr knows what kind of lock to acquire, and it
will panic if not specified.  This resulted in a panic when using
extended attributes on UFS1 as of locking work present in the 6.x
branch.

This is a RELENG_6_0 merge candidate.

Reported by: lofi
MFC after: 3 days

18 years agoNew release notes: snd_mss(4) manual page added.
Joel Dahl [Wed, 12 Oct 2005 12:24:37 +0000 (12:24 +0000)]
New release notes: snd_mss(4) manual page added.

18 years agoAfter rev. 1.103 the oitem and ierror are no longer needed, remove them.
Gleb Smirnoff [Wed, 12 Oct 2005 10:18:44 +0000 (10:18 +0000)]
After rev. 1.103 the oitem and ierror are no longer needed, remove them.

18 years ago__MAKE_CONF doesn't really belong here because it is
Yaroslav Tykhiy [Wed, 12 Oct 2005 10:09:36 +0000 (10:09 +0000)]
__MAKE_CONF doesn't really belong here because it is
a FreeBSD extension of sys.mk.  A xref to make.conf(5)
will be enough here.

Requested by: ru

18 years agoUnbreak the net.inet6.tcp6.getcred sysctl.
Philip Paeps [Wed, 12 Oct 2005 09:24:18 +0000 (09:24 +0000)]
Unbreak the net.inet6.tcp6.getcred sysctl.

This makes inetd/auth work again in IPv6 setups.

Pointy hat to: ume/KAME

18 years agoAES counter mode uses 8byte IV, not 16 bytes.
Hajimu UMEMOTO [Wed, 12 Oct 2005 09:13:48 +0000 (09:13 +0000)]
AES counter mode uses 8byte IV, not 16 bytes.

Obtained from: NetBSD

18 years agoMove execve's access time update functionality into a new
Diomidis Spinellis [Wed, 12 Oct 2005 06:56:00 +0000 (06:56 +0000)]
Move execve's access time update functionality into a new
vfs_mark_atime() function, and use the new function for
performing efficient atime updates in mmap().

Reviewed by: bde
MFC after: 2 weeks

18 years agoMinor style nit: tab instead of space after #define
Tim Kientzle [Wed, 12 Oct 2005 03:28:38 +0000 (03:28 +0000)]
Minor style nit:  tab instead of space after #define

18 years agoWhen reading GNU-style sparse archive entries, handle
Tim Kientzle [Wed, 12 Oct 2005 03:27:46 +0000 (03:27 +0000)]
When reading GNU-style sparse archive entries, handle
the first sparse block correctly (we used to assume
that the first sparse block was always at offset zero).

18 years agoIn pax interchange format, use UTF8 for writing
Tim Kientzle [Wed, 12 Oct 2005 03:26:09 +0000 (03:26 +0000)]
In pax interchange format, use UTF8 for writing
link names, usernames, or group names that contain
non-ASCII characters.

In particular, this corrects an inconsistency reported
by Ed Maste when archiving symlinks with odd characters:
long symlinks would get preserved, short ones would
be changed.

18 years agoConvert ndis_set_info() and ndis_get_info() from using msleep()
Bill Paul [Wed, 12 Oct 2005 03:02:50 +0000 (03:02 +0000)]
Convert ndis_set_info() and ndis_get_info() from using msleep()
to KeSetEvent()/KeWaitForSingleObject(). Also make object argument
of KeWaitForSingleObject() a void * like it's supposed to be.

18 years agoEnsure that a thread stays on same CPU when calculating per CPU
Stephan Uphoff [Wed, 12 Oct 2005 01:41:48 +0000 (01:41 +0000)]
Ensure that a thread stays on same CPU when calculating per CPU
TLB shootdown requirements. Otherwise a CPU may not get the needed
TLB invalidation.

The PTE valid and access flags can not be used here to avoid TLB
shootdowns unless sf->cpumask == all_cpus.
( Otherwise some CPUs may still hold an even older entry in the TLB)
Since sf_buf_alloc mappings are normally always used this is
also not really useful and presetting accessed and modified
allows the CPU to speculatively load the entry into the TLB.

Both bugs can cause random data corruption.

MFC after: 3 days

18 years agoDrain all pending events from the driver when we get an
Bill Paul [Wed, 12 Oct 2005 00:57:31 +0000 (00:57 +0000)]
Drain all pending events from the driver when we get an
RTM_IFINFO message, in case some were posted before ndis_events
was run. This keeps us in sync with wpa_supplicant.

18 years agoConnect rc.d scripts for the hcsecd(8) and sdpd(8) daemons to the build.
Maksim Yevmenkin [Wed, 12 Oct 2005 00:45:58 +0000 (00:45 +0000)]
Connect rc.d scripts for the hcsecd(8) and sdpd(8) daemons to the build.

MFC after: 1 month

18 years agoRecord sk(4) as having native support for extended VLAN frames.
Yaroslav Tykhiy [Tue, 11 Oct 2005 22:59:01 +0000 (22:59 +0000)]
Record sk(4) as having native support for extended VLAN frames.

PR: kern/79998
MFC after: 1 month

18 years agoMark sk(4) as capable of handling extended VLAN frames. NICs
Yaroslav Tykhiy [Tue, 11 Oct 2005 22:55:16 +0000 (22:55 +0000)]
Mark sk(4) as capable of handling extended VLAN frames.  NICs
based on XMAC II chip should be ready for this in their initial
mode of operation, and Yukon-based NICs are configured so by
the driver.

PR: kern/79998
MFC after: 1 month

18 years agoFix build: remove stale KASSERT() for mutex that no longer exists.
Bill Paul [Tue, 11 Oct 2005 21:31:23 +0000 (21:31 +0000)]
Fix build: remove stale KASSERT() for mutex that no longer exists.

18 years agoAdd rc.d scripts for the hcsecd(8) and sdpd(8) daemons. Put defaults into
Maksim Yevmenkin [Tue, 11 Oct 2005 19:16:48 +0000 (19:16 +0000)]
Add rc.d scripts for the hcsecd(8) and sdpd(8) daemons. Put defaults into
/etc/defaults/rc.conf. Both daemons can run even if no Bluetooth devices
are attached to the system. Both daemons depend on Bluetooth socket layer
and thus disabled by default. Bluetooth sockets layer must be either loaded
as a module or compiled into kernel before the daemons can run.

MFC after: 1 month

18 years agoFix a syntax nit (superfluous 'a').
Giorgos Keramidas [Tue, 11 Oct 2005 16:05:35 +0000 (16:05 +0000)]
Fix a syntax nit (superfluous 'a').

Submitted by: Anders Hanssen <anders@rethink.no>

18 years ago Fix a regression introduced in rev. 1.107. If an item once had a writer
Gleb Smirnoff [Tue, 11 Oct 2005 13:48:38 +0000 (13:48 +0000)]
  Fix a regression introduced in rev. 1.107. If an item once had a writer
semantics, and then was reused for next node, it still would be applied
as writer again.
  To fix the regression the decision is made never to alter item->el_flags
after the item has been allocated. This requires checking for overrides
both in ng_dequeue() and in ng_snd_item().

  Details:
  - Caller of the ng_apply_item() knows what is the current access to
    node and specifies it to ng_apply_item(). The latter drops the
    given access after item has beem applied.
  - ng_dequeue() needs to be supplied with int pointer, where it stores
    the obtained access on node.
  - Check for node/hook access overrides in ng_dequeue().

18 years agoCorrect a man-in-the-middle SSL version rollback vulnerability.
Colin Percival [Tue, 11 Oct 2005 11:50:36 +0000 (11:50 +0000)]
Correct a man-in-the-middle SSL version rollback vulnerability.

Security: FreeBSD-SA-05:21.openssl

18 years agoStyle and other fixes for the last commit.
Gleb Smirnoff [Tue, 11 Oct 2005 09:11:57 +0000 (09:11 +0000)]
Style and other fixes for the last commit.

Submitted by: ru

18 years agoFixed range reduction for large multiples of pi/2 on systems with
Bruce Evans [Tue, 11 Oct 2005 07:56:05 +0000 (07:56 +0000)]
Fixed range reduction for large multiples of pi/2 on systems with
broken assignment to floats (e.g., i386 with gcc -O, but not amd64 or
ia64; i386 with gcc -O0 worked accidentally).

Use an unnamed volatile temporary variable to trick gcc -O into clipping
extra precision on assignment.  It's surprising that only 1 place needed
to be changed.

For tanf() on i386 with gcc -O, the bug caused errors > 1 ulp with a
density of 2.3% for args larger in magnitude than 128*pi/2, with a
maximum error of 1.624 ulps.

After this fix, exhaustive testing shows that range reduction for
floats works as intended assuming that it is in within a factor of
about 2^16 of working as intended for doubles.  It provides >= 8
extra bits of precision for all ranges.  On i386:

range                       max error in double/single ulps    extra precision
-----                       -------------------------------    ---------------
0 to 3*pi/4                 0x000d3132  /  0.0016              9+ bits
3*pi/4 to 128*pi/2          0x00160445  /  0.0027              8+
128*pi/2 to +Inf            0x00000030  /  0.00000009          23+
128*pi/2 up, -O0 before fix 0x00000030  /  0.00000009          23+
128*pi/2 up, -O1 before fix 0x10000000  /  0.5                 1

The 23+ bits of extra precision for large multiples corresponds to almost
perfect reduction to a pair of floats (24 extra would be perfect).

After this fix, the maximum relative error (relative to the corresponding
fdlibm double precision function) is < 1 ulp for all basic trig functions
on all 2^32 float args on all machines tested:

          amd64     ia64      i386-O0   i386-O1
  ------    ------    ------    ------
cosf:     0.8681    0.8681    0.7927    0.5650
sinf:     0.8733    0.8610    0.7849    0.5651
tanf:     0.9708    0.9329    0.9329    0.7035

18 years agoFix typo.
Gleb Smirnoff [Tue, 11 Oct 2005 07:30:06 +0000 (07:30 +0000)]
Fix typo.

Submitted by: maxim
MFC after: 3 days

18 years agoDo not unconditionally set a spanning tree port to forwarding as the link may be
Andrew Thompson [Tue, 11 Oct 2005 02:58:32 +0000 (02:58 +0000)]
Do not unconditionally set a spanning tree port to forwarding as the link may be
down when we attach. We wont get updated until a linkstate change happens.

Go via bstp_ifupdstatus() which checks the media status first.

18 years agoIDs for generic card, airvast wm_100, i-o data wn-b11/cfz
Warner Losh [Tue, 11 Oct 2005 01:05:39 +0000 (01:05 +0000)]
IDs for generic card, airvast wm_100, i-o data wn-b11/cfz

Some of these may have been obtained from OpenBSD...

18 years agoBuffalo LPC4/CLX ID
Warner Losh [Tue, 11 Oct 2005 01:04:16 +0000 (01:04 +0000)]
Buffalo LPC4/CLX ID

18 years agoNew OEM generic card. "10/100 Fast Ethernet PC Card". It has a
Warner Losh [Tue, 11 Oct 2005 01:02:16 +0000 (01:02 +0000)]
New OEM generic card.  "10/100 Fast Ethernet PC Card".  It has a
generic sounding CIS "PCMCIA", "FAST ETHERENT CARD" and a bogus MANFID
code (0xffff and 0x1090).  However, since I'm not aware of 'generic'
cards that aren't NE-2000oids, go with that and hope for the best.

18 years agoMake forwarding of connect/disconnect events optional. wpa_supplicant
Bill Paul [Mon, 10 Oct 2005 20:40:28 +0000 (20:40 +0000)]
Make forwarding of connect/disconnect events optional. wpa_supplicant
seems to already be able to tell when it's associated and the extra
events just confuse it. Only forward media-specific events by default.

18 years agoFix a missing set of lock operations.
Scott Long [Mon, 10 Oct 2005 20:13:31 +0000 (20:13 +0000)]
Fix a missing set of lock operations.

Submitted by: green
PR: 87191

18 years agoFixed range reduction near (but not very near) medium-sized multiples
Bruce Evans [Mon, 10 Oct 2005 20:02:02 +0000 (20:02 +0000)]
Fixed range reduction near (but not very near) medium-sized multiples
of pi/2 (1 line) and expand a comment about related magic (many lines).

The bug was essentially the same as for the +-pi/2 case (a mistranslated
mask), but was smaller so it only significantly affected multiples
starting near +-13*pi/2.  At least on amd64, for cosf() on all 2^32
float args, the bug caused 128 errors of >= 1 ulp, with a maximum error
of 1.2393 ulps.

18 years agoCorrect the former patch to the way it would have looked after review.
Søren Schmidt [Mon, 10 Oct 2005 19:13:27 +0000 (19:13 +0000)]
Correct the former patch to the way it would have looked after review.

18 years agoProperly react to allocation failures.
Søren Schmidt [Mon, 10 Oct 2005 19:12:43 +0000 (19:12 +0000)]
Properly react to allocation failures.

Found by: imp@

18 years agoAvoid unintended VMIO on directories and symlinks due to leftover object
Tor Egge [Mon, 10 Oct 2005 19:02:04 +0000 (19:02 +0000)]
Avoid unintended VMIO on directories and symlinks due to leftover object
not having been destroyed.

18 years agoGrrr. Add one more missing NDIS_UNLOCK().
Bill Paul [Mon, 10 Oct 2005 18:41:36 +0000 (18:41 +0000)]
Grrr. Add one more missing NDIS_UNLOCK().

18 years agoAdd missing NDIS_UNLOCK() in one of the failure cases in SIOCGPRIVATE_0.
Bill Paul [Mon, 10 Oct 2005 18:17:46 +0000 (18:17 +0000)]
Add missing NDIS_UNLOCK() in one of the failure cases in SIOCGPRIVATE_0.

18 years agoAutogenerate hardware notes for snd_mss(4).
Joel Dahl [Mon, 10 Oct 2005 18:01:18 +0000 (18:01 +0000)]
Autogenerate hardware notes for snd_mss(4).

18 years agoEnable -D ndis support in wpa_supplicant and add the ndis_events utility.
Bill Paul [Mon, 10 Oct 2005 17:51:12 +0000 (17:51 +0000)]
Enable -D ndis support in wpa_supplicant and add the ndis_events utility.
This allows wpa_supplicant to work with WPA and WPA2 compliant NDIS
drivers.

18 years ago- Xref snd_mss(4).
Joel Dahl [Mon, 10 Oct 2005 17:49:40 +0000 (17:49 +0000)]
-  Xref snd_mss(4).
-  Remove a few items from the HARDWARE list.  This support is
   already described in the snd_mss(4) manual page.

18 years agoRemove the driver_ndis files from the exclusion list
Bill Paul [Mon, 10 Oct 2005 17:48:01 +0000 (17:48 +0000)]
Remove the driver_ndis files from the exclusion list

18 years agoAdd manual page for snd_mss(4) and hook it up to the build.
Joel Dahl [Mon, 10 Oct 2005 17:46:43 +0000 (17:46 +0000)]
Add manual page for snd_mss(4) and hook it up to the build.

Reviewed by: brueffer

18 years agoThis commit was generated by cvs2svn to compensate for changes in r151208,
Bill Paul [Mon, 10 Oct 2005 17:46:15 +0000 (17:46 +0000)]
This commit was generated by cvs2svn to compensate for changes in r151208,
which included commits to RCS files with non-trunk default branches.

18 years agoImport the driver_ndis files from the 0.3.9 distribution.
Bill Paul [Mon, 10 Oct 2005 17:46:15 +0000 (17:46 +0000)]
Import the driver_ndis files from the 0.3.9 distribution.

18 years agoThis commit makes a big round of updates and fixes many, many things.
Bill Paul [Mon, 10 Oct 2005 16:46:39 +0000 (16:46 +0000)]
This commit makes a big round of updates and fixes many, many things.

First and most importantly, I threw out the thread priority-twiddling
implementation of KeRaiseIrql()/KeLowerIrq()/KeGetCurrentIrql() in
favor of a new scheme that uses sleep mutexes. The old scheme was
really very naughty and sought to provide the same behavior as
Windows spinlocks (i.e. blocking pre-emption) but in a way that
wouldn't raise the ire of WITNESS. The new scheme represents
'DISPATCH_LEVEL' as the acquisition of a per-cpu sleep mutex. If
a thread on cpu0 acquires the 'dispatcher mutex,' it will block
any other thread on the same processor that tries to acquire it,
in effect only allowing one thread on the processor to be at
'DISPATCH_LEVEL' at any given time. It can then do the 'atomic sit
and spin' routine on the spinlock variable itself. If a thread on
cpu1 wants to acquire the same spinlock, it acquires the 'dispatcher
mutex' for cpu1 and then it too does an atomic sit and spin to try
acquiring the spinlock.

Unlike real spinlocks, this does not disable pre-emption of all
threads on the CPU, but it does put any threads involved with
the NDISulator to sleep, which is just as good for our purposes.

This means I can now play nice with WITNESS, and I can safely do
things like call malloc() when I'm at 'DISPATCH_LEVEL,' which
you're allowed to do in Windows.

Next, I completely re-wrote most of the event/timer/mutex handling
and wait code. KeWaitForSingleObject() and KeWaitForMultipleObjects()
have been re-written to use condition variables instead of msleep().
This allows us to use the Windows convention whereby thread A can
tell thread B "wake up with a boosted priority." (With msleep(), you
instead have thread B saying "when I get woken up, I'll use this
priority here," and thread A can't tell it to do otherwise.) The
new KeWaitForMultipleObjects() has been better tested and better
duplicates the semantics of its Windows counterpart.

I also overhauled the IoQueueWorkItem() API and underlying code.
Like KeInsertQueueDpc(), IoQueueWorkItem() must insure that the
same work item isn't put on the queue twice. ExQueueWorkItem(),
which in my implementation is built on top of IoQueueWorkItem(),
was also modified to perform a similar test.

I renamed the doubly-linked list macros to give them the same names
as their Windows counterparts and fixed RemoveListTail() and
RemoveListHead() so they properly return the removed item.

I also corrected the list handling code in ntoskrnl_dpc_thread()
and ntoskrnl_workitem_thread(). I realized that the original logic
did not correctly handle the case where a DPC callout tries to
queue up another DPC. It works correctly now.

I implemented IoConnectInterrupt() and IoDisconnectInterrupt() and
modified NdisMRegisterInterrupt() and NdisMDisconnectInterrupt() to
use them. I also tried to duplicate the interrupt handling scheme
used in Windows. The interrupt handling is now internal to ndis.ko,
and the ndis_intr() function has been removed from if_ndis.c. (In
the USB case, interrupt handling isn't needed in if_ndis.c anyway.)

NdisMSleep() has been rewritten to use a KeWaitForSingleObject()
and a KeTimer, which is how it works in Windows. (This is mainly
to insure that the NDISulator uses the KeTimer API so I can spot
any problems with it that may arise.)

KeCancelTimer() has been changed so that it only cancels timers, and
does not attempt to cancel a DPC if the timer managed to fire and
queue one up before KeCancelTimer() was called. The Windows DDK
documentation seems to imply that KeCantelTimer() will also call
KeRemoveQueueDpc() if necessary, but it really doesn't.

The KeTimer implementation has been rewritten to use the callout API
directly instead of timeout()/untimeout(). I still cheat a little in
that I have to manage my own small callout timer wheel, but the timer
code works more smoothly now. I discovered a race condition using
timeout()/untimeout() with periodic timers where untimeout() fails
to actually cancel a timer. I don't quite understand where the race
is, using callout_init()/callout_reset()/callout_stop() directly
seems to fix it.

I also discovered and fixed a bug in winx32_wrap.S related to
translating _stdcall calls. There are a couple of routines
(i.e. the 64-bit arithmetic intrinsics in subr_ntoskrnl) that
return 64-bit quantities. On the x86 arch, 64-bit values are
returned in the %eax and %edx registers. However, it happens
that the ctxsw_utow() routine uses %edx as a scratch register,
and x86_stdcall_wrap() and x86_stdcall_call() were only preserving
%eax before branching to ctxsw_utow(). This means %edx was getting
clobbered in some cases. Curiously, the most noticeable effect of this
bug is that the driver for the TI AXC110 chipset would constantly drop
and reacquire its link for no apparent reason. Both %eax and %edx
are preserved on the stack now. The _fastcall and _regparm
wrappers already handled everything correctly.

I changed if_ndis to use IoAllocateWorkItem() and IoQueueWorkItem()
instead of the NdisScheduleWorkItem() API. This is to avoid possible
deadlocks with any drivers that use NdisScheduleWorkItem() themselves.

The unicode/ansi conversion handling code has been cleaned up. The
internal routines have been moved to subr_ntoskrnl and the
RtlXXX routines have been exported so that subr_ndis can call them.
This removes the incestuous relationship between the two modules
regarding this code and fixes the implementation so that it honors
the 'maxlen' fields correctly. (Previously it was possible for
NdisUnicodeStringToAnsiString() to possibly clobber memory it didn't
own, which was causing many mysterious crashes in the Marvell 8335
driver.)

The registry handling code (NdisOpen/Close/ReadConfiguration()) has
been fixed to allocate memory for all the parameters it hands out to
callers and delete whem when NdisCloseConfiguration() is called.
(Previously, it would secretly use a single static buffer.)

I also substantially updated if_ndis so that the source can now be
built on FreeBSD 7, 6 and 5 without any changes. On FreeBSD 5, only
WEP support is enabled. On FreeBSD 6 and 7, WPA-PSK support is enabled.

The original WPA code has been updated to fit in more cleanly with
the net80211 API, and to eleminate the use of magic numbers. The
ndis_80211_setstate() routine now sets a default authmode of OPEN
and initializes the RTS threshold and fragmentation threshold.
The WPA routines were changed so that the authentication mode is
always set first, followed by the cipher. Some drivers depend on
the operations being performed in this order.

I also added passthrough ioctls that allow application code to
directly call the MiniportSetInformation()/MiniportQueryInformation()
methods via ndis_set_info() and ndis_get_info(). The ndis_linksts()
routine also caches the last 4 events signalled by the driver via
NdisMIndicateStatus(), and they can be queried by an application via
a separate ioctl. This is done to allow wpa_supplicant to directly
program the various crypto and key management options in the driver,
allowing things like WPA2 support to work.

Whew.

18 years agoCorrect typo.
Ceri Davies [Mon, 10 Oct 2005 15:25:39 +0000 (15:25 +0000)]
Correct typo.

Discussed with: glebius

18 years agoBug fix initialization on multi-core HTT CPUs.
Joseph Koshy [Mon, 10 Oct 2005 15:21:08 +0000 (15:21 +0000)]
Bug fix initialization on multi-core HTT CPUs.

Reported by: ps
Tested by: ps

18 years ago- Note that ng_iface(4) now supports ALTQ.
Gleb Smirnoff [Mon, 10 Oct 2005 15:14:37 +0000 (15:14 +0000)]
- Note that ng_iface(4) now supports ALTQ.
- Explain when ALTQ should be used on ng_iface(4) and when not.

18 years agoALTQ support for ng_iface(4). Before turning on please consult manual page.
Gleb Smirnoff [Mon, 10 Oct 2005 15:12:59 +0000 (15:12 +0000)]
ALTQ support for ng_iface(4). Before turning on please consult manual page.

18 years agoReplace "/etc/make.conf" with references to make.conf(5)
Yaroslav Tykhiy [Mon, 10 Oct 2005 14:55:59 +0000 (14:55 +0000)]
Replace "/etc/make.conf" with references to make.conf(5)
where applicable.  The main reason for this change is that
the location of make.conf is not constant and can be
modified via __MAKE_CONF.  This change also improves
hyper-text linkage in our manpages.

MFC after: 2 weeks

18 years agoClarify the usage and effects of sys.mk, make.conf(5), and __MAKE_CONF.
Yaroslav Tykhiy [Mon, 10 Oct 2005 14:49:55 +0000 (14:49 +0000)]
Clarify the usage and effects of sys.mk, make.conf(5), and __MAKE_CONF.

MFC after: 2 weeks

18 years ago* pkg_version(1) exits if INDEX files is not found and -I is not
Kirill Ponomarev [Mon, 10 Oct 2005 12:35:31 +0000 (12:35 +0000)]
* pkg_version(1) exits if INDEX files is not found and -I is not
  specified.  The result is that the package will be listed with a '?'
  as if it was not found within the INDEX file, so fix this behaviour.
* Remove trailing spaces.

PR: bin/87136
Submitted by: Sean Farley <sean-freebsd at farley dot org>
MFC after: 3 days

18 years agoThe pthread_attr_set_createsuspend_np was broken, fix it by
David Xu [Mon, 10 Oct 2005 12:15:07 +0000 (12:15 +0000)]
The pthread_attr_set_createsuspend_np was broken, fix it by
replacing THR_FLAGS_SUSPENDED with THR_FLAGS_NEED_SUSPEND.

18 years agoFix pkg_info(1) and pkg_delete(1) to handle properly packages which
Kirill Ponomarev [Mon, 10 Oct 2005 08:38:21 +0000 (08:38 +0000)]
Fix pkg_info(1) and pkg_delete(1) to handle properly packages which
names start with a digit.

PR: bin/76858
Submitted by: Matthew D. Fuller <fullermd@over-yonder dot net>
MFC after: 3 days

18 years agoRelease clean buffer with wrong size and no dependencies also for non-VMIO
Tor Egge [Sun, 9 Oct 2005 22:41:25 +0000 (22:41 +0000)]
Release clean buffer with wrong size and no dependencies also for non-VMIO
case.

18 years agoAdjust totread argument passed to cluster_read() to account for offset not
Tor Egge [Sun, 9 Oct 2005 21:11:25 +0000 (21:11 +0000)]
Adjust totread argument passed to cluster_read() to account for offset not
being block aligned.

18 years agoWhen breaking up a large request into smaller ones for the strategy
Peter Edwards [Sun, 9 Oct 2005 21:11:05 +0000 (21:11 +0000)]
When breaking up a large request into smaller ones for the strategy
routine, create all the child bio objects before starting the
requests, rather than starting them as created. This closes a race
whereby some number of child operations could complete before the
rest were ever created, and prematurely freeing the parent bio.
This fixes the panics installing in VMWare and qemu

18 years agoFix numerous errors of >= 1 ulp for cosf(x) and sinf(x) (1 line)
Bruce Evans [Sun, 9 Oct 2005 21:07:23 +0000 (21:07 +0000)]
Fix numerous errors of >= 1 ulp for cosf(x) and sinf(x) (1 line)
and add a comment about related magic (many lines)).

__kernel_cos[f]() needs a trick to reduce the error to below 1 ulp
when |x| >= 0.3 for the range-reduced x.  Modulo other bugs, naive
code that doesn't use the trick would have an error of >= 1 ulp
in about 0.00006% of cases when |x| >= 0.3 for the unreduced x,
with a maximum relative error of about 1.03 ulps.  Mistransation
of the trick from the double precision case resulted in errors in
about 0.2% of cases, with a maximum relative error of about 1.3 ulps.

The mistranslation involved not doing implicit masking of the 32-bit
float word corresponding to to implicit masking of the lower 32-bit
double word by clearing it.

sinf() uses __kernel_cosf() for half of all cases so its errors from
this bug are similar.  tanf() is not affected.

The error bounds in the above and in my other recent commit messages
are for amd64.  Extra precision for floats on i386's accidentally masks
this bug, but only if k_cosf.c is compiled with -O.  Although the extra
precision helps here, this is accidental and depends on longstanding
gcc precision bugs (not clipping extra precision on assignment...),
and the gcc bugs are mostly avoided by compiling without -O.  I now
develop libm mainly on amd64 systems to simplify error detection and
debugging.

18 years agoDon't pretend that a failed sync write was succesful.
Tor Egge [Sun, 9 Oct 2005 20:49:01 +0000 (20:49 +0000)]
Don't pretend that a failed sync write was succesful.

18 years agoReduce probability for a deadlock that can occur when a snapshot inode is
Tor Egge [Sun, 9 Oct 2005 20:15:15 +0000 (20:15 +0000)]
Reduce probability for a deadlock that can occur when a snapshot inode is
updated by a process holding the snapshot lock.  Another process updating a
different inode in the same inodeblock will do copy on write checks and lock in
the opposite direction.

The snapshot code force a copy on write of these blocks manually (cf. start of
expunge_ufs[12]) and these inode blocks are later put on snapblklist.

This partial fix is to 'drain' the relevant ffs_copyonwrite() operation after
installing new snapblklist.  This is not a 100% solution since a failed block
allocation can cause implicit fsync() which might deadlock before the new
snapblklist has been installed.

18 years agoEliminate a deadlock that can occur when a dirty block belonging to a snapshot
Tor Egge [Sun, 9 Oct 2005 20:07:51 +0000 (20:07 +0000)]
Eliminate a deadlock that can occur when a dirty block belonging to a snapshot
file is flushed by a process not holding snaplk (e.g. bufdaemon).  Another
process might hold snaplk and try to access the block due to ffs_copyonwrite
processing.

18 years agoEliminate a deadlock that can occur during the cgaccount() processing due to
Tor Egge [Sun, 9 Oct 2005 20:00:16 +0000 (20:00 +0000)]
Eliminate a deadlock that can occur during the cgaccount() processing due to
the cg map buffer being held when writing indirect blocks.  The process ends up
in ffs_copyonwrite(), attempting to get snaplk while holding the cg map buffer
lock.

Another process might be in ffs_copyonwrite(), trying to allocate a new block
for a copy.  It would hold snaplk while trying to get the cg map buffer lock.

Release the cg map buffer early and use the copy for most of the cgaccount
processing to avoid this deadlock.

18 years agoReduce the probability of low block numbers passed to ffs_snapblkfree() by
Tor Egge [Sun, 9 Oct 2005 19:45:01 +0000 (19:45 +0000)]
Reduce the probability of low block numbers passed to ffs_snapblkfree() by
skipping the call from ffs_snapremove() if the block number is zero.

Simplify snapshot locking in ffs_copyonwrite() and ffs_snapblkfree() by using
the same locking protocol for low block numbers as for larger block numbers.
This removes a lock leak that could happen if vn_lock() succeeded after
lockmgr() failed in ffs_snapblkfree().

Check if snapshot is gone before retrying a lock in ffs_copyonwrite().

18 years agoReinitialize v_type and v_op fields in case vnode has been reused without
Tor Egge [Sun, 9 Oct 2005 19:06:34 +0000 (19:06 +0000)]
Reinitialize v_type and v_op fields in case vnode has been reused without
reclamation.  If the vnode previously was a fifo then v_op would point to
ffs_fifoops[12] instead of the expected ffs_vnodeops[12], causing a panic at
the end of ffsext_strategy.

18 years agoAdd RELENG_6_0.
Dag-Erling Smørgrav [Sun, 9 Oct 2005 18:01:55 +0000 (18:01 +0000)]
Add RELENG_6_0.