dragonfly.git
15 years agoImport the new nrelease Makefile packaging and root template infrastructure
Matthew Dillon [Sat, 10 Jul 2004 22:29:11 +0000 (22:29 +0000)]
Import the new nrelease Makefile packaging and root template infrastructure
from the DragonFly Installer Team and make the following additional
augmentations:

* Use the default port package install location to retrieve packages.
* Pre-check that all required packages exist before doing anything
* Remove the root autologin (also means that gettytab and ~root/.login can
  be removed from the original template).
* Add an etc/issue file
* Add an 'installer' user (root uid)

Obtained-from: The DragonFly Installer Team:
    Chris Pressey, Devon O'Dell, Eirik Nygaard, Hiten Pandya & GeekGod

15 years ago(installer support). We are going to have a special 'installer' login
Matthew Dillon [Sat, 10 Jul 2004 22:15:32 +0000 (22:15 +0000)]
(installer support).  We are going to have a special 'installer' login
instead of an autologin, so make sure its in the list of illegal login users.

15 years agoThere was a mountlist race in getnewvnode() whereby the system could block
Matthew Dillon [Sat, 10 Jul 2004 16:29:45 +0000 (16:29 +0000)]
There was a mountlist race in getnewvnode() whereby the system could block
obtaining the mountlist token while adding a vnode to the mountlist prior
to initializing the vnode's v_usecount and v_data fields.  This bug is
possibly responsible for or related to occassional reports of duplicate
inodes in the system.

Fix the potential problem by more completely initializing the vnode prior
to adding it to the mountlist.  Note that FreeBSD-5 also rearranged thei
r code along the same lines (though this change is independant of their
work).

15 years agoFix some issues with the pccard shutdown path (during reboot and halt).
Matthew Dillon [Sat, 10 Jul 2004 16:25:59 +0000 (16:25 +0000)]
Fix some issues with the pccard shutdown path (during reboot and halt).
pccard was resetting the bridge controller and unmapping the device
without first detaching/shutting down the helper thread or disabling the
interrupt, and without calling the shutdown function for the children,
leading to several actual and potential lockups during a halt/reboot
sequence.

There was also a bug in the thread termination code that could deadlock
the system... the thread interlock was being improperly held while
looping waiting for thread termination.  Finally, there was an instance
where sc->flags was being manipulated without holding the proper lock.

Rearrange the dev/pccard/pccbb shutdown code to (A) call the shutdown
vector for the children, (B) disable the associated interrupt, and
(C) properly terminate the helper thread, and fix the other bugs that
were found.

There are still known issues not addressed by this patch, including
interrupt storms from the cardbus system during halt/reboot (currently
mostly caught by our interrupt rate limiting code), and at least one
unknown deadlock can still occur during halt/reboot.

In discusssions with: Joerg Sonnenberger <joerg@britannica.bec.de>

15 years agoStop using if_dname, use if_printf or ifp->if_xname instead.
Joerg Sonnenberger [Sat, 10 Jul 2004 12:48:55 +0000 (12:48 +0000)]
Stop using if_dname, use if_printf or ifp->if_xname instead.

15 years agoIn lf_wakeup, once we got a range embedded in the unlocked range,
Joerg Sonnenberger [Sat, 10 Jul 2004 12:19:27 +0000 (12:19 +0000)]
In lf_wakeup, once we got a range embedded in the unlocked range,
we can stop waking up threads.

15 years agoRemove unused variable.
David Rhodus [Fri, 9 Jul 2004 19:13:40 +0000 (19:13 +0000)]
Remove unused variable.

15 years agoFix compile warning.
David Rhodus [Fri, 9 Jul 2004 19:11:20 +0000 (19:11 +0000)]
Fix compile warning.

15 years agoAdd a missing '$' to the FreeBSD cvs tags.
Matthew Dillon [Fri, 9 Jul 2004 16:15:27 +0000 (16:15 +0000)]
Add a missing '$' to the FreeBSD cvs tags.

Submitted-by: YONETANI Tomokazu <qhwt+dragonfly-bugs@les.ath.cx>
15 years agoIPS was using malloc flags of 0 (which is no longer allowed). The helper
Matthew Dillon [Fri, 9 Jul 2004 16:15:06 +0000 (16:15 +0000)]
IPS was using malloc flags of 0 (which is no longer allowed).  The helper
routine was being passed a flags argument but due to a prior conditional
the flags argument was always 0 anyway, so just change the malloc to use
M_INTWAIT unconditionally.

Submitted-by: YONETANI Tomokazu <qhwt+dragonfly-bugs@les.ath.cx>
15 years agoAdd support for CS4294.
Jeroen Ruigrok/asmodai [Fri, 9 Jul 2004 10:01:02 +0000 (10:01 +0000)]
Add support for CS4294.

Syncs: FreeBSD v1.51
PR: kern/66280
Submitted by: Christian Brueffer <chris@unixpages.org>

15 years agoAdd the standard DragonFly copyright notice to go along with mine.
Jeffrey Hsu [Thu, 8 Jul 2004 22:43:01 +0000 (22:43 +0000)]
Add the standard DragonFly copyright notice to go along with mine.

Approved by: Matt

15 years agoAdd the standard DragonFly copyright notice to go along with mine.
Jeffrey Hsu [Thu, 8 Jul 2004 22:07:35 +0000 (22:07 +0000)]
Add the standard DragonFly copyright notice to go along with mine.

Approved by: Matt

15 years agoCorrect the FreeBSD attribution on this file.
Chris Pressey [Thu, 8 Jul 2004 17:59:01 +0000 (17:59 +0000)]
Correct the FreeBSD attribution on this file.

15 years agoCorrect the FreeBSD attribution on this file.
Chris Pressey [Thu, 8 Jul 2004 17:50:46 +0000 (17:50 +0000)]
Correct the FreeBSD attribution on this file.

16 years agoGive ugenbuf the standard DragonFly copyright.
Matthew Dillon [Thu, 8 Jul 2004 16:18:50 +0000 (16:18 +0000)]
Give ugenbuf the standard DragonFly copyright.

16 years agoGive the newly created ugenbuf.c the standard DragonFly copyright.
Matthew Dillon [Thu, 8 Jul 2004 16:18:10 +0000 (16:18 +0000)]
Give the newly created ugenbuf.c the standard DragonFly copyright.

16 years agougenbuf is associated with the 'ugen' device, not the 'ugenbuf' device.
Matthew Dillon [Thu, 8 Jul 2004 15:50:19 +0000 (15:50 +0000)]
ugenbuf is associated with the 'ugen' device, not the 'ugenbuf' device.

Reported-by: "GeekGod" <GeekGod@GeekGod.com>
16 years agoAdd PDEBUG call for device_shutdown.
Joerg Sonnenberger [Thu, 8 Jul 2004 12:43:32 +0000 (12:43 +0000)]
Add PDEBUG call for device_shutdown.

16 years agoJulian Elischer posted an interesting proof-of-concept to freebsd-current
Matthew Dillon [Thu, 8 Jul 2004 03:53:54 +0000 (03:53 +0000)]
Julian Elischer posted an interesting proof-of-concept to freebsd-current
regarding UGEN's use of a 1K stack buffer for bulk IO issues.  The small
block size resulted in unnecessarily slow performance with certain devices.

Implement a fix along the lines described.  Create a simple ugen buffer
allocator abstraction and a one-entry cache to avoid unnecessary malloc/free
sequences.  Allow the block size to be set with a sysctl and default it
to 16K.

Not much uses UGEN.  Camera software, mainly.  The change appears to
slightly improve s10sh transfer performance from my Canon 10D.

16 years agoBring EHCI up-to-date with NetBSD. The most serious fixes are 1.53, 1.55,
Matthew Dillon [Thu, 8 Jul 2004 03:47:09 +0000 (03:47 +0000)]
Bring EHCI up-to-date with NetBSD.  The most serious fixes are 1.53, 1.55,
1.56, and 1.64.

    revision 1.67
    Fix a byte order error. (note: was already previously ported to
 DFly)

    revision 1.66
    Fix an endianness problem (EHCI_NULL was being double-swapped).

    revision 1.65
    Make one message dependent on ohcidebug, so it doesn't interfere with polled
    operation; e.g. when entering a root device or in DDB.

    revision 1.64
    Further cleanup of toggle handling.  Now that we use EHCI_QH_DTC, we don't
    need to fiddle with the TOGGLE bit in the overlay descriptor, so minimize
    how much we fuss with it.

    revision 1.63
    Fix an error in a debug printf().

    revision 1.62
    Adjust a couple of comments to make it clear WTF is going on.

    revision 1.61

    revision 1.60
    Remove comment about the data toggle being borked.

    revision 1.59
    As the ehci_idone() now uses the variable `epipe' unconditionally, always
    declare it (in other words, make this file compile w/o EHCI_DEBUG).

    revision 1.58
    Fix a stupid bug in ehci_check_intr() that caused use to try to complete a
    transaction that was still running.  Now ehci can handle multiple devices
    being active at once.

    revision 1.57
    Oops.  Remove a couple of printf()s.

    revision 1.56
    Failure to properly mask off UE_DIR_IN from the endpoint address was causing
    OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set spuriously, causing rather
    interesting lossage.

    Suddenly I get MUCH better performance with ehci...

    revision 1.55
    Set the data toggle correctly, and use EHCI_QTD_DTC.  This fixes problems with
    my ALi-based drive enclosure (it works now, rather than failing to attach).
    Also seems to work with a GL811-based enclosure and an ASUS enclosure with a
    CD-RW, on both Intel and NEC controllers.

    Note: The ALi enclosure is currently very SLOW, due to some issue with taking
    too long to notice that the QTD is complete.  This requires more investigation.

    revision 1.54
    branches:  1.54.2;
    Michael van Elst reports his USB2 disk works stable after latest Chuck's
    ehci.c changes, so remove the item from TODO.

    revision 1.53
    in ehci_softintr() when looping over the active xfers, save the next pointer
    before calling ehci_check_intr(), since that will free the xfer structure
    if the xfer is complete.

    revision 1.52
    add list of known issues, from Lennart Augustsson and Michael van Elst

    revision 1.51
    Use the correct wValue to get hub desriptors.
    Also, make wValue checks of root hub codes less strict.

16 years agoBring in a bunch of updates from NetBSD:
Matthew Dillon [Thu, 8 Jul 2004 03:25:00 +0000 (03:25 +0000)]
Bring in a bunch of updates from NetBSD:

    revision 1.144
    Fix swapped lines in cleanup in ohci_init().  From OpenBSD.

    revision 1.145
    Try harder to avoid 0 ports woth AMD756.  From OpenBSD.

    revision 1.146
    Use the correct wValue to get hub desriptors.
    Also, make wValue checks of root hub codes less strict.

    revision 1.147
    Failure to properly mask off UE_DIR_IN from the endpoint address was causing
    OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set spuriously, causing rather
    interesting lossage.  Suddenly I get MUCH better performance with ehci...

    revision 1.148
    Adjust a couple of comments to make it clear WTF is going on.

    revision 1.149
    Make one message dependent on ohcidebug, so it doesn't interfere with polled
    operation; e.g. when entering a root device or in DDB.

    revision 1.150
    Fix an error in a printf() format.
    Swap the order that two items are written; possibly fixes a race condition
    that would affect isoc transfers.

16 years agoJust use the .Ev directive for printing an environment variable,
Hiten Pandya [Thu, 8 Jul 2004 01:21:11 +0000 (01:21 +0000)]
Just use the .Ev directive for printing an environment variable,
don't prepend it with anything else.

16 years agoCorrectly use the .Bd directive, i.e., present it with the -literal
Hiten Pandya [Thu, 8 Jul 2004 01:16:02 +0000 (01:16 +0000)]
Correctly use the .Bd directive, i.e., present it with the -literal
argument.

16 years agoA variety of mdoc(7) and grammar changes:
Hiten Pandya [Thu, 8 Jul 2004 01:04:18 +0000 (01:04 +0000)]
A variety of mdoc(7) and grammar changes:

* use .Bl and .El directives when using a list
* use .Dv directive when appropriate
* use 'The' to start a sentence instead of the function name
* paragraph cleanups for return values
* use approrpriate directives to markup pointers and types
* use .Er directive for marking up errno(3) values
* eliminate hard sentence breaks
* use .Dv instead of .Va when documenting known constants
* eliminate empty lines
* spelling and grammar corrections
* eliminate incorrect use of the .Lb directive

While I am here, add a reference to the rfork(2) manual page
under the SEE ALSO section.

16 years agoUse the .Dv directive for marking up PROT_* constants.
Hiten Pandya [Thu, 8 Jul 2004 00:33:02 +0000 (00:33 +0000)]
Use the .Dv directive for marking up PROT_* constants.

16 years agoCorrect mdoc(7) errors:
Hiten Pandya [Thu, 8 Jul 2004 00:27:11 +0000 (00:27 +0000)]
Correct mdoc(7) errors:

* correct usage of the .Dx and .Fx macro
* remove redundant empty lines
* provide a matching .El macro when using .Bl

Submitted-by: Brad Harvell <dfbrad@whatzit.org>
16 years agoAdd a bunch of .Fx (FreeBSD) version numbers.
Hiten Pandya [Thu, 8 Jul 2004 00:20:54 +0000 (00:20 +0000)]
Add a bunch of .Fx (FreeBSD) version numbers.

Submitted-by: Brad Harvell <dfbrad@whatzit.org>
16 years agoBunch of mdoc(7) and various file path fixes.
Hiten Pandya [Thu, 8 Jul 2004 00:14:49 +0000 (00:14 +0000)]
Bunch of mdoc(7) and various file path fixes.

Submitted-by: Sascha Wildner <saw@online.de>
16 years agoFix a small but important mistake.
Hiten Pandya [Wed, 7 Jul 2004 23:11:33 +0000 (23:11 +0000)]
Fix a small but important mistake.

Noticed-by: Brad Harvel <dfbrad@whatzit.org>
16 years agoUse the official devised license for the first time, starting with
Hiten Pandya [Wed, 7 Jul 2004 18:11:56 +0000 (18:11 +0000)]
Use the official devised license for the first time, starting with
kern/kern_msfbuf.c.

It is a 3-clause license with the Copyright holder dedicated to:

``The DragonFly Project''

Discussed-with:  Matthew Dillon and Jeffrey Hsu

16 years agoRemove the advertising clause from this file.
Hiten Pandya [Wed, 7 Jul 2004 18:09:06 +0000 (18:09 +0000)]
Remove the advertising clause from this file.

I will settle with 3-clause license.

See the following URL for more information:
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Discussed-with:  Matthew Dillon <dillon@backplane.com>

16 years agowhereis will find a given application in various locations, including
Justin C. Sherrill [Wed, 7 Jul 2004 17:45:47 +0000 (17:45 +0000)]
whereis will find a given application in various locations, including
/usr/ports, but does not look in /usr/dfports.  With /usr/dfports checked,
whereis can be used to see if a given port has an override.

Approved-by: Matt Dillon <dillon@apollo.backplane.com>
16 years agoAdd per-device polling support.
Joerg Sonnenberger [Wed, 7 Jul 2004 15:46:00 +0000 (15:46 +0000)]
Add per-device polling support.

16 years agoWelcome BPF in the 21st century and remove all the pre-ANSI C, BSD < 1991
Joerg Sonnenberger [Wed, 7 Jul 2004 15:16:04 +0000 (15:16 +0000)]
Welcome BPF in the 21st century and remove all the pre-ANSI C, BSD < 1991
junk. Fix some small style(9) glitches and change some pointer comparisions
to use explicit NULL. Use ISO C protyps.

16 years agoANSIfy.
Jeroen Ruigrok/asmodai [Wed, 7 Jul 2004 12:26:51 +0000 (12:26 +0000)]
ANSIfy.

16 years agoSynchronise with NetBSD:
Jeroen Ruigrok/asmodai [Wed, 7 Jul 2004 12:24:01 +0000 (12:24 +0000)]
Synchronise with NetBSD:

Remove trailing whitespace,
remove extraneous newlines.

16 years agoSynchronise with NetBSD: ANSIfy.
Jeroen Ruigrok/asmodai [Wed, 7 Jul 2004 12:13:27 +0000 (12:13 +0000)]
Synchronise with NetBSD: ANSIfy.

16 years agoAdd re(4) to the list of manpages. Update the list of NICs supporting
Joerg Sonnenberger [Wed, 7 Jul 2004 11:38:59 +0000 (11:38 +0000)]
Add re(4) to the list of manpages. Update the list of NICs supporting
polling.

16 years agoAdd support for setting polling on a per-interface base.
Joerg Sonnenberger [Wed, 7 Jul 2004 10:01:15 +0000 (10:01 +0000)]
Add support for setting polling on a per-interface base.

16 years agoAdd re(4) as kernel module. After some feedback, this will be added to the
Joerg Sonnenberger [Wed, 7 Jul 2004 09:47:27 +0000 (09:47 +0000)]
Add re(4) as kernel module. After some feedback, this will be added to the
GENERIC.

Obtained-from: FreeBSD

16 years agoSynchronise with NetBSD: get rid of __STDC__ selective compilation.
Jeroen Ruigrok/asmodai [Wed, 7 Jul 2004 08:20:19 +0000 (08:20 +0000)]
Synchronise with NetBSD: get rid of __STDC__ selective compilation.
We assume we build using an ANSI C conforming compiler.

16 years agoAdd -S flag for C99 support.
Jeroen Ruigrok/asmodai [Wed, 7 Jul 2004 07:37:04 +0000 (07:37 +0000)]
Add -S flag for C99 support.

Taken from: NetBSD, Christos Zoulas

16 years agoIn ip_mport() (IP packet demux code), check the minimum length requirement
Matthew Dillon [Tue, 6 Jul 2004 19:26:39 +0000 (19:26 +0000)]
In ip_mport() (IP packet demux code), check the minimum length requirement
for an IP packet *before* the defrag case rather then after.  This avoids
a panic in ip_input.c where the length is already assumed to be reasonable.

Bug-report-by: Allan Fields <bsd@afields.ca>
In-consultation-with: Jeffrey Hsu <hsu@leaf.dragonflybsd.org>

16 years agoUnconditionally reset ATAPI-CD devices during boot. Brian's notes on this:
Matthew Dillon [Tue, 6 Jul 2004 19:06:16 +0000 (19:06 +0000)]
Unconditionally reset ATAPI-CD devices during boot.  Brian's notes on this:

    1. ATAPI devices come up in an inconsistent state sometimes.  Issuing
       an ATAPI reset seems to fix this completely; normally I would see,
       most of the time, these messages:
       acd0: MODE_SENSE_BIG trying to write on read buffer
       acd0: timeout waiting for ATAPI ready
       acd0: unknown transfer phase 0x1:0x50
       acd0: timeout waiting for ATAPI ready
       <lock-up or crash>

Taken-from: Brian Feldman <green@freebsd.org>
Suggested-by: Michel Talon
16 years agoBe more verbose when printing information on transfer phase errors.
Matthew Dillon [Tue, 6 Jul 2004 19:00:06 +0000 (19:00 +0000)]
Be more verbose when printing information on transfer phase errors.

Taken-from: Brian Feldman <green@freebsd.org>
Suggested-by: Michel Talon
16 years agoThe syscall number lives in ms_cmd.cm_op now.
Eirik Nygaard [Tue, 6 Jul 2004 15:32:05 +0000 (15:32 +0000)]
The syscall number lives in ms_cmd.cm_op now.

16 years agoAdd IFCAP_POLLING for per-interface polling support.
Joerg Sonnenberger [Tue, 6 Jul 2004 11:44:37 +0000 (11:44 +0000)]
Add IFCAP_POLLING for per-interface polling support.

Obtained-from: FreeBSD

16 years agoFix formatting error.
Eirik Nygaard [Tue, 6 Jul 2004 10:45:24 +0000 (10:45 +0000)]
Fix formatting error.

Reported by: asmodai
Submitted by: Brad Harvell <dfbrad@whatzit.org>

16 years agoGeneralize a comment, remove 'FreeBSD' from the comment because we are
Hiten Pandya [Tue, 6 Jul 2004 01:52:24 +0000 (01:52 +0000)]
Generalize a comment, remove 'FreeBSD' from the comment because we are
called something else.

16 years agoPlay catchup with libc.
Eirik Nygaard [Mon, 5 Jul 2004 17:31:02 +0000 (17:31 +0000)]
Play catchup with libc.

16 years agoDon't allow a step size of 0 (leading to an infinite loop). Have
Matthew Dillon [Mon, 5 Jul 2004 15:29:49 +0000 (15:29 +0000)]
Don't allow a step size of 0 (leading to an infinite loop).  Have
get_number() return an error if the parsed string is 0 length.

FreeBSD-PR: 68683
Obtained from: OpenBSD
Submitted-by: Xin LI <delphij@frontfree.net>
16 years agoInclude the header files from the current source tree and not from /usr/src.
Joerg Sonnenberger [Mon, 5 Jul 2004 15:18:35 +0000 (15:18 +0000)]
Include the header files from the current source tree and not from /usr/src.

16 years agoUpdate newvers.sh to RC2
Matthew Dillon [Mon, 5 Jul 2004 07:44:25 +0000 (07:44 +0000)]
Update newvers.sh to RC2

16 years agoMore optarg and declaration cleanups.
Matthew Dillon [Mon, 5 Jul 2004 05:37:51 +0000 (05:37 +0000)]
More optarg and declaration cleanups.

16 years agoFix a bug in the -i code where an existing interface might not be located.
Matthew Dillon [Mon, 5 Jul 2004 05:34:44 +0000 (05:34 +0000)]
Fix a bug in the -i code where an existing interface might not be located.
sdl_data is not nul terminated, sdl_nlen must be checked and strncmp used
rather then strcmp.

16 years agoCleanup conditionals on exit, remove unnecessary free()'s prior to error exit.
Matthew Dillon [Mon, 5 Jul 2004 05:32:15 +0000 (05:32 +0000)]
Cleanup conditionals on exit, remove unnecessary free()'s prior to error exit.

16 years agoacpica5 update part 3/3: Bring the usr.sbin/acpi tools into the base system
Matthew Dillon [Mon, 5 Jul 2004 00:22:43 +0000 (00:22 +0000)]
acpica5 update part 3/3:  Bring the usr.sbin/acpi tools into the base system
and integrate it into the build.

Submitted-by: YONETANI Tomokazu <qhwt+dragonfly-submit@les.ath.cx>
16 years agoacpica5 update part 2/3: Fix a bug introduced in the original acpica5
Matthew Dillon [Mon, 5 Jul 2004 00:14:01 +0000 (00:14 +0000)]
acpica5 update part 2/3:  Fix a bug introduced in the original acpica5
port from FreeBSD-5.  FreeBSD-5 no longer uses a VM object for the
page table but we still do.  This fixes a panic that occurs when waking up
from a sleep mode.

Submitted-by: YONETANI Tomokazu <qhwt+dragonfly-submit@les.ath.cx>
16 years agoacpica5 update part 1/3: Implement support for acpica-unix-20040527.
Matthew Dillon [Mon, 5 Jul 2004 00:07:35 +0000 (00:07 +0000)]
acpica5 update part 1/3:  Implement support for acpica-unix-20040527.

Submitted-by: YONETANI Tomokazu <qhwt+dragonfly-submit@les.ath.cx>
16 years agoBring in acpica-20040527 from intel. See: http://developer.intel.com/technology...
Matthew Dillon [Sun, 4 Jul 2004 23:47:15 +0000 (23:47 +0000)]
Bring in acpica-20040527 from intel.  See: developer.intel.com/technology/iapc/acpi/downloads/acpica-unix-20040527.tar.gz

16 years agominor cleanups / no functional changes.
Matthew Dillon [Sun, 4 Jul 2004 23:28:31 +0000 (23:28 +0000)]
minor cleanups / no functional changes.

16 years agoAdd ETHER_ALIGN for portability.
Joerg Sonnenberger [Sun, 4 Jul 2004 23:15:48 +0000 (23:15 +0000)]
Add ETHER_ALIGN for portability.

Obtained-from: FreeBSD

16 years agoRearrange the machine/cpufunc.h header and add it where needed to make libcaps
Eirik Nygaard [Sun, 4 Jul 2004 22:44:27 +0000 (22:44 +0000)]
Rearrange the machine/cpufunc.h header and add it where needed to make libcaps
build again.

16 years agoChange machien to machine.
Eirik Nygaard [Sun, 4 Jul 2004 17:21:15 +0000 (17:21 +0000)]
Change machien to machine.

Reported by: Steve Mynott <steve.mynott@gmail.com>

16 years agoSpeed up hardlink detection by using a self-sizing hash table rather than the
Eirik Nygaard [Sun, 4 Jul 2004 10:34:47 +0000 (10:34 +0000)]
Speed up hardlink detection by using a self-sizing hash table rather than the
old linear list search.

Submitted by: Ulf Lilleengen <lulf@kerneled.org>
Obtained from: FreeBSD

16 years ago-{h,k} are mutually exclisive. So only pay attention to the last of the two
Eirik Nygaard [Sun, 4 Jul 2004 10:28:38 +0000 (10:28 +0000)]
-{h,k} are mutually exclisive.  So only pay attention to the last of the two
when both are given.

Submitted by: Ulf Lilleengen <lulf@kerneled.org>
Obtained from: FreeBSD

16 years agoGet rid of some debugging printf's that had been accidently committed.
Matthew Dillon [Sun, 4 Jul 2004 05:19:53 +0000 (05:19 +0000)]
Get rid of some debugging printf's that had been accidently committed.

16 years agoWhen booting from CD, check cd1a and acd1a after cd0a and acd0a, allowing
Matthew Dillon [Sun, 4 Jul 2004 05:16:32 +0000 (05:16 +0000)]
When booting from CD, check cd1a and acd1a after cd0a and acd0a, allowing
a CD to be booted off of a second CDRom drive.

When checking for the same rootdev selection as already has been set,
only the major number of the existing rootdev was being checked.  This
prevent other unit numbers from being tried properly (e.g. trying cd1 after
having already tried cd0).

Completely parse the rootdev's (unit, slice, partition) tuple before
trying to look up the device, rather then assuming that devname(0,0,0)
will exist (this is no longer necessarily true).

16 years agoAdd AGP support for the i852GM, i855GM, and i865G.
Matthew Dillon [Sun, 4 Jul 2004 00:24:52 +0000 (00:24 +0000)]
Add AGP support for the i852GM, i855GM, and i865G.
Add AGP support for a number of new SiS bridges (530-760).
Add AGP support for teh VIA 8385.

Remove some aperture cleanups.

Taken-From: FreeBSD-5

16 years agoMake sure a serial port exists by determining whether it is possible to drain
Matthew Dillon [Sat, 3 Jul 2004 21:23:37 +0000 (21:23 +0000)]
Make sure a serial port exists by determining whether it is possible to drain
its RX queue, before we turn on its interrupt or do other things.  If we can't
then the serial port is disabled.

This fixes drain lockups on laptops and newer desktops that occur when a
non-existant serial port is opened and allows us to ship a CD with a getty
on ttyd0 without locking up the system.

16 years agoAdd an explanation for the use of CCVER in /etc/make.conf, and recommend
Matthew Dillon [Sat, 3 Jul 2004 17:16:21 +0000 (17:16 +0000)]
Add an explanation for the use of CCVER in /etc/make.conf, and recommend
that it not yet be used in that file.

Suggested-by: "Erik P. Skaalerud" <erik@pentadon.com>
16 years agoAdd common functions for computing the Ethernet CRC on arbitrary length
Joerg Sonnenberger [Sat, 3 Jul 2004 13:10:10 +0000 (13:10 +0000)]
Add common functions for computing the Ethernet CRC on arbitrary length
buffers. ether_crc32_le() is available as table-driven version, which is
faster.

Obtained-from: NetBSD

16 years agoSome laptops return other values for working toucpads. Allow test_aux_port to
Eirik Nygaard [Fri, 2 Jul 2004 18:59:01 +0000 (18:59 +0000)]
Some laptops return other values for working toucpads. Allow test_aux_port to
return 2 and 3. This fixes the touchpads for some Acer and Compal laptops.

Submitted by: Ulf Lilleengen <lulf@kerneled.org>
Based on FreeBSD PR: kern/54188

16 years agoAnnounce MAC address in ether_ifattach, not in each NIC indepently.
Joerg Sonnenberger [Fri, 2 Jul 2004 17:42:21 +0000 (17:42 +0000)]
Announce MAC address in ether_ifattach, not in each NIC indepently.

aue(4), axe(4), cue(4), kue(4), pcn(4):
- Don't bcopy the MAC address, ether_ifattach does it.
lnc(4):
- sc->arpcom.ac_if ==> ifp in lnc_attach_common, more changes coming.
awi(4):
- Nuke local copy of ether_sprintf, use %6D directly.
- Use if_printf instead of printf("%s: ...", sc->sc_dev.dv_xname, ...).

16 years agoRandomize ephermal source ports.
Hiten Pandya [Fri, 2 Jul 2004 16:45:22 +0000 (16:45 +0000)]
Randomize ephermal source ports.

This option is controlled by the net.inet.ip.portrange.randomized sysctl
and it is enabled by default.

Obtained-from:   FreeBSD

16 years agoAdd the support for BSD format specifiers. This was adopted from the
Joerg Sonnenberger [Fri, 2 Jul 2004 16:42:19 +0000 (16:42 +0000)]
Add the support for BSD format specifiers. This was adopted from the
GCC 3.3 version with the addition of %z.

16 years agoRemove invalid tokens after #endif
Joerg Sonnenberger [Fri, 2 Jul 2004 15:53:01 +0000 (15:53 +0000)]
Remove invalid tokens after #endif

16 years agoAdd a default initializer for data_sds. The warning from GCC is not correct,
Joerg Sonnenberger [Fri, 2 Jul 2004 15:47:56 +0000 (15:47 +0000)]
Add a default initializer for data_sds. The warning from GCC is not correct,
the value is correctly initialized. The value of 0 should minimize the
impact for future changes, where this might not hold true.

16 years agoRemove invalid tokens after #endif
Joerg Sonnenberger [Fri, 2 Jul 2004 15:43:10 +0000 (15:43 +0000)]
Remove invalid tokens after #endif

16 years agoUse const char * for string argument of _assert_sbuf_integrity and _assert_sbuf_state
Joerg Sonnenberger [Fri, 2 Jul 2004 15:37:07 +0000 (15:37 +0000)]
Use const char * for string argument of _assert_sbuf_integrity and _assert_sbuf_state

16 years agoRemove cast as lvalue
Joerg Sonnenberger [Fri, 2 Jul 2004 15:31:17 +0000 (15:31 +0000)]
Remove cast as lvalue

16 years agoRemove cast as lvalue
Joerg Sonnenberger [Fri, 2 Jul 2004 15:26:26 +0000 (15:26 +0000)]
Remove cast as lvalue

16 years agoprocfs_validfile does have a public prototyp, but doesn't seemed to be used.
Joerg Sonnenberger [Fri, 2 Jul 2004 15:23:21 +0000 (15:23 +0000)]
procfs_validfile does have a public prototyp, but doesn't seemed to be used.
Remove the static to nuke the warning, something outside our tree might refer
to this and the size doesn't really matter.

16 years agoUpdate some of my copyright notices before we officially publish
Jeffrey Hsu [Fri, 2 Jul 2004 04:41:01 +0000 (04:41 +0000)]
Update some of my copyright notices before we officially publish
DragonFlyBSD in Release 1.0.

16 years agoUpdate our xlint(1) to work with recent preprocessor changes.
Hiten Pandya [Thu, 1 Jul 2004 01:31:45 +0000 (01:31 +0000)]
Update our xlint(1) to work with recent preprocessor changes.

This should get lint(1) working again.

16 years agoMake sure the xe driver found a supported card type, if it didn't then bail
Eirik Nygaard [Wed, 30 Jun 2004 12:14:39 +0000 (12:14 +0000)]
Make sure the xe driver found a supported card type, if it didn't then bail
out.

Okayed by: joerg

16 years agoFix a snafu in the last commit. In the normal non-polling case interrupts
Matthew Dillon [Tue, 29 Jun 2004 00:45:15 +0000 (00:45 +0000)]
Fix a snafu in the last commit.  In the normal non-polling case interrupts
were not being reenabled at the end of the service routine, breaking the
driver.

Reported-by: walt <wa1ter@myrealbox.com>, Richard Nyberg <rnyberg@it.su.se>
16 years agoChange the version string to RC1
Matthew Dillon [Mon, 28 Jun 2004 06:20:50 +0000 (06:20 +0000)]
Change the version string to RC1

16 years agoUndo one of the recent optimizations I made (only running the handlers
Matthew Dillon [Mon, 28 Jun 2004 05:02:56 +0000 (05:02 +0000)]
Undo one of the recent optimizations I made (only running the handlers
if the irunning bit is set).  Something is not working as intended and
this is leading to timeouts.

16 years agoUpdate the README file with useful information about ACPI.
Matthew Dillon [Mon, 28 Jun 2004 04:18:55 +0000 (04:18 +0000)]
Update the README file with useful information about ACPI.

16 years agoUpdate some copyright notices to become more legal compliant.
David Rhodus [Mon, 28 Jun 2004 02:57:11 +0000 (02:57 +0000)]
Update some copyright notices to become more legal compliant.

Noted by : joerg
Change ok from : dillon, hmp

16 years agoSync in Copyright notice change from FreeBSD.
David Rhodus [Mon, 28 Jun 2004 02:49:06 +0000 (02:49 +0000)]
Sync in Copyright notice change from FreeBSD.

16 years agoIncrease PCCARD_CIS_SIZE from 1024 to 4096 as per FreeBSD-5. Add range
Matthew Dillon [Mon, 28 Jun 2004 02:34:44 +0000 (02:34 +0000)]
Increase PCCARD_CIS_SIZE from 1024 to 4096 as per FreeBSD-5.  Add range
checking to all offsets (fixes a panic on my laptop when I stick in my
ED ether cardbus card, which it doesn't recognize).

16 years agoFix three bugs in the livelock code. Fix a minor range error in an
Matthew Dillon [Mon, 28 Jun 2004 02:33:04 +0000 (02:33 +0000)]
Fix three bugs in the livelock code.  Fix a minor range error in an
assertion, fix an incorrect livelock wakeup argument type (which could lead
to crashes), and use the cpu timer instead of ticks since a livelock may
prevent ticks from incrementing.

For now set the livelock limit to 50,000 interrupts/sec, which is about
right for a ~600Mhz P3.  But what we really need to do is scale it based
on the perceived speed of the system since GiGE is likely able to blow
away 50KI/S.

Tested with: inserting and removing cardbus cards quickly and repeatedly,
which normally locks up a FreeBSD box.

16 years agoThe acpica-unix-20040527 download from intel seems to like to use upper
Matthew Dillon [Sun, 27 Jun 2004 22:08:57 +0000 (22:08 +0000)]
The acpica-unix-20040527 download from intel seems to like to use upper
case directory names.  Just add them to the path so we don't have to worry
about it later.

16 years agoTurn the getty on on ttyd0 by default so a CDBOOT will run all the way through
Matthew Dillon [Sun, 27 Jun 2004 21:39:04 +0000 (21:39 +0000)]
Turn the getty on on ttyd0 by default so a CDBOOT will run all the way through
to a prompt on com1.  It is far more common for the serial port to be connected
to a serial console, or not connected at all, then for it to be connected to
a UPS or a MODEM, especially when one is using the CD.

16 years agoAddendum: it should be noted that boot2 also probes for a valid serial
Matthew Dillon [Sun, 27 Jun 2004 21:27:36 +0000 (21:27 +0000)]
Addendum: it should be noted that boot2 also probes for a valid serial
port and will tell the loader not to use it, but the loader is directly
run from cdboot and (I think) pxeboot and does not have that benefit in
those situations, so we have to check again.

16 years agoProperly probe for the serial port. If the serial port is unmapped or
Matthew Dillon [Sun, 27 Jun 2004 21:26:40 +0000 (21:26 +0000)]
Properly probe for the serial port.  If the serial port is unmapped or
we can't clear the LSR_RXRDY bit by draining the data port then attempting
to use the serial port will result in an input loop lockup.

16 years agoThe schednetisr() routine is supposed to be MP and interrupt safe, but wasn't
Matthew Dillon [Sun, 27 Jun 2004 19:40:14 +0000 (19:40 +0000)]
The schednetisr() routine is supposed to be MP and interrupt safe, but wasn't
because it allocated its messages.  Instead of allocating a message use a
fixed message in the netisr structure.

Get rid of #ifdef SMP/#error.  DEVICE_POLLING now works on SMP builds.

Implement an emergency polling enable function to try to keep the system
operational in a degraded state if interrupt routing is blown.  NOTE: only
vr0 uses the feature at the moment, and DEVICE_POLLING must be enabled.