]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoOne of my powerbooks has this chip in it..
Julian Elischer [Sat, 26 Jan 2008 05:11:09 +0000 (05:11 +0000)]
One of my powerbooks has this chip in it..
Confirmed by looking at netbsd.. they have also added this.
checked by grehen
MFC After: 3 days

16 years agoAllow arbitrary baud rates, not just the standard ones.
Ed Maste [Sat, 26 Jan 2008 04:30:48 +0000 (04:30 +0000)]
Allow arbitrary baud rates, not just the standard ones.

16 years agoadd opt_global.h dependency
Kip Macy [Sat, 26 Jan 2008 01:00:56 +0000 (01:00 +0000)]
add opt_global.h dependency

16 years agoFix a harmless type error in 1.9.
Bruce Evans [Fri, 25 Jan 2008 21:09:21 +0000 (21:09 +0000)]
Fix a harmless type error in 1.9.

16 years agoFix a bug where a thread that hit the race where the sleep timeout fires
John Baldwin [Fri, 25 Jan 2008 19:44:46 +0000 (19:44 +0000)]
Fix a bug where a thread that hit the race where the sleep timeout fires
while the thread does not hold the thread lock would stop blocking for
subsequent interruptible sleeps and would always immediately fail the
sleep with EWOULDBLOCK instead (even sleeps that didn't have a timeout).

Some background:
- KSE has a facility for allowing one thread to interrupt another thread.
  During this process, the target thread aborts any interruptible sleeps
  much as if the target thread had a pending signal.  Once the target
  thread acknowledges the interrupt, normal sleep handling resumes.  KSE
  manages this via the TDF_INTERRUPTED flag.  Specifically, it sets the
  flag when it sends an interrupt to another thread and clears it when
  the interrupt is acknowledged.  (Note that this is purely a software
  interrupt sort of thing and has no relation to hardware interrupts
  or kernel interrupt threads.)
- The old code for handling the sleep timeout race handled the race
  by setting the TDF_INTERRUPT flag and faking a KSE-style thread
  interrupt to the thread in the process of going to sleep.  It probably
  should have just checked the TDF_TIMEOUT flag in sleepq_catch_signals()
  instead.
- The bug was that the sleepq code would set TDF_INTERRUPT but it was
  never cleared.  The sleepq code couldn't safely clear it in case there
  actually was a real KSE thread interrupt pending for the target thread
  (in fact, the sleepq timeout actually stomped on said pending interrupt).
  Thus, any future interruptible sleeps (*sleep(.. PCATCH ..) or
  cv_*wait_sig()) would see the TDF_INTERRUPT flag set and immediately
  fail with EWOULDBLOCK.  The flag could be cleared if the thread belonged
  to a KSE process and another thread posted an interrupt to the original
  thread.  However, in the more common case of a non-KSE process, the
  thread would pretty much stop sleeping.
- Fix the bug by just setting TDF_TIMEOUT in the sleepq timeout code and
  not messing with TDF_INTERRUPT and td_intrval.  With yesterday's fix to
  fix sleepq_switch() to check TDF_TIMEOUT, this is now sufficient.

MFC after: 3 days

16 years agoUpdate the timestamp regexps in syncstamp() and monostamp() for > 99999
John Baldwin [Fri, 25 Jan 2008 19:24:12 +0000 (19:24 +0000)]
Update the timestamp regexps in syncstamp() and monostamp() for > 99999
traces where there isn't any leading whitespace before the record number
in the ktrdump output.

16 years agoBackout previous commit. It's going to clutter the console
Mike Makonnen [Fri, 25 Jan 2008 16:44:34 +0000 (16:44 +0000)]
Backout previous commit. It's going to clutter the console
during boot and shutdown. I think I'll hide it behind autoboot or
maybe take brooks@ suggestion and implement a different command
prefix for booting/shutdown purposes, but in any case it needs more
thought and attention.

Noticed by: ceri
Pointyhat to: mtm

16 years agoClarify in what formats the grouplist for the '-G' switch may be accepted.
Mike Makonnen [Fri, 25 Jan 2008 15:54:14 +0000 (15:54 +0000)]
Clarify in what formats the grouplist for the '-G' switch may be accepted.

Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>

16 years agoIf the rc.conf(5) variable for a script is not enabled do not fail
Mike Makonnen [Fri, 25 Jan 2008 15:06:26 +0000 (15:06 +0000)]
If the rc.conf(5) variable for a script is not enabled do not fail
silently. Display a message that the command wasn't run and make
possible suggestions for what to do.

PR:    conf/118770
MFC after: 1 week

16 years agoHide ipfw internal data structures behind IPFW_INTERNAL rather than
Robert Watson [Fri, 25 Jan 2008 14:38:27 +0000 (14:38 +0000)]
Hide ipfw internal data structures behind IPFW_INTERNAL rather than
exposing them to all consumers of ip_fw.h.  These structures are
used in both ipfw(8) and ipfw(4), but not part of the user<->kernel
interface for other applications to use, rather, shared
implementation.

MFC after: 3 days
Reported by: Paul Vixie <paul at vix dot com>

16 years agoRev. 1.6 made it impossible to use rc.d/kerberos with the krb5 port.
Mike Makonnen [Fri, 25 Jan 2008 05:23:01 +0000 (05:23 +0000)]
Rev. 1.6 made it impossible to use rc.d/kerberos with the krb5 port.
Re-implement the change so that the script once again works with
the krb5 port.

Submitted by: kensmith (slightly modified)
MFC after: 3 days

16 years agoCalculate baud rate divisor instead of allowing only a fixed set of
Ed Maste [Fri, 25 Jan 2008 02:41:44 +0000 (02:41 +0000)]
Calculate baud rate divisor instead of allowing only a fixed set of
standard rates.

Obtained from OpenBSD
  src/sys/dev/usb/uftdi.c 1.29
  src/sys/dev/usb/uftdireg.h 1.11

OpenBSD revisions noted by: ticso, on hackers

16 years agoFix a race in the sleepqueue timeout code that resulted in sleeps not
John Baldwin [Fri, 25 Jan 2008 02:09:38 +0000 (02:09 +0000)]
Fix a race in the sleepqueue timeout code that resulted in sleeps not
being properly cancelled by a timeout.  In general there is a race
between a the sleepq timeout handler firing while the thread is still
in the process of going to sleep.  In 6.x with sched_lock, the race was
largely protected by sched_lock.  The only place it was "exposed" and had
to be handled was while checking for any pending signals in
sleepq_catch_signals().

With the thread lock changes, the thread lock is dropped in between
sleepq_add() and sleepq_*wait*() opening up a new window for this race.
Thus, if the timeout fired while the sleeping thread was in between
sleepq_add() and sleepq_*wait*(), the thread would be marked as timed
out, but the thread would not be dequeued and sleepq_switch() would
still block the thread until it was awakened via some other means.  In
the case of pause(9) where there is no other wakeup, the thread would
never be awakened.

Fix this by teaching sleepq_switch() to check if the thread has had its
sleep canceled before blocking by checking the TDF_TIMEOUT flag and
aborting the sleep and dequeueing the thread if it is set.

MFC after: 3 days
Reported by: dwhite, peter

16 years agoOnce the release goes out, RELENG_7_* will need approval from so@.
Colin Percival [Thu, 24 Jan 2008 22:07:03 +0000 (22:07 +0000)]
Once the release goes out, RELENG_7_* will need approval from so@.

Approved by: core (two months ago)

16 years agoMove the code for working with kld's out into its own file.
John Baldwin [Thu, 24 Jan 2008 19:11:13 +0000 (19:11 +0000)]
Move the code for working with kld's out into its own file.

16 years agoWhen asked to use kqueue, AIO stores its internal state in the
Jean-Sébastien Pédron [Thu, 24 Jan 2008 17:10:19 +0000 (17:10 +0000)]
When asked to use kqueue, AIO stores its internal state in the
`kn_sdata' member of the newly registered knote. The problem is that
this member is overwritten by a call to kevent(2) with the EV_ADD flag,
targetted at the same kevent/knote. For instance, a userland application
may set the pointer to NULL, leading to a panic.

A testcase was provided by the submitter.

PR: kern/118911
Submitted by: MOROHOSHI Akihiko <moro@remus.dti.ne.jp>
MFC after: 1 day

16 years agoDo not dereference NULL scp in the case the screen is not opened.
Konstantin Belousov [Thu, 24 Jan 2008 15:37:48 +0000 (15:37 +0000)]
Do not dereference NULL scp in the case the screen is not opened.
Instead, return ENXIO to the ioctl caller.

Reported and tested by: Pawel Worach <pawel.worach gmail com>
Discussed with: markus
MFC after: 3 days

16 years agoReflect lockcount() axing and lockmgr() prototype changing.
Attilio Rao [Thu, 24 Jan 2008 14:17:52 +0000 (14:17 +0000)]
Reflect lockcount() axing and lockmgr() prototype changing.

16 years ago- sched_4bsd is no longer a default system scheduler on some
Ruslan Ermilov [Thu, 24 Jan 2008 13:48:20 +0000 (13:48 +0000)]
- sched_4bsd is no longer a default system scheduler on some
  architectures, so call it "traditional" instead.

- sched_ule is no longer buggy or experimental (according to
  rev. 1.7 of sched_ule(4)), so don't call it experimental
  (reported by a user on stable@).

Reviewed by: rwatson

16 years agoBump __FreeBSD_version in order to signal:
Attilio Rao [Thu, 24 Jan 2008 12:37:54 +0000 (12:37 +0000)]
Bump __FreeBSD_version in order to signal:
- lockmgr() prototype changing
- lockcount() axing
- LOCKMGR_ASSERT() axing

16 years agoCleanup lockmgr interface and exported KPI:
Attilio Rao [Thu, 24 Jan 2008 12:34:30 +0000 (12:34 +0000)]
Cleanup lockmgr interface and exported KPI:
- Remove the "thread" argument from the lockmgr() function as it is
  always curthread now
- Axe lockcount() function as it is no longer used
- Axe LOCKMGR_ASSERT() as it is bogus really and no currently used.
  Hopefully this will be soonly replaced by something suitable for it.
- Remove the prototype for dumplockinfo() as the function is no longer
  present

Addictionally:
- Introduce a KASSERT() in lockstatus() in order to let it accept only
  curthread or NULL as they should only be passed
- Do a little bit of style(9) cleanup on lockmgr.h

KPI results heavilly broken by this change, so manpages and
FreeBSD_version will be modified accordingly by further commits.

Tested by: matteo

16 years agoThere is no PUC_FASTINTR option anymore.
Dmitry Morozovsky [Thu, 24 Jan 2008 12:09:59 +0000 (12:09 +0000)]
There is no PUC_FASTINTR option anymore.

MFC after: 2 weeks

16 years ago- Reduce how much ZFS caches by default. This is another change to mitigate
Pawel Jakub Dawidek [Thu, 24 Jan 2008 11:24:16 +0000 (11:24 +0000)]
- Reduce how much ZFS caches by default. This is another change to mitigate
  'kmem_map too small panics'.
- Print two warnings if there is not enough memory and not enough address
  space.
- Improve comment.

16 years agoChange type of kmem_used() and kmem_size() functions to uint64_t, so it
Pawel Jakub Dawidek [Thu, 24 Jan 2008 11:21:54 +0000 (11:21 +0000)]
Change type of kmem_used() and kmem_size() functions to uint64_t, so it
doesn't overflow in arc.c in this check:

if (kmem_used() > (kmem_size() * 4) / 5)
return (1);

With this bug ZFS almost doesn't cache.

Only 32bit machines are affected that have vm.kmem_size set to values >=1GB.

Reported by: David Taylor <davidt@yadt.co.uk>

16 years agoReplace the last susers calls in netinet6/ with privilege checks.
Bjoern A. Zeeb [Thu, 24 Jan 2008 08:25:59 +0000 (08:25 +0000)]
Replace the last susers calls in netinet6/ with privilege checks.

Introduce a new privilege allowing to set certain IP header options
(hop-by-hop, routing headers).

Leave a few comments to be addressed later.

Reviewed by: rwatson (older version, before addressing his comments)

16 years agoDifferentiate between addifaddr and delifaddr for the privilege check.
Bjoern A. Zeeb [Thu, 24 Jan 2008 08:14:38 +0000 (08:14 +0000)]
Differentiate between addifaddr and delifaddr for the privilege check.

Reviewed by: rwatson
MFC after: 2 weeks

16 years agoRemove one more alpha leftover.
Ruslan Ermilov [Thu, 24 Jan 2008 07:43:09 +0000 (07:43 +0000)]
Remove one more alpha leftover.

16 years agoMany improvements that have been collected over time:
Scott Long [Thu, 24 Jan 2008 07:26:53 +0000 (07:26 +0000)]
Many improvements that have been collected over time:

- Improve error handling for load operations.
- Fix a memory corruption bug when using certain linux management apps.
- Allocate all commands up front to avoid OOM deadlocks later on.

16 years agoFlag a hack.
Ruslan Ermilov [Thu, 24 Jan 2008 07:25:13 +0000 (07:25 +0000)]
Flag a hack.

16 years agoStyle.
Ruslan Ermilov [Thu, 24 Jan 2008 07:24:30 +0000 (07:24 +0000)]
Style.

16 years agoShorter equivalent of the command.
Ruslan Ermilov [Thu, 24 Jan 2008 07:04:12 +0000 (07:04 +0000)]
Shorter equivalent of the command.

16 years agoCosmetique: sort the list.
Ruslan Ermilov [Thu, 24 Jan 2008 07:03:21 +0000 (07:03 +0000)]
Cosmetique: sort the list.

16 years agoAdd a diagnostic note about "transmission error ... tx underrun, increasing
Tom Rhodes [Thu, 24 Jan 2008 00:39:38 +0000 (00:39 +0000)]
Add a diagnostic note about "transmission error ... tx underrun, increasing
tx start threshold ..."  Looking around on the mailing lists, and even having
one of these cards I agree the messages should be documented.

Bump doc date.

PR: 88477

16 years agoSupport source upgrades from at least 6.0-RELEASE.
Ruslan Ermilov [Wed, 23 Jan 2008 22:21:36 +0000 (22:21 +0000)]
Support source upgrades from at least 6.0-RELEASE.

Reviewed by: imp, obrien

16 years agotcp_usrreq.c:1.313 removed tcbinfo locking from tcp_usr_accept(), which
Robert Watson [Wed, 23 Jan 2008 21:15:51 +0000 (21:15 +0000)]
tcp_usrreq.c:1.313 removed tcbinfo locking from tcp_usr_accept(), which
while in principle a good idea, opened us up to a race inherrent to
the syncache's direct insertion of incoming TCP connections into the
"completed connection" listen queue, as it transpires that the socket
is inserted before the inpcb is fully filled in by syncache_expand().
The bug manifested with the occasional returning of 0.0.0.0:0 in the
address returned by the accept() system call, which occurred if accept
managed to execute tcp_usr_accept() before syncache_expand() had copied
the endpoint addresses into inpcb connection state.

Re-add tcbinfo locking around the address copyout, which has the effect
of delaying the copy until syncache_expand() has finished running, as
it is run while the tcbinfo lock is held.  This is undesirable in that
it increases contention on tcbinfo further, but a more significant
change will be required to how the syncache inserts new sockets in
order to fix this and keep more granular locking here.  In particular,
either more state needs to be passed into sonewconn() so that
pru_attach() can fill in the fields *before* the socket is inserted, or
the socket needs to be inserted in the incomplete connection queue
until it is actually ready to be used.

Reported by: glebius (and kris)
Tested by: glebius

16 years agoFix a regression introduced in rev 1.99: replace fclose(f) with a comment
Dag-Erling Smørgrav [Wed, 23 Jan 2008 20:57:59 +0000 (20:57 +0000)]
Fix a regression introduced in rev 1.99: replace fclose(f) with a comment
explaining why f cannot possibly be a valid FILE * at this point.

MFC after: 1 day

16 years ago- Document firewall_nat_enable related settings.
Chin-San Huang [Wed, 23 Jan 2008 16:08:35 +0000 (16:08 +0000)]
- Document firewall_nat_enable related settings.

Tested by: AB
MFC after: 1 month

16 years agoFix bundle xmit octets stats for packet-split operation mode.
Alexander Motin [Wed, 23 Jan 2008 11:47:09 +0000 (11:47 +0000)]
Fix bundle xmit octets stats for packet-split operation mode.

16 years agoo Add boot, gdb, nfsserver and opencrypto dirs to CSCOPEDIRS; sort.
Maxim Konovalov [Wed, 23 Jan 2008 08:50:34 +0000 (08:50 +0000)]
o Add boot, gdb, nfsserver and opencrypto dirs to CSCOPEDIRS; sort.

16 years agoTrack version # from the portable release.
Tim Kientzle [Wed, 23 Jan 2008 05:48:07 +0000 (05:48 +0000)]
Track version # from the portable release.

16 years agoExplain a subtle API change that was made recently.
Tim Kientzle [Wed, 23 Jan 2008 05:47:08 +0000 (05:47 +0000)]
Explain a subtle API change that was made recently.
Even though I believe this is a good change, it does
have the potential to break certain clients, so it's
good to document the reasoning behind the change.

16 years agoProperly pad symlinks when writing cpio "newc" format.
Tim Kientzle [Wed, 23 Jan 2008 05:43:26 +0000 (05:43 +0000)]
Properly pad symlinks when writing cpio "newc" format.
Thanks to: Jesse Barker for reporting this.
MFC after: 7 days

16 years ago"NONE" -> "ASCII" encoding
Andrey A. Chernov [Wed, 23 Jan 2008 04:25:10 +0000 (04:25 +0000)]
"NONE" -> "ASCII" encoding

16 years ago - sched_prio() should only adjust tdq_lowpri if the thread is running or on
Jeff Roberson [Wed, 23 Jan 2008 03:10:18 +0000 (03:10 +0000)]
 - sched_prio() should only adjust tdq_lowpri if the thread is running or on
   a run-queue.  If the priority is numerically raised only change lowpri
   if we're certain it will be correct.  Some slop is allowed however
   previously we could erroneously raise lowpri for an idle cpu that a
   thread had recently run on which lead to errors in load balancing
   decisions.

16 years agoFix longstanding mb/wc functions segfault if error occurse
Andrey A. Chernov [Wed, 23 Jan 2008 03:05:35 +0000 (03:05 +0000)]
Fix longstanding mb/wc functions segfault if error occurse
inside _<encoding>_init().
Currently _EUC_init() only was affected.

16 years agoBetter fix for longstanding segfault. Don't touch current locale at all
Andrey A. Chernov [Wed, 23 Jan 2008 02:17:27 +0000 (02:17 +0000)]
Better fix for longstanding segfault. Don't touch current locale at all
on unknown encoding. Previous fix resets it to POSIX.

16 years ago1) Add (void) cast to _none_init() (while I am here)
Andrey A. Chernov [Wed, 23 Jan 2008 01:57:26 +0000 (01:57 +0000)]
1) Add (void) cast to _none_init() (while I am here)
2) Fix longstanding segfault in mb/wc code when unknown encoding is specified
in the locale file (mb/wc functions becomes NULL in that case).

16 years agoConditionally add mklocale to bootstrap-tools
Andrey A. Chernov [Wed, 23 Jan 2008 00:16:37 +0000 (00:16 +0000)]
Conditionally add mklocale to bootstrap-tools

16 years agoBump FreeBSD_version after adding "ASCII" encoding to libc
Andrey A. Chernov [Wed, 23 Jan 2008 00:04:18 +0000 (00:04 +0000)]
Bump FreeBSD_version after adding "ASCII" encoding to libc

16 years agoTake advantage of the new physically contiguous 9K jumbos in 8.
Andrew Gallatin [Tue, 22 Jan 2008 22:04:31 +0000 (22:04 +0000)]
Take advantage of the new physically contiguous 9K jumbos in 8.

16 years agoAdd manpages for BUF_RECURSED(9) and BUF_ISLOCKED(9) and connect them to
Attilio Rao [Tue, 22 Jan 2008 21:26:35 +0000 (21:26 +0000)]
Add manpages for BUF_RECURSED(9) and BUF_ISLOCKED(9) and connect them to
the build.

Reviewed by: brueffer

16 years agoAdd the newly added function lockmgr_recursed() to the manpages.
Attilio Rao [Tue, 22 Jan 2008 20:16:09 +0000 (20:16 +0000)]
Add the newly added function lockmgr_recursed() to the manpages.

16 years agoReflect BUF_REFCNT(9) removal.
Attilio Rao [Tue, 22 Jan 2008 20:08:09 +0000 (20:08 +0000)]
Reflect BUF_REFCNT(9) removal.

Pointed out by: brueffer

16 years agoBUF_REFCNT(9) function no more exists, so just axe out the manpage.
Attilio Rao [Tue, 22 Jan 2008 20:02:24 +0000 (20:02 +0000)]
BUF_REFCNT(9) function no more exists, so just axe out the manpage.

16 years agoFix lock.9 manpage in order to recall lockmgr_disown() with 'man' command.
Attilio Rao [Tue, 22 Jan 2008 19:58:30 +0000 (19:58 +0000)]
Fix lock.9 manpage in order to recall lockmgr_disown() with 'man' command.

16 years agoCorrect a typo.
Tom Rhodes [Tue, 22 Jan 2008 19:16:09 +0000 (19:16 +0000)]
Correct a typo.

Noticed by: ru

16 years ago- Add new NTP servers provided by NIC.br (http://www.ntp.br)
Marcus Alves Grando [Tue, 22 Jan 2008 18:58:48 +0000 (18:58 +0000)]
- Add new NTP servers provided by NIC.br (http://www.ntp.br)
- Remove nonfunctional servers

PR: 119884
Approved by: simon
MFC after: 3 days

16 years agoDocument net.inet.tcp.syncookies_only using a description taken from
Tom Rhodes [Tue, 22 Jan 2008 18:35:23 +0000 (18:35 +0000)]
Document net.inet.tcp.syncookies_only using a description taken from
tcp_syncache.c revision 1.99 of andre's commit log.

PR: 107611

16 years agoIn 'fixit mode' running "fsck /dev/ad0s1a" typically complains that it
Ken Smith [Tue, 22 Jan 2008 16:35:10 +0000 (16:35 +0000)]
In 'fixit mode' running "fsck /dev/ad0s1a" typically complains that it
can't find fsck_4.2bsd because there was no fstab file saying what
filesystem type it is looking at so it got the filesystem type from
the disk's label.  When that fails admins who haven't been in this
situation before are most likely to try "fsck -t ufs /dev/ad0s1a" because
ufs is the type used in fstab files on working systems but that also fails
complaining it can't find fsck_ufs.

This just sets it up so /stand in the MFS image (/sbin is a symlink
to /stand) includes hard links pointing fsck_4.2bsd and fsck_ufs to
fsck_ffs which is what is present in /sbin on installed systems.

Prodded by: obrien
MFC after: 1 day

16 years agoCleanup after last commit (remove undefined variables).
Ruslan Ermilov [Tue, 22 Jan 2008 15:57:57 +0000 (15:57 +0000)]
Cleanup after last commit (remove undefined variables).

16 years agoXref flopen.3 which references this manual page.
Tom Rhodes [Tue, 22 Jan 2008 15:56:48 +0000 (15:56 +0000)]
Xref flopen.3 which references this manual page.

PR: 112650

16 years agoQuick note on how to disable malloc debugging in the top entry in this file.
Tom Rhodes [Tue, 22 Jan 2008 15:05:22 +0000 (15:05 +0000)]
Quick note on how to disable malloc debugging in the top entry in this file.

PR: 83621
Submitted by: Scott Robbins <scottro@nyc.rr.com> (original version)
Reviewed by: imp

16 years agoThe config-recursive target is not run during the normal install process, move
Tom Rhodes [Tue, 22 Jan 2008 12:23:30 +0000 (12:23 +0000)]
The config-recursive target is not run during the normal install process, move
it down to where it belongs.

Document 'all-depends-list' target and bump doc date.

PR: 119519
Submitted by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: flz

16 years agoRepeat iostat header after rows-3 instead of a hardcoded 20.
Giorgos Keramidas [Tue, 22 Jan 2008 11:18:51 +0000 (11:18 +0000)]
Repeat iostat header after rows-3 instead of a hardcoded 20.

Use ioctl() to get the window size in iostat(8), and force a new
header to be prepended to the output every time the current
window size changes.  Change the number of lines before each
header to `rows - 3' when the terminal is resized, so that the
full terminal length can be used for output lines.

PR: bin/119705
Submitted by: keramida
Approved by: maxim
MFC after: 2 weeks

16 years agoSmall fixes.
Christian Brueffer [Tue, 22 Jan 2008 07:40:21 +0000 (07:40 +0000)]
Small fixes.

16 years agoMake -l always have the SUSv2 meaning of "check links."
Tim Kientzle [Tue, 22 Jan 2008 07:23:44 +0000 (07:23 +0000)]
Make -l always have the SUSv2 meaning of "check links."
GNU tar changed -l to match SUSv2 a couple of years ago,
so bsdtar no longer needs to pander to this particular GNUism.

Thanks to: Debian maintainers
MFC after: 7 days

16 years agoUnderstand newly introduced "ASCII" encoding
Andrey A. Chernov [Tue, 22 Jan 2008 00:04:50 +0000 (00:04 +0000)]
Understand newly introduced "ASCII" encoding

16 years agoAdd a rather basic man page for the coda kernel module.
Robert Watson [Mon, 21 Jan 2008 23:59:22 +0000 (23:59 +0000)]
Add a rather basic man page for the coda kernel module.

MFC after: 3 days

16 years agoDuring PREINIT, when giving the interface the address 0.0.0.0, do it as an
Brooks Davis [Mon, 21 Jan 2008 23:54:57 +0000 (23:54 +0000)]
During PREINIT, when giving the interface the address 0.0.0.0, do it as an
alias to avoid distrubing other addresses.

PR: bin/119255
Submitted by: Jaakko Heinonen <jh at saunalahti dot fi>

16 years agoIntroduce new encoding: "ASCII"
Andrey A. Chernov [Mon, 21 Jan 2008 23:48:12 +0000 (23:48 +0000)]
Introduce new encoding: "ASCII"
It differs from default C/POSIX "NONE" mainly by stricter 8bit check
for mb*towc*/wc*tomb* family, returning EILSEQ

16 years agoNote that the punch_fw option does not work in securelevel 3 and Xref init.8.
Tom Rhodes [Mon, 21 Jan 2008 23:09:18 +0000 (23:09 +0000)]
Note that the punch_fw option does not work in securelevel 3 and Xref init.8.
Bump .Dd.

PR: 41807

16 years agoNote what options are only for DDS drives.
Tom Rhodes [Mon, 21 Jan 2008 22:08:05 +0000 (22:08 +0000)]
Note what options are only for DDS drives.

PR: 35608

16 years agoNote change in the supported upgrade path. Prior to this 5.3-release
Warner Losh [Mon, 21 Jan 2008 22:04:37 +0000 (22:04 +0000)]
Note change in the supported upgrade path.  Prior to this 5.3-release
and newer were supported upgrade paths to -current.  After today's
commits, 6.0-RELEASE and newer is supported for jumping to current.
Make that clear in the UPDATING entry.  For the pedants out there,
upgrading from FreeBSD_version 600029 and newer should still work.
This represents a point from May 29, 2005 forward.  The prior date was
October 16th 2004.

16 years agoPut "coda_rdwr: Internally Opening" printf generated by in-kernel writes
Robert Watson [Mon, 21 Jan 2008 21:39:08 +0000 (21:39 +0000)]
Put "coda_rdwr: Internally Opening" printf generated by in-kernel writes
to files, such as ktrace output, under CODA_VERBOSE.  Otherwise, each
such call to VOP_WRITE() results in a kernel printf.

MFC after: 3 days
Obtained from: NetBSD

16 years agoReplace references to VOP_LOCK() w/o LK_RETRY to vn_lock() with LK_RETRY,
Robert Watson [Mon, 21 Jan 2008 21:19:07 +0000 (21:19 +0000)]
Replace references to VOP_LOCK() w/o LK_RETRY to vn_lock() with LK_RETRY,
avoiding extra error handling, or in some cases, missing error handling.

MFC after: 3 days
Discussed with: kib

16 years agoDocument the 'maintainer' target.
Christian Brueffer [Mon, 21 Jan 2008 19:52:15 +0000 (19:52 +0000)]
Document the 'maintainer' target.

PR: 119699
Submitted by: Warren Block <wblock@wonkity.com>
MFC after: 3 days

16 years agoRemove 5.x and 6.x cruft - source upgrades to RELENG_8 from versions prior
David E. O'Brien [Mon, 21 Jan 2008 18:44:55 +0000 (18:44 +0000)]
Remove 5.x and 6.x cruft - source upgrades to RELENG_8 from versions prior
to RELENG_7 are not supported.

16 years agoAdjust paths for EDITOR and PAGER environment variables in the fixit
Ken Smith [Mon, 21 Jan 2008 17:25:48 +0000 (17:25 +0000)]
Adjust paths for EDITOR and PAGER environment variables in the fixit
shell.  This would break them for floppy based fixit mode which still
seems to use /stand except that vi(1) and more(1) don't exist in /stand
on the fixit floppy so it really doesn't matter what these settings are
there.  These paths work for CD-based fixit mode.

This is just "temporary" and on its way to 7.0-REL.  I'm too chicken to
make what is probably the correct adjustment this close to release.  It
seems /mnt2 is just a symbolic link, and stuff really gets mounted as
/dist.  Adjusting paths to that for 8.X is probably the right thing to
do and I'll try that after 7.0 is done.

Noticed by: gallatin
MFC after: 1 day

16 years agoFix cutoffs. This is just a cleanup and an optimization for unusual
Bruce Evans [Mon, 21 Jan 2008 13:46:21 +0000 (13:46 +0000)]
Fix cutoffs.  This is just a cleanup and an optimization for unusual
cases which are used mainly by regression tests.

As usual, the cutoff for tiny args was not correctly translated to
float precision.  It was 2**-54 but 2**-24 works.  It must be about
2**-precision, since the error from approximating log(1+x) by x is
about the same as |x|.  Exhaustive testing shows that 2**-24 gives
perfect rounding in round-to-nearest mode.

Similarly for the cutoff for being small, except this is not used by
so many other functions.  It was 2**-29 but 2**-15 works.  It must be
a bit smaller than sqrt(2**-precision), since the error from
approximating log(1+x) by x-x*x/2 is about the same as x*x.  Exhaustive
testing shows that 2**-15 gives a maximum error of 0.5052 ulps in
round-to-nearest-mode.  The algorithm for the general case is only good
for 0.8388 ulps, so this is sufficient (but it loses slightly on i386 --
then extra precision gives 0.5032 ulps for the general case).

While investigating this, I noticed that optimizing the usual case by
falling into a middle case involving a simple polynomial evaluation
(return x-x*x/2 instead of x here) is not such a good idea since it
gives an enormous pessimization of tinier args on machines for which
denormals are slow.  Float x*x/2 is denormal when |x| ~< 2**-64 and
x*x/2 is evaluated in float precision, so it can easily be denormal
for normal x.  This is even more interesting for general polynomial
evaluations.  Multiplying out large powers of x is normally a good
optimization since it reduces dependencies, but it creates denormals
starting with quite large x.

16 years agoAdd copyrights.
Ruslan Ermilov [Mon, 21 Jan 2008 13:26:33 +0000 (13:26 +0000)]
Add copyrights.

PR: 119136

16 years agoFix build.
Pyun YongHyeon [Mon, 21 Jan 2008 09:51:28 +0000 (09:51 +0000)]
Fix build.

16 years agosf(4) should work on all archs now, remove it from here.
Christian Brueffer [Mon, 21 Jan 2008 09:00:09 +0000 (09:00 +0000)]
sf(4) should work on all archs now, remove it from here.

16 years agoDocument two new sysctl variables, dev.sf.%d.int_mod and dev.sf.%d.stats.
Pyun YongHyeon [Mon, 21 Jan 2008 07:35:15 +0000 (07:35 +0000)]
Document two new sysctl variables, dev.sf.%d.int_mod and dev.sf.%d.stats.
Xref vlan(4).
Touchd Dd.

Reviewed by: brueffer

16 years agoUncomment sf(4), sf(4) should work on all architectures.
Pyun YongHyeon [Mon, 21 Jan 2008 06:51:25 +0000 (06:51 +0000)]
Uncomment sf(4), sf(4) should work on all architectures.

16 years agosf(4) gained VLAN_MTU support.
Pyun YongHyeon [Mon, 21 Jan 2008 06:47:20 +0000 (06:47 +0000)]
sf(4) gained VLAN_MTU support.
Touch Dd.

16 years agoOverhaul sf(4) to make it run on all architectures and implement
Pyun YongHyeon [Mon, 21 Jan 2008 06:38:23 +0000 (06:38 +0000)]
Overhaul sf(4) to make it run on all architectures and implement
checksum offoload by downloading AIC-6915 firmware. Changes are
 o Header file cleanup.
 o Simplified probe logic.
 o s/u_int{8,16,32}_t/uint{8,16,32}_t/g
 o K&R -> ANSI C.
 o In register access function, added support both memory mapped and
   IO space register acccess. The function will dynamically detect
   which method would be choosed.
 o sf_setperf() was modified to support strict-alignment
   architectures.
 o Use SF_MII_DATAPORT instead of hardcoded value 0xffff.
 o Added link state/speed, duplex changes handling task q. The task q
   is also responsible for flow control settings.
 o Always hornor link up/down state reported by mii layers. The link
   state information is used in sf_start() to determine whether we
   got a valid link.
 o Added experimental flow-control setup. It was commented out but
   will be activated once we have flow-cotrol infrastructure in mii
   layer.
 o Simplify IFF_UP/IFCAP_POLLING and IFF_PROMISC handling logic. Rx
   filter always honors promiscuous mode.
 o Implemented suspend/resume methods.
 o Reorganized Rx filter routine so promiscuous mode changes doesn't
   require interface re-initialization.
 o Reimplemnted driver probe routine such that it looks for matching
   device from supported hardware list table. This change will help to
   add newer hardware revision to the driver.
 o Use ETHER_ADDR_LEN instead of hardcoded value.
 o Prefer memory space register mapping over I/O space as the hardware
   requires lots of register access to get various consumer/producer
   index. Failing to get memory space mapping, sf(4) falls back to I/O
   space mapping. Use of memory space register mapping requires
   somewhat large memory space(512K), though.
 o Switch to simpler bus_{read,write}_{1,2,4}.
 o Use PCIR_BAR macro to get BARs.
 o Program PCI cache line size if the cache line size was set to 0
   and enable PCI MWI.
 o Add a new sysctl node 'dev.sf.N.stats' that shows various MAC
   counters for Rx/Tx statistics.
 o Add a sysctl node to configure interrupt moderation timer. The
   timer defers interrupts generation until time specified in timer
   control register is expired. The value in the timer register is in
   units of 102.4us. The allowable range for the timer is 0 - 31
   (0 ~ 3.276ms).
   The default value is 1(102.4us). Users can change the timer value
   with dev.sf.N.int_mod sysctl(8) variable/loader(8) tunable.
 o bus_dma(9) conversion
    - Enable 64bit DMA addressing.
    - Enable 64bit descriptor format support.
    - Apply descriptor ring alignment requirements(256 bytes alignment).
    - Apply Rx buffer address alignment requirements(4 bytes alignment).
    - Apply 4GB boundary restrictions(Tx/Rx ring and its completion ring
      should live in the same 4GB address space.)
    - Set number of allowable number of DMA segments to 16. In fact,
      AIC-6915 doesn't have a limit for number of DMA segments but it
      would be waste of Tx descriptor resource if we allow more than 16.
    - Rx/Tx side bus_dmamap_load_mbuf_sg(9) support.
    - Added alignment fixup code for strict-alignment architectures.
    - Added endianness support code in Tx/Rx descriptor access.
    With these changes sf(4) should work on all platforms.
 o Don't set if_mtu in device attach, it's handled in ether_ifattach.
 o Use our own callout to drive watchdog timer.
 o Enable VLAN oversized frames and announce sf(4)'s VLAN capability
   to upper layer.
 o In sf_detach(), remove mtx_initialized KASSERT as it's not possible
   to get there without initialzing the mutex. Also mark that we're
   about to detaching so active bpf listeners do not panic the system.
 o To reduce PCI register access cycles, Rx completion ring is
   directly scanned instead of reading consumer/producer index
   registers. In theory, Tx completion ring also can be directly
   scanned. However the completion ring is composed of two types
   completion(1 for Tx done and 1 and DMA done). So reading producer
   index via register access would be more safer way to detect the
   ring wrap-around.
 o In sf_rxeof(), don't use m_devget(9) to align recevied frames. The
   alignment is required only for strict-alignment architectures and
   now the alignment is handled by sf_fixup_rx() if required. The
   removal of the copy operation in fast path should increase Rx
   performance a lot on non-strict-alignemnt architectures such as
   i386 and amd64.
 o In sf_newbuf(), don't set descriptor valid bit as sf(4) is
   programmed to run with normal mode. In normal mode, the valid bit
   have no meaning. The valid bit should be used only when the
   hardware uses polling(prefetch) mode. The end of descriptor queue
   bit could be used if needed, but sf(4) relys on auto-wrapping of
   hardware on 256 descriptor queue entries so both valid and
   descriptor end bit are not used anymore.
 o Don't disable generation of Tx DMA completion as said in datasheet
   and use the Tx DMA completion entry instead of relying on Tx done
   completion entry. Also added additional Tx completion entry type
   check in Tx completion handler.
 o Don't blindly reset watchdog timer in sf_txeof(). sf(4) now unarm
   the the watchdog only if there are no active Tx descriptors in Tx
   queue.
 o Don't manually update various counters in driver, instead, use
   built-in MAC statistic registers to update them. The statistic
   registers are updated in every second.
 o Modified Tx underrun handlers to increase the threshold value
   in units of 256 bytes. Previously it used to increase 16 bytes
   at a time which seems to take too long to stabalize whenever Tx
   underrun occurrs.
 o In interrupt handler, additional check for the interrupt is
   performed such that interrupts only for this device is allowed to
   process descriptor rings. Because reading SF_ISR register clears
   all interrtups, nuke writing to a SF_ISR register.
 o Tx underrun is abonormal condition and SF_ISR_ABNORMALINTR includes
   the interrupt. So there is no need to inspect the Tx underrun again
   in main interrupt loop.
 o Don't blindly reinitialize hardware for abnormal interrupt
   condition. sf(4) reintializes the hardware only when it encounters
   DMA error which requires an explicit hardware reinitialization.
 o Fix a long standing bug that incorrectly clears MAC statistic
   registers in sf_init_locked.
 o Added strict-alignment safe way of ethernet address reprogramming
   as IF_LLADDR may return unaligned address.
 o Move sf_reset() to sf_init_locked in order to always reset the
   hardware to a known state prior to configuring hardware.
 o Set default Rx DMA, Tx DMA paramters as shown in datasheet.
 o Enable PCI busmaster logic and autopadding for VLAN frames.
 o Rework sf_encap.
     - Previously sf(4) used to type 0 of Tx descriptor with padding
       enabled to store driver private data. Emebedding private data
       structures into descriptors is bad idea as the structure size
       would be different between 64bit and 32bit architectures. The
       type 0 descriptor allows fixed number of DMA segments in
       a descriptor format and provides relatively simple interface to
       manage multi-fragmented frames.
       However, it wastes lots of Tx descriptors as not all frames are
       fragmented as the number of allowable segments in a descriptor.
     - To overcome the limitation of type 0 descriptor, switch to type
       2 descriptor which allows 64bit DMA addressing and can handle
       unliumited number of fragmented DMA segments. The drawback of
       type 2 descriptor is in its complexity in managing descriptors
       as driver should handle the end of Tx ring manually.
    -  Manually set Tx desciptor queue end mark and record number of
       used descriptors to reclaim used descriptors in sf_txeof().
 o Rework sf_start.
     - Honor link up/down state before attempting transmission.
     - Because sf(4) uses only one of two Tx queues, use low priority
       queue instead of high one. This will remove one shift operation
       in each Tx kick command.
     - Cache last produder index into softc such that subsequenet Tx
       operation doesn't need to access producer index register.
 o Rewrote sf_stats_update to include all available MAC statistic
   counters.
 o Employ AIC-6915 firmware from Adaptec and implement firmware
   download routine and TCP/UDP checksum offload.
   Partial checksum offload support was commented out due to the
   possibility of firmware bug in RxGFP.
   The firmware can strip VLAN tag in Rx path but the lack of firmware
   assistance of VLAN tag insertion in transmit side made it useless
   on FreeBSD. Unlike checksum offload, FreeBSD requires both Tx/Rx
   hardware VLAN assistance capability. The firmware may also detect
   wakeup frame and can wake system up from states other than D0.
   However, the lack of wakeup support form D3cold state keep me from
   adding WOL capability. Also detecting WOL frame requires firmware
   support but it's not yet known to me whether the firmware can
   process the WOL frame.
 o Changed *_ADDR_HIADDR to *_ADDR_HI to match other definitions of
   registers.
 o Added definitioan to interrupt moderation related constants.
 o Redefined SF_INTRS to include Tx DMA done and DMA errors. Removed
   Tx done as it's not needed anymore.
 o Added definition for Rx/Tx DMA high priority threshold.
 o Nuked unused marco SF_IDX_LO, SF_IDX_HI.
 o Added complete MAC statistic register definition.
 o Modified sf_stats structure to hold all MAC statistic regiters.
 o Nuke various driver private padding data in Tx/Rx descriptor
   definition. sf(4) no longer requires private padding. Also remove
   unused padding related definitions. This greatly simplifies
   descriptor manipulation on 64bit architectures.
 o Becase we no longer pad driver private data into descriptor,
   remove deprecated/not-applicable comments for padding.
 o Redefine Rx/Tx desciptor status. sf(4) doesn't use bit fileds
   anymore to support endianness.

Tested by: bruffer (initial version)

16 years agoIt seems that the firmware for TxGFP does not work at all. I could
Pyun YongHyeon [Mon, 21 Jan 2008 05:09:07 +0000 (05:09 +0000)]
It seems that the firmware for TxGFP does not work at all. I could
be wrong but I couldn't find a way to make it work. In addition, the
number of TxGFP instruction does not match the firmware image size,
so I guess something was wrong when Adaptec generated the TxGFP
firmware from their DDK.

According to datasheet, normally, the first GFP instruction would be
opcode C, WaitForStartOfFrame, to synchronize checksumming with
incoming frame. But the first instruction in TxGFP firmware was
opcode 1, BrToImmIfTrue, so it could not process checksum correctly,
I guess. Checking for RxGFP firmware also indicates the first
instruction should be opcode C. Since the number of instructions in
TxGFP firmware lacks exactly one instruction, I prepended the opcode
C to TxGFP firmware image. With this change, the resulting image size
perfectly matches with the nummber of instructions and Tx checksum
offload seems to work without problems.

16 years agoImport AIC-6915 firmware for GFP from Adaptec.
Pyun YongHyeon [Mon, 21 Jan 2008 05:02:44 +0000 (05:02 +0000)]
Import AIC-6915 firmware for GFP from Adaptec.
Special thanks to bruffer to send the firmware image to me.

Submitted by: gibbs via bruffer

16 years agosf(4) was repocopied to src/sys/dev/sf.
Pyun YongHyeon [Mon, 21 Jan 2008 04:45:58 +0000 (04:45 +0000)]
sf(4) was repocopied to src/sys/dev/sf.

16 years agoImprove kernel NAT support in rc.firewall
Rong-En Fan [Mon, 21 Jan 2008 04:41:18 +0000 (04:41 +0000)]
Improve kernel NAT support in rc.firewall

- Allow IP in firewall_nat_interface, just like natd_interface
- Allow additional configuration parameters passed to ipfw via
  firewall_nat_flags
- Document firewall_nat_* in defaults/rc.conf

Tested by: Albert B. Wang <abwang at gmail.com>
MFC after: 1 month

16 years agoUpdate file list and Makefile after repocopying sf(4) from
Pyun YongHyeon [Mon, 21 Jan 2008 04:27:32 +0000 (04:27 +0000)]
Update file list and Makefile after repocopying sf(4) from
src/sys/pci to src/sys/dev.

16 years agoForced commit to note that sf(4) was repocopied from sys/pci
Pyun YongHyeon [Mon, 21 Jan 2008 04:23:47 +0000 (04:23 +0000)]
Forced commit to note that sf(4) was repocopied from sys/pci
and modified for its new location.

16 years agoupdates for additional chip support
Sam Leffler [Mon, 21 Jan 2008 04:13:00 +0000 (04:13 +0000)]
updates for additional chip support

Submitted by: "J.R. Oldroyd" <jr@opal.com>
MFC after: 2 weeks

16 years agoRegenerate.
Robert Watson [Sun, 20 Jan 2008 23:44:24 +0000 (23:44 +0000)]
Regenerate.

16 years agoUse audit events AUE_SHMOPEN and AUE_SHMUNLINK with new system calls
Robert Watson [Sun, 20 Jan 2008 23:43:06 +0000 (23:43 +0000)]
Use audit events AUE_SHMOPEN and AUE_SHMUNLINK with new system calls
shm_open() and shm_unlink().  More auditing will need to be done for
these calls to capture arguments properly.

16 years agoWhen printing process file descriptor lists, show a type of 'h' for
Robert Watson [Sun, 20 Jan 2008 19:57:33 +0000 (19:57 +0000)]
When printing process file descriptor lists, show a type of 'h' for
POSIX shared memory descriptors.

16 years agoExport a type for POSIX SHM file descriptors via kern.proc.filedesc as
Robert Watson [Sun, 20 Jan 2008 19:55:52 +0000 (19:55 +0000)]
Export a type for POSIX SHM file descriptors via kern.proc.filedesc as
used by procstat, or SHM descriptors will show up as type unknown in
userspace.

16 years agoCorrect the commented out debugging printf()s in REPLACE and NEXT macros.
Bjoern A. Zeeb [Sun, 20 Jan 2008 10:08:15 +0000 (10:08 +0000)]
Correct the commented out debugging printf()s in REPLACE and NEXT macros.
ip6_sprintf() needs a buffer as first argument these days.

MFC after: 2 weeks

16 years agoo Fix ipfw(8) command line parser bug: "ipfw nat 1 config if" requi...
Maxim Konovalov [Sun, 20 Jan 2008 08:31:35 +0000 (08:31 +0000)]
o Fix ipfw(8) command line parser bug: "ipfw nat 1 config if"                   requires an argument.

PR: bin/119815
Submitted by: Dierk Sacher
MFC after: 1 week

16 years agoOops, when merging from the float version to the double versions, don't
Bruce Evans [Sun, 20 Jan 2008 04:09:44 +0000 (04:09 +0000)]
Oops, when merging from the float version to the double versions, don't
forget to translate "float" to "double".

ucbtest didn't detect the bug, but exhaustive testing of the float
case relative to the double case eventually did.  The bug only affects
args x with |x| ~> 2**19*(pi/2) on non-i386 (i386 is broken in a
different way for large args).