]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoIntroduce a new lock, hostname_mtx, and use it to synchronize access
rwatson [Sat, 5 Jul 2008 13:10:10 +0000 (13:10 +0000)]
Introduce a new lock, hostname_mtx, and use it to synchronize access
to global hostname and domainname variables.  Where necessary, copy
to or from a stack-local buffer before performing copyin() or
copyout().  A few uses, such as in cd9660 and daemon_saver, remain
under-synchronized and will require further updates.

Correct a bug in which a failed copyin() of domainname would leave
domainname potentially corrupted.

MFC after: 3 weeks

16 years agoTwo quotes too good to miss.
phk [Sat, 5 Jul 2008 08:54:58 +0000 (08:54 +0000)]
Two quotes too good to miss.

16 years agoMove duplicated code from tar_mode_[cru] into archive_write.
cperciva [Sat, 5 Jul 2008 08:10:55 +0000 (08:10 +0000)]
Move duplicated code from tar_mode_[cru] into archive_write.

Fix a bug I introduced 7 minutes ago: clean up properly from archive_write
if we exit the argv-handling loop due to -C not having an argument.

16 years agoUse malloc in write_archive to allocate a 64kB buffer for holding file data
cperciva [Sat, 5 Jul 2008 08:03:08 +0000 (08:03 +0000)]
Use malloc in write_archive to allocate a 64kB buffer for holding file data
instead of using 64kB of stack space in copy_file_data and write_file_data.

16 years agoAdd CTF conversion to the objects compiled from generated code.
jb [Sat, 5 Jul 2008 06:12:14 +0000 (06:12 +0000)]
Add CTF conversion to the objects compiled from generated code.
This allows DTrace scripts to access variables like 'ostype'.

16 years agoClean up write_entry by eliminating fd except in the #ifdef __linux block
cperciva [Sat, 5 Jul 2008 06:05:34 +0000 (06:05 +0000)]
Clean up write_entry by eliminating fd except in the #ifdef __linux block
where it is used. [1]

Don't leak file descriptors in write_entry_backend if archive_write_header
returns ARCHIVE_FAILED.

Found by: Coverity Prevent [1]

16 years agobsdcpio is now at version 1.0.0.
kientzle [Sat, 5 Jul 2008 05:17:33 +0000 (05:17 +0000)]
bsdcpio is now at version 1.0.0.

16 years agoIn -pl mode, only hardlink regular files. I need to test
kientzle [Sat, 5 Jul 2008 05:16:23 +0000 (05:16 +0000)]
In -pl mode, only hardlink regular files.  I need to test
other implementations, but it's clear that dirs and symlinks,
at least, shouldn't be hardlinked.

16 years agoRemove an unused define.
kientzle [Sat, 5 Jul 2008 05:15:07 +0000 (05:15 +0000)]
Remove an unused define.

16 years agoRevert CVS revision 1.68; it is now possible for entry to be NULL at the end
cperciva [Sat, 5 Jul 2008 02:21:51 +0000 (02:21 +0000)]
Revert CVS revision 1.68; it is now possible for entry to be NULL at the end
of write_entry.  (This was perfectly safe, since archive_entry_free(NULL) is
a no-op, but adding the check back makes the style more consistent.)

16 years agoFreeBSD-CURRENT bsdtar is synched up with libarchive-portable 2.5.5.
kientzle [Sat, 5 Jul 2008 02:09:54 +0000 (02:09 +0000)]
FreeBSD-CURRENT bsdtar is synched up with libarchive-portable 2.5.5.

16 years agoRemove HAVE_STRUCT_STAT_ST_RDEV, as it's not used anywhere.
kientzle [Sat, 5 Jul 2008 02:09:13 +0000 (02:09 +0000)]
Remove HAVE_STRUCT_STAT_ST_RDEV, as it's not used anywhere.

16 years agoStop using the deprecated linux/ext2_fs.h.
kientzle [Sat, 5 Jul 2008 02:06:55 +0000 (02:06 +0000)]
Stop using the deprecated linux/ext2_fs.h.

16 years agoUse %H:%M for strftime() time formatting instead of the non-portable %R.
kientzle [Sat, 5 Jul 2008 02:05:55 +0000 (02:05 +0000)]
Use %H:%M for strftime() time formatting instead of the non-portable %R.

16 years agolibarchive in FreeBSD-CURRENT is now synched with libarchive-portable 2.5.5.
kientzle [Sat, 5 Jul 2008 01:50:40 +0000 (01:50 +0000)]
libarchive in FreeBSD-CURRENT is now synched with libarchive-portable 2.5.5.

16 years agoRemove a couple of capability definitions that are never used.
kientzle [Sat, 5 Jul 2008 01:50:07 +0000 (01:50 +0000)]
Remove a couple of capability definitions that are never used.

16 years agoWhen ARCHIVE_EXTRACT_PERM is requested (e.g., by "tar -p"), always
kientzle [Sat, 5 Jul 2008 01:48:33 +0000 (01:48 +0000)]
When ARCHIVE_EXTRACT_PERM is requested (e.g., by "tar -p"), always
schedule a chmod() fixup for directories.  In particular, this fixes
sgid handling on systems where the sgid bit is inherited from the
parent directory (which means that the actual mode of the dir
does not match the mode used in the mkdir() system call.

It may be possible to tighten this condition a bit.  In
working through this, I also found a few other places where
it looks like we can avoid a redundant syscall or two.  I've
commented those here but not yet tried to address them.

16 years agoDon't use the deprecated linux/ext2_fs.h include file.
kientzle [Sat, 5 Jul 2008 01:45:31 +0000 (01:45 +0000)]
Don't use the deprecated linux/ext2_fs.h include file.

16 years agoFix my previous commit. We actually should pass evaluation args in
rpaulo [Fri, 4 Jul 2008 23:40:53 +0000 (23:40 +0000)]
Fix my previous commit. We actually should pass evaluation args in
AcpiEvaluateObject() calls, otherwise, we are not able to bring devices
back up (NULL means 0, hence always off).
While there add missing WLAN on/off support.

MFC after: 3 days
Pointy hat to: rpaulo

16 years agoRemove the sbsh(4) driver. No one responded to requests for testing the
jhb [Fri, 4 Jul 2008 21:24:35 +0000 (21:24 +0000)]
Remove the sbsh(4) driver.  No one responded to requests for testing the
MPSAFE patches on current@ and stable@.  This driver also has a fundamental
issue in that it sleeps when sending commands to the card including in the
if_init/if_start routines (which can be called from interrupt context).  As
such, the driver shouldn't be working reliably even on 4.x.

16 years agoMake sbsh(4) MPSAFE:
jhb [Fri, 4 Jul 2008 21:13:18 +0000 (21:13 +0000)]
Make sbsh(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device
  hardware.
- Setup interrupt handler after ether_ifattach().
- Remove unused sbsh_watchdog() routine.
- Protect against concurrent attempts to load firmware.

16 years agoRemove the sbni(4) driver. No one responded to calls to test it on
jhb [Fri, 4 Jul 2008 21:06:57 +0000 (21:06 +0000)]
Remove the sbni(4) driver.  No one responded to calls to test it on
current@ and stable@.

16 years agoEnqueue de-capsulated packet instead of performing direct dispatch. It's
gonzo [Fri, 4 Jul 2008 21:01:30 +0000 (21:01 +0000)]
Enqueue de-capsulated packet instead of performing direct dispatch. It's
possible to exhaust and garble stack with a packet that contains a couple
of hundreds nested encapsulation levels.

Submitted by:   Ming Fu <fming@borderware.com>
Reviewed by:    rwatson
PR:             kern/85320

16 years agoMake sbni(4) MPSAFE:
jhb [Fri, 4 Jul 2008 20:53:41 +0000 (20:53 +0000)]
Make sbni(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device
  hardware.
- Setup interrupt handler after attaching device to network stack.
- Use device_set_desc() rather than device_quiet() plus a manual printf
  that simulates the normal probe printf.
- Axe next_sbni_unit and instead just leave room for two sbni devices for
  each bus attachment.
- Don't bzero the already-zero'd softc.
- Add a detach method to the PCI driver.
- Add a lock to protect the list of available devices used to chain
  interrupt handlers for dual port ISA cards.
- Remove unused watchdog routine.
- If if_alloc() fails, make sbni_attach() return an error rather than
  panic'ing.
- Consolidate code to free bus resources into sbni_release_resources().
- Clear IFF_DRV_RUNNING|OACTIVE in stop() routine instead of in callers.
- Let ether_ioctl() handle SIOCSIFMTU.

16 years agoCorrect an error in the comments for init_param3().
alc [Fri, 4 Jul 2008 19:36:58 +0000 (19:36 +0000)]
Correct an error in the comments for init_param3().

Discussed with: silby

16 years agoRemove the cnw(4) driver. No one responded to calls to test it on current@
jhb [Fri, 4 Jul 2008 19:13:15 +0000 (19:13 +0000)]
Remove the cnw(4) driver.  No one responded to calls to test it on current@
and stable@.  It also is a driver for an older non-802.11 wireless PC card
that is quite slow in comparison to say, wi(4).  I know Warner wants this
driver axed as well.

16 years agoMake cnw(4) MPSAFE:
jhb [Fri, 4 Jul 2008 19:04:07 +0000 (19:04 +0000)]
Make cnw(4) MPSAFE:
- Add a mutex to the softc and use it to lock the softc and device hardware.
- Use a private timer to replace if_watchdog/if_timer.
- Use if_printf() rather than if_xname.
- Setup interrupt handler after ether_ifattach().

16 years agoRemove the oltr(4) driver. No one responded to calls for testing on
jhb [Fri, 4 Jul 2008 18:58:53 +0000 (18:58 +0000)]
Remove the oltr(4) driver.  No one responded to calls for testing on
current@ and stable@ for the locking patches.  The driver can always be
revived if someone tests it.

This driver also sleeps in its if_init routine, so it likely doesn't really
work at all anyway in modern releases.

16 years agoMake oltr(4) MPSAFE:
jhb [Fri, 4 Jul 2008 18:27:14 +0000 (18:27 +0000)]
Make oltr(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device
  hardware.
- Setup interrupt handler after interface attach.
- Retire 'unit' from softc and use if_printf() instead.
- Don't frob IFF_UP in the driver.
- Use callout_() rather than timeout() and untimeout().

16 years agoRemove the arl(4) driver. It is reported to not work on 6.x or later
jhb [Fri, 4 Jul 2008 18:15:36 +0000 (18:15 +0000)]
Remove the arl(4) driver.  It is reported to not work on 6.x or later
even though the driver hasn't changed since 4.x (last known working
release).

16 years agoMake arl(4) MPSAFE:
jhb [Fri, 4 Jul 2008 17:48:34 +0000 (17:48 +0000)]
Make arl(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device
  hardware.
- Setup interrupt handler after ether_ifattach().
- Use a private timer instead of if_timer/if_watchdog.
- Retire arl_unit from the softc and use if_printf() and device_printf()
  instead.

Note that the unpatched driver in 6.x and later does not work with the
hardware, so the one person who had volunteered to test the patch wasn't
able to test it.

16 years agoEliminate an unused declaration. (In fact, the declaration is bogus
alc [Fri, 4 Jul 2008 17:36:12 +0000 (17:36 +0000)]
Eliminate an unused declaration.  (In fact, the declaration is bogus
because the variable is defined static to pmap.c on i386.)

Found by: CScout

16 years agoAdd manpage for Apple BMAC ethernet driver.
nwhitehorn [Fri, 4 Jul 2008 14:51:42 +0000 (14:51 +0000)]
Add manpage for Apple BMAC ethernet driver.

Approved by: marcel (mentor)

16 years agoRemove Japanese document.
nyan [Fri, 4 Jul 2008 12:19:56 +0000 (12:19 +0000)]
Remove Japanese document.

16 years agoThe uniqdosname() function takes char[12] as it third argument.
kib [Fri, 4 Jul 2008 09:40:52 +0000 (09:40 +0000)]
The uniqdosname() function takes char[12] as it third argument.

Found by: -fstack-protector
Reported by: dougb
Tested by: dougb, Rainer Hurling <rhurlin gwdg de>
MFC after: 3 days

16 years agoport % count will never be greater than LAGG_MAX_PORTS so nuke the test.
thompsa [Fri, 4 Jul 2008 05:33:58 +0000 (05:33 +0000)]
port % count will never be greater than LAGG_MAX_PORTS so nuke the test.

16 years agosunlabel(8) is specific to sparc64. Remove from other platforms.
marcel [Fri, 4 Jul 2008 04:39:45 +0000 (04:39 +0000)]
sunlabel(8) is specific to sparc64. Remove from other platforms.
use gpart(8) on all platforms.

16 years agoMake sunlabel specific to sparc64. This is mostly for backward
marcel [Fri, 4 Jul 2008 04:33:33 +0000 (04:33 +0000)]
Make sunlabel specific to sparc64. This is mostly for backward
compatibility reasons. Sun labels, with VTOC8, are handled by
gpart(8).

16 years agoRemove NETISR_MPSAFE, which allows specific netisr handlers to be directly
rwatson [Fri, 4 Jul 2008 00:21:38 +0000 (00:21 +0000)]
Remove NETISR_MPSAFE, which allows specific netisr handlers to be directly
dispatched without Giant, and add NETISR_FORCEQUEUE, which allows specific
netisr handlers to always be dispatched via a queue (deferred).  Mark the
usb and if_ppp netisr handlers as NETISR_FORCEQUEUE, and explicitly
acquire Giant in those handlers.

Previously, any netisr handler not marked NETISR_MPSAFE would necessarily
run deferred and with Giant acquired.  This change removes Giant
scaffolding from the netisr infrastructure, but NETISR_FORCEQUEUE allows
non-MPSAFE handlers to continue to force deferred dispatch so as to avoid
lock order reversals between their acqusition of Giant and any calling
context.

It is likely we will be able to remove NETISR_FORCEQUEUE once
IFF_NEEDSGIANT is removed, as non-MPSAFE usb and if_ppp drivers will no
longer be supported.

Reviewed by: bz
MFC after: 1 month
X-MFC note: We can't remove NETISR_MPSAFE from stable/7 for KPI reasons,
but the rest can go back.

16 years agoUse bcopy instead of strlcpy in uipc_bind and unp_connect, since
emaste [Thu, 3 Jul 2008 23:26:10 +0000 (23:26 +0000)]
Use bcopy instead of strlcpy in uipc_bind and unp_connect, since
soun->sun_path isn't a null-terminated string.  As UNIX(4) states, "the
terminating NUL is not part of the address."  Since strlcpy has to return
"the total length of the string [it] tried to create," it walks off the end
of soun->sun_path looking for a \0.

This reverts r105332.

Reported by:    Ryan Stone

16 years agoAdd regression tests for fmin{,f,l} and fmax{,f,l}.
das [Thu, 3 Jul 2008 23:06:06 +0000 (23:06 +0000)]
Add regression tests for fmin{,f,l} and fmax{,f,l}.
I wrote these to test amd64 asm functions that used
maxss, maxsd, minss, and minsd, but it turns out that
those instructions don't handle NaNs and signed zero
in the same way as fmin() and fmax() are required to,
so we're stuck with the C versions for now.

16 years agoOn 64 bit architectures, you can run 32 bit executables and the rtld can trace them...
edwin [Thu, 3 Jul 2008 22:37:51 +0000 (22:37 +0000)]
On 64 bit architectures, you can run 32 bit executables and the rtld can trace them, but ldd(1) doesn't know yet how to detect them:

    [/] root@ed-exigent>ldd `which httpd`
    ldd: /usr/local/sbin/httpd: can't read program header
    ldd: /usr/local/sbin/httpd: not a dynamic executable

    But...

    [/] root@ed-exigent>LD_32_TRACE_LOADED_OBJECTS==1 `which httpd`
    libm.so.4 => /lib32//libm.so.4 (0x280c8000)
    libaprutil-1.so.2 => /usr/local/lib/libaprutil-1.so.2 (0x280de000)
    libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x280f2000)
    libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28110000)
    libapr-1.so.2 => /usr/local/lib/libapr-1.so.2 (0x281fd000)
    libcrypt.so.3 => /lib32//libcrypt.so.3 (0x2821d000)
    libpthread.so.2 => not found (0x0)
    libc.so.6 => /lib32//libc.so.6 (0x28235000)
    libpthread.so.2 => /usr/lib32/libpthread.so.2 (0x2830d000)

Added support in ldd(1) for the LD_32_xxx environment variables if
the architecture of the machine is >32 bits. If we ever go to 128
bit architectures this excercise will have to be repeated but thanks
to earlier commits today it will be relative simple.

PR: bin/124906
Submitted by: edwin
Approved by: bde (mentor)
MFC after: 1 week

16 years agoExtract the determination of the kind of (dynamic) executable from
edwin [Thu, 3 Jul 2008 22:30:18 +0000 (22:30 +0000)]
Extract the determination of the kind of (dynamic) executable from
the main-loop into a seperate function.
Instead of using hardcoded environment variables, define them in a
lookup table.
For the rest, no functionality changes.

Approved by: bde (mentor)
MFC after: 1 week

16 years agostylify ldd.c, no functional changes.
edwin [Thu, 3 Jul 2008 22:26:43 +0000 (22:26 +0000)]
stylify ldd.c, no functional changes.

Approved by: bde (mentor)
MFC after: 1 week

16 years agoFix some locking and logic bugs pointed out by jhb. These fix driver detach and speed...
nwhitehorn [Thu, 3 Jul 2008 21:51:30 +0000 (21:51 +0000)]
Fix some locking and logic bugs pointed out by jhb. These fix driver detach and speed up data transfer by nearly a factor of 2.

Approved by: marcel (mentor)

16 years agoBelatedly add myself to the committers graph
cokane [Thu, 3 Jul 2008 21:45:25 +0000 (21:45 +0000)]
Belatedly add myself to the committers graph

16 years agobsdlabel and fdisk are obsoleted on ia64.
marcel [Thu, 3 Jul 2008 21:00:16 +0000 (21:00 +0000)]
bsdlabel and fdisk are obsoleted on ia64.
While here, make sure to remove any remnants of the disklabel
manpage.

16 years agoStop building bsdlabel(8) and fdisk(8) on ia64. Both tools are
marcel [Thu, 3 Jul 2008 20:53:15 +0000 (20:53 +0000)]
Stop building bsdlabel(8) and fdisk(8) on ia64. Both tools are
obsoleted by gpart(8). This avoids the following bugs in fdisk:
-  initializing a disk without MBR bogusly emits the error:
fdisk: invalid fdisk partition table found
-  initializing a disk with or without MBR bogusly emits either:
fdisk: Class not found
   or
fdisk: Geom not found: "XXX"
-  the default geometry for non-ATA and non-SCSI disks is either
   invalid or sub-optimizal.

16 years agoAdd NO_MAN for the static variant of geom(8). Both the RESCUE and the
marcel [Thu, 3 Jul 2008 19:40:59 +0000 (19:40 +0000)]
Add NO_MAN for the static variant of geom(8). Both the RESCUE and the
RELEASE_CRUNCH builds use NO_MAN anyway, so this change is primarily
to avoid that developers have to set NO_MAN manually when they build
the static variant.

16 years agoAdd myself to src committers graph.
nwhitehorn [Thu, 3 Jul 2008 18:57:00 +0000 (18:57 +0000)]
Add myself to src committers graph.

Approved by: marcel (mentor)

16 years agoBelatedly add myself to the active *cough* doc committers.
marcel [Thu, 3 Jul 2008 17:10:18 +0000 (17:10 +0000)]
Belatedly add myself to the active *cough* doc committers.

16 years agoBelatedly add myself to the alumni section.
marcel [Thu, 3 Jul 2008 17:02:43 +0000 (17:02 +0000)]
Belatedly add myself to the alumni section.

16 years agoSoren was my mentor.
marcel [Thu, 3 Jul 2008 16:53:19 +0000 (16:53 +0000)]
Soren was my mentor.
I have mentored arun and marius.

16 years agoBelatedly add myself to the active committer section.
marcel [Thu, 3 Jul 2008 16:49:33 +0000 (16:49 +0000)]
Belatedly add myself to the active committer section.

16 years ago- fix typos
danger [Thu, 3 Jul 2008 16:48:35 +0000 (16:48 +0000)]
- fix typos

PR: docs/125223
Submitted by: Fabian Keil <fk (a) fabiankeil.de>
MFC after: 3 days

16 years agoBe smarter about disabling interface capabilities. TOE/TSO/TXCSUM will only be
thompsa [Thu, 3 Jul 2008 15:58:30 +0000 (15:58 +0000)]
Be smarter about disabling interface capabilities. TOE/TSO/TXCSUM will only be
disabled if one (or more) of the member interfaces does not support it. Always
turn off LRO since we can not bridge a combined frame.

Tested by: Stefan Lambrev

16 years agoAdd module dependancy on nfs.
dfr [Thu, 3 Jul 2008 14:09:00 +0000 (14:09 +0000)]
Add module dependancy on nfs.

16 years agoElexol USB MOD3 is also supported.
blackend [Thu, 3 Jul 2008 12:48:13 +0000 (12:48 +0000)]
Elexol USB MOD3 is also supported.

16 years agoRemove a bogusly introduced rtalloc_ign() in rev. 1.335/SVN 178029,
bz [Thu, 3 Jul 2008 12:44:36 +0000 (12:44 +0000)]
Remove a bogusly introduced rtalloc_ign() in rev. 1.335/SVN 178029,
generating an RTM_MISS for every IP packet forwarded making user space
routing daemons unhappy.

PR: kern/123621, kern/124540, kern/122338
Reported by: Paul <paul gtcomm.net>, Mike Tancsa <mike sentex.net> on net@
Tested by: Paul and Mike
Reviewed by: andre
MFC after: 3 days

16 years agoRemove GIANT_REQUIRED from IPv6 input, forward, and frag6 code. The frag6
rwatson [Thu, 3 Jul 2008 10:55:13 +0000 (10:55 +0000)]
Remove GIANT_REQUIRED from IPv6 input, forward, and frag6 code.  The frag6
code is believed to be MPSAFE, and leaving aside the IPv6 route cache in
forwarding, Giant appears not to adequately synchronize the data structures
in the input or forwarding paths.

16 years agoChange a variable name to not shadow a global
julian [Thu, 3 Jul 2008 08:35:59 +0000 (08:35 +0000)]
Change a variable name to not shadow a global

Obtained from: vimage

16 years agoUpdate copyright date in light of soreceive_dgram(9).
rwatson [Thu, 3 Jul 2008 06:47:45 +0000 (06:47 +0000)]
Update copyright date in light of soreceive_dgram(9).

16 years agoIncrease the ceiling on the kmem map's size to 3.6GB. Also, define the
alc [Thu, 3 Jul 2008 04:53:14 +0000 (04:53 +0000)]
Increase the ceiling on the kmem map's size to 3.6GB.  Also, define the
ceiling as a fraction of the kernel map's size rather than an absolute
quantity.  Thus, scaling of the kmem map's size will be automatic with
changes to the kernel map's size.

16 years agoExclude .cvsignore files from $FreeBSD$ checking
peter [Thu, 3 Jul 2008 04:08:40 +0000 (04:08 +0000)]
Exclude .cvsignore files from $FreeBSD$ checking

16 years agoSet magic fbsd:nokeywords property that allows files to bypass
peter [Thu, 3 Jul 2008 03:50:17 +0000 (03:50 +0000)]
Set magic fbsd:nokeywords property that allows files to bypass
keyword expansion. (file-specific replacement for CVSROOT/exclude)

16 years agoSet magic property that allows files to bypass keyword expansion.
peter [Thu, 3 Jul 2008 03:47:25 +0000 (03:47 +0000)]
Set magic property that allows files to bypass keyword expansion.
Test commit to make sure it isn't exported to cvs.

16 years agoAdd $FreeBSD$
peter [Thu, 3 Jul 2008 03:36:58 +0000 (03:36 +0000)]
Add $FreeBSD$

16 years agoChange mime type to image/png
peter [Thu, 3 Jul 2008 03:27:54 +0000 (03:27 +0000)]
Change mime type to image/png

16 years agoAdd $FreeBSD$ to the uuencoded test files that didn't have them already.
peter [Thu, 3 Jul 2008 03:26:30 +0000 (03:26 +0000)]
Add $FreeBSD$ to the uuencoded test files that didn't have them already.

16 years agoAdd soreceive_dgram(9), an optimized socket receive function for use by
rwatson [Wed, 2 Jul 2008 23:23:27 +0000 (23:23 +0000)]
Add soreceive_dgram(9), an optimized socket receive function for use by
datagram-only protocols, such as UDP.  This version removes use of
sblock(), which is not required due to an inability to interlace data
improperly with datagrams, as well as avoiding some of the larger loops
and state management that don't apply on datagram sockets.

This is experimental code, so hook it up only for UDPv4 for testing; if
there are problems we may need to revise it or turn it off by default,
but it offers *significant* performance improvements for threaded UDP
applications such as BIND9, nsd, and memcached using UDP.

Tested by: kris, ps

16 years agoSet the IPv6 netisr handler as NETISR_MPSAFE on the basis that, despite
rwatson [Wed, 2 Jul 2008 23:12:40 +0000 (23:12 +0000)]
Set the IPv6 netisr handler as NETISR_MPSAFE on the basis that, despite
there still being some well-known races in mld6 and nd6, running with
Giant over the netisr handler provides little or not additional
synchronization that might cause mld6 and nd6 to behave better.

16 years agoUse msleep_spin() instead of unlock/tsleep/lock. This was
rdivacky [Wed, 2 Jul 2008 20:44:33 +0000 (20:44 +0000)]
Use msleep_spin() instead of unlock/tsleep/lock. This was
already commited but with a wrong msleep variant and then
backed out. Note that this changes the semantic a little
as msleep_spin does not let us to specify priority after
wakeup.

Approved by: wkoszek, cognet
Approved by: kib (mentor)

16 years agoAttempt to set the charset
peter [Wed, 2 Jul 2008 19:57:37 +0000 (19:57 +0000)]
Attempt to set the charset

16 years agoPretend that this file isn't binary.
peter [Wed, 2 Jul 2008 18:37:45 +0000 (18:37 +0000)]
Pretend that this file isn't binary.

16 years agoDrag this code kicking and screaming into the twenty-first century.
des [Wed, 2 Jul 2008 15:51:59 +0000 (15:51 +0000)]
Drag this code kicking and screaming into the twenty-first century.

16 years agoAdd RTL8211C(L) support.
yongari [Wed, 2 Jul 2008 08:10:18 +0000 (08:10 +0000)]
Add RTL8211C(L) support.
Disable advanced link-down power saving in phy reset.

Reported by: nork
Tested by: nork

16 years agoAdd a new RTL8169 variant, 8169SB(L)/8110SB(L).
yongari [Wed, 2 Jul 2008 08:00:14 +0000 (08:00 +0000)]
Add a new RTL8169 variant, 8169SB(L)/8110SB(L).

Reported by: nork
Tested by: nork

16 years agoAdd basic support for RTL8168C, RTL8168CP, RTL8111C and RTL8111CP.
yongari [Wed, 2 Jul 2008 07:54:53 +0000 (07:54 +0000)]
Add basic support for RTL8168C, RTL8168CP, RTL8111C and RTL8111CP.
ATM Tx/Rx checksum offload is supported but TSO and jumbo frame is
not yet supported. Because these newer controllers use different
descriptor formats, a flag RL_FLAG_DESCV2 flag was introduced to
handle that case in Tx/Rx handler. Also newer controllers seems to
require to not touch 'enable Tx/Rx bit' in RL_CPLUS_CMD register
so don't blindly try to set that bits.

Note, it seems that there is still power-saving related issue where
driver fails to attach PHY. Rebooting seems to fix that issue but
number of required reboots varys.

Many thanks to users that helped during developement. I really
appreciate their patient and test/feedbacks.

16 years agoDisplay detected chip revision in device attach. This will help to
yongari [Wed, 2 Jul 2008 06:55:03 +0000 (06:55 +0000)]
Display detected chip revision in device attach. This will help to
diagnose revision specific issues in future. Also add 0x to notify
that the revision number is in hex form.

16 years agoIf MSI is not active make sure to disable MSI in EEPROM.
yongari [Wed, 2 Jul 2008 06:45:59 +0000 (06:45 +0000)]
If MSI is not active make sure to disable MSI in EEPROM.

16 years agoIn device detach don't access ifnet structure unless device is
yongari [Wed, 2 Jul 2008 06:41:46 +0000 (06:41 +0000)]
In device detach don't access ifnet structure unless device is
attached. This fixes NULL pointer dereference when polling(9) is
active and unsupported hardware is detected in device attach.

16 years agoToggling IFF_ALLMULTI flag does not require full interface
yongari [Wed, 2 Jul 2008 06:34:02 +0000 (06:34 +0000)]
Toggling IFF_ALLMULTI flag does not require full interface
reintialization.

16 years agoInstead of allocating variables for each events/hardware flags, use
yongari [Wed, 2 Jul 2008 06:29:43 +0000 (06:29 +0000)]
Instead of allocating variables for each events/hardware flags, use
a dedicated flag that represents controller capabilities/events.
This will simplify many part of code that requires different
workaround for each controller revisions and will enhance
readability.
While I'm here move PHY wakeup code up before mii_phy_probe() which
seems to help to wake PHY in some cases.

16 years agoEliminate an unnecessary static variable: nkpt.
alc [Wed, 2 Jul 2008 05:41:23 +0000 (05:41 +0000)]
Eliminate an unnecessary static variable: nkpt.

16 years agoSwitch to memory space register mapping over IO space. If that
yongari [Wed, 2 Jul 2008 05:21:09 +0000 (05:21 +0000)]
Switch to memory space register mapping over IO space. If that
mapping fails fall back to traditional IO space access.

16 years agoWhile accessing EEPROM command register use pre-defined constant
yongari [Wed, 2 Jul 2008 05:01:19 +0000 (05:01 +0000)]
While accessing EEPROM command register use pre-defined constant
instead of hardcoded value.

16 years agoAfter the change of r176757 re(4) no longer relys on reading
yongari [Wed, 2 Jul 2008 04:55:39 +0000 (04:55 +0000)]
After the change of r176757 re(4) no longer relys on reading
RL_TXCFG register to identify a device in device probe. Reflect the
fact by modifing device description with general ethernet
controller family.
Note, rl_basetype in struct rl_type is not used and the more
detailed information is provided with rl_hwrev structure.

16 years agoRemove duplicated H/W revision check.
yongari [Wed, 2 Jul 2008 04:27:36 +0000 (04:27 +0000)]
Remove duplicated H/W revision check.

16 years ago- AI_ALL and AI_V4MAPPED flags are currently not supported
danger [Tue, 1 Jul 2008 22:59:20 +0000 (22:59 +0000)]
- AI_ALL and AI_V4MAPPED flags are currently not supported

PR: docs/120248
Submitted by: Heiko Wundram <wundram (a) beenic.net>

16 years agoMerge hexdump(9) to userland as hexdump(3) in libutil. I'm tired of doing
jhb [Tue, 1 Jul 2008 22:30:57 +0000 (22:30 +0000)]
Merge hexdump(9) to userland as hexdump(3) in libutil.  I'm tired of doing
this by hand in userland utilities.

MFC after: 1 month

16 years agoThe example wpa_supplicant.conf file has been moved to share/examples/etc/,
danger [Tue, 1 Jul 2008 21:54:08 +0000 (21:54 +0000)]
The example wpa_supplicant.conf file has been moved to share/examples/etc/,
see r180158 for references

Approved by: brooks
MFC after: 3 days

16 years ago- install the example wpa_supplicant.conf file to the share/examples/etc
danger [Tue, 1 Jul 2008 21:52:49 +0000 (21:52 +0000)]
- install the example wpa_supplicant.conf file to the share/examples/etc
  directory [1]
- add the FILES section to the wpa_supplicant.conf.5 file, so that people
  will be able to detect the example configuration file easier. [2]

PR: docs/121821 [2]
Approved by: brooks [1]
MFC after: 3 days

16 years ago- add the -m option to the example commands because they would fail w/o it
danger [Tue, 1 Jul 2008 20:56:23 +0000 (20:56 +0000)]
- add the -m option to the example commands because they would fail w/o it
  as the ``man'' user does not have a valid shell by default.

PR: docs/121713
Approved by: trhodes
MFC after: 3 days

16 years ago- more mark-up fixes
danger [Tue, 1 Jul 2008 19:54:02 +0000 (19:54 +0000)]
- more mark-up fixes

Submitted by: ru

16 years agoRework how the mpt_user personality handles buffers for config pages.
jhb [Tue, 1 Jul 2008 19:48:15 +0000 (19:48 +0000)]
Rework how the mpt_user personality handles buffers for config pages.
Previously we reused the space in the request buffer after the request
header to hold config pages during a transaction.  This does not work when
reading large pages however.  Also, we were already malloc'ing a buffer to
do a copyin/copyout w/o holding locks that was then copied into/out of the
request buffer.  Instead, go ahead and use bus dma to alloc a buffer for
each config page request (and RAID actions that have an associated
ActionSGE).  This results in fewer data copies and allows for larger sized
requests.  For now the maximum size of a request is arbitrarily limited to
16 MB.

MFC after: 2 weeks

16 years agoDuring shutdown, deregister the shutdown hook from the correct event
jhb [Tue, 1 Jul 2008 19:44:38 +0000 (19:44 +0000)]
During shutdown, deregister the shutdown hook from the correct event
handler.

MFC after: 2 weeks

16 years agoFix a regression: attach process PMCs to the process created when
jkoshy [Tue, 1 Jul 2008 15:20:15 +0000 (15:20 +0000)]
Fix a regression: attach process PMCs to the process created when
a command line is specified.

16 years agoFix instances of bogus #elsif directive.
dds [Tue, 1 Jul 2008 14:41:03 +0000 (14:41 +0000)]
Fix instances of bogus #elsif directive.

Found by: CScout
MFC after: 2 weeks

16 years agoFix off-by-one error.
nyan [Tue, 1 Jul 2008 11:18:51 +0000 (11:18 +0000)]
Fix off-by-one error.

MFC after: 1 week

16 years agoSet bridge MAC addresses to the MAC address of their first interface unless
philip [Tue, 1 Jul 2008 08:14:58 +0000 (08:14 +0000)]
Set bridge MAC addresses to the MAC address of their first interface unless
locally configured.  This is more in line with the behaviour of other popular
bridging implementations and makes bridges more predictable after reboots for
example.

Reviewed by: thompsa
MFC after: 1 week