dragonfly.git
16 years agoFix linker issues with /usr/libexec/elf/ld not using rtld's search path
Joerg Sonnenberger [Thu, 15 Jan 2004 11:59:27 +0000 (11:59 +0000)]
Fix linker issues with /usr/libexec/elf/ld not using rtld's search path

16 years agoSync pci_cfgreg.c with FreeBSD 5, rev. 1.101. This makes the PCI interrupt
Joerg Sonnenberger [Thu, 15 Jan 2004 08:05:41 +0000 (08:05 +0000)]
Sync pci_cfgreg.c with FreeBSD 5, rev. 1.101. This makes the PCI interrupt
routing code more robust. Also copied pci_cfgreg.h into bus/pci/i386, the
other instance in machine/pci_cfgreg.h will go later.

16 years agonpx_intr() expects an interrupt frame but was given something inbetween an
Matthew Dillon [Thu, 15 Jan 2004 00:03:08 +0000 (00:03 +0000)]
npx_intr() expects an interrupt frame but was given something inbetween an
interrupt frame and a trap frame, causing a panic.  Save/restore %ebx
(the CPL) just like the other entry points in this file do, push the
two 32 bit words required to convert the trap frame into an interrupt
frame, and clean up the frame on return for the jump to doreti.

Reported-by: David Rhodus <drhodus@catpa.com>
16 years agoCleanup the vm_map_entry_[k]reserve/[k]release() API. This API is used to
Matthew Dillon [Wed, 14 Jan 2004 23:26:14 +0000 (23:26 +0000)]
Cleanup the vm_map_entry_[k]reserve/[k]release() API.  This API is used to
guarentee that sufficient vm_map_entry structures are available for certain
atomci VM operations.

The kreserve/krelease API is only supposed to be used to dig into the kernel
reserve, used when zalloc() must recurse into kmem_alloc() in order to
allocate a new page.  Without this we can get into a kmem_alloc -> zalloc ->
kmem_alloc deadlock.

kreserve/krelease was being used improperly in my original work, causing it
to be unable to guarentee the reserve and resulting in an occassional panic.
This commit converts the improper usage back to using the non-k version of
the API and (should) properly handle the zalloc() recursion case.

Reported-by: David Rhodus <drhodus@catpa.com>
16 years agoDrop chip driver and merge the functionality into pci_probe_nomatch.
Joerg Sonnenberger [Wed, 14 Jan 2004 18:20:19 +0000 (18:20 +0000)]
Drop chip driver and merge the functionality into pci_probe_nomatch.
Adjust return value of pcib_probe to -1000 for conformance to other
default matches. Do some general cleanup.

16 years agoFix indentation to tabs, no functional changes
Joerg Sonnenberger [Wed, 14 Jan 2004 18:03:05 +0000 (18:03 +0000)]
Fix indentation to tabs, no functional changes

16 years agoAdd black hole device for system PnP IDs
Joerg Sonnenberger [Wed, 14 Jan 2004 07:16:37 +0000 (07:16 +0000)]
Add black hole device for system PnP IDs

16 years agoMake hw.firewire.sbp.tags tunable
Joerg Sonnenberger [Wed, 14 Jan 2004 07:13:27 +0000 (07:13 +0000)]
Make hw.firewire.sbp.tags tunable

16 years agoAdd a missing thread pointer to a busdma call that needs it.
Matthew Dillon [Wed, 14 Jan 2004 05:30:57 +0000 (05:30 +0000)]
Add a missing thread pointer to a busdma call that needs it.

Reported-by: David Rhodus <drhodus@machdep.com>
16 years ago* Use id(1) instead of grep(1) to detect the presence of the smmsp
David Rhodus [Wed, 14 Jan 2004 03:55:36 +0000 (03:55 +0000)]
* Use id(1) instead of grep(1) to detect the presence of the smmsp
user/group. This fixes the check for users with smmsp in NIS
instead of their local files.

Idea taken from FreeBSD

16 years agoAdd rman_get_device and rman_get_size, use macros in nexus.c
Joerg Sonnenberger [Tue, 13 Jan 2004 18:45:37 +0000 (18:45 +0000)]
Add rman_get_device and rman_get_size, use macros in nexus.c

16 years agoAdd PCIBUS to nexus
Joerg Sonnenberger [Tue, 13 Jan 2004 18:31:58 +0000 (18:31 +0000)]
Add PCIBUS to nexus

16 years agoAdd hw.firewire.sbp.tags to control tagging for SBP devices. The default
Joerg Sonnenberger [Tue, 13 Jan 2004 17:32:12 +0000 (17:32 +0000)]
Add hw.firewire.sbp.tags to control tagging for SBP devices. The default
behaviour was changed to disable tagged command queues, which is safer since
not all firewire chips support TCQ.

16 years agoANSIfy procedure arguments.
Matthew Dillon [Tue, 13 Jan 2004 08:22:12 +0000 (08:22 +0000)]
ANSIfy procedure arguments.

16 years ago* Perform some man page maintenance bringing the miibus related
David Rhodus [Tue, 13 Jan 2004 01:48:59 +0000 (01:48 +0000)]
* Perform some man page maintenance bringing the miibus related
pages up to date with current usage

* Minor cleanup applied to kue.4 while here.

Sent in by: Christian Brueffer <chris@unixpages.org>

16 years ago* Update so as to reflect structure name changes to upcall.h
David Rhodus [Mon, 12 Jan 2004 16:48:37 +0000 (16:48 +0000)]
* Update so as to reflect structure name changes to upcall.h

16 years agoMinor corrections to the documentation.
Matthew Dillon [Mon, 12 Jan 2004 06:54:09 +0000 (06:54 +0000)]
Minor corrections to the documentation.

Submitted-by: Miguel Mendez <flynn@energyhq.es.eu.org>
16 years agoSplit off the PCCARD specific driver parts of fd and sio and remove last
Joerg Sonnenberger [Sun, 11 Jan 2004 16:45:17 +0000 (16:45 +0000)]
Split off the PCCARD specific driver parts of fd and sio and remove last
uses of NCARD and use_card.h. The header will go with the NEWCARD merge.

16 years agoArg3 to kern_fcntl was incorrectly passed as NULL, causing
Matthew Dillon [Fri, 9 Jan 2004 21:49:30 +0000 (21:49 +0000)]
Arg3 to kern_fcntl was incorrectly passed as NULL, causing
a panic.

Submitted-by: Andrew Atrens <atrens@nortelnetworks.com>
16 years ago* Remove HTT option from kernel config files.
David Rhodus [Fri, 9 Jan 2004 20:52:05 +0000 (20:52 +0000)]
* Remove HTT option from kernel config files.

16 years ago* Remove the HTT option from the kernel as we can now
David Rhodus [Fri, 9 Jan 2004 20:49:39 +0000 (20:49 +0000)]
*       Remove the HTT option from the kernel as we can now
pickup the BIOS option if you want to use the logical
cores.

You will still need to compile your kernel with
options        SMP
options        APIC_IO

Because the logical cpu's for the most part still act
like extra processors even though this is not true.

The idea is taken from JHB's changes in FreeBSD but without
the idle loop changes so as not to get the "Hyerthreading
slowdown" affect FreeBSD seems to have with HTT.

16 years ago* Don't install the freefall gnats files into /etc as
David Rhodus [Fri, 9 Jan 2004 20:25:13 +0000 (20:25 +0000)]
* Don't install the freefall gnats files into /etc as
they are useless.

16 years ago* Add usb_mem.c back into the build process so the usb module
David Rhodus [Fri, 9 Jan 2004 16:46:42 +0000 (16:46 +0000)]
* Add usb_mem.c back into the build process so the usb module
doesn't have undefined symbols.

Sent in by: YONETANI Tomokazu <qhwt+dragonfly-commits@les.ath.cx>

16 years agoSynchronise partially with NetBSD's v1.85:
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 19:00:26 +0000 (19:00 +0000)]
Synchronise partially with NetBSD's v1.85:

update location of documentation

16 years agoSynchronise partially with NetBSD's umodem.c v1.46:
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 18:56:20 +0000 (18:56 +0000)]
Synchronise partially with NetBSD's umodem.c v1.46:

update the URLs for the documentation.

16 years agoSpell 'weird' the way English expects it.
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 18:48:07 +0000 (18:48 +0000)]
Spell 'weird' the way English expects it.

16 years agoSpell 'separate' and its siblings the way it is supposed to.
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 18:39:19 +0000 (18:39 +0000)]
Spell 'separate' and its siblings the way it is supposed to.

16 years agoGet rid of PZERO. This was removed about the first of August.
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 18:12:59 +0000 (18:12 +0000)]
Get rid of PZERO.  This was removed about the first of August.
It probably compiled due to the preprocessor defining code out.

16 years agoMake sure the vendor identifier matches the right project. The binutils
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 17:22:33 +0000 (17:22 +0000)]
Make sure the vendor identifier matches the right project.  The binutils
folks want this.

16 years ago* Merge in the copyright that DragonFly is being distributed under.
David Rhodus [Thu, 8 Jan 2004 17:10:08 +0000 (17:10 +0000)]
* Merge in the copyright that DragonFly is being distributed under.

Idea taken from FreeBSD.

16 years agoMake sure we identify our toolchain as DragonFly, not FreeBSD. This is
Jeroen Ruigrok/asmodai [Thu, 8 Jan 2004 13:22:58 +0000 (13:22 +0000)]
Make sure we identify our toolchain as DragonFly, not FreeBSD.  This is
required by the GCC and binutils folks.

16 years agoAdd card_if.h dependency
Joerg Sonnenberger [Thu, 8 Jan 2004 10:19:48 +0000 (10:19 +0000)]
Add card_if.h dependency

16 years agoAdd/uncondionalize the sixt argument of set_memory_offset to ease the migration
Joerg Sonnenberger [Thu, 8 Jan 2004 10:06:29 +0000 (10:06 +0000)]
Add/uncondionalize the sixt argument of set_memory_offset to ease the migration
to the FreeBSD-5 cardbus framework.

16 years agoMake the phase synchronization of the hz clock interrupt (I8254 timer0)
Matthew Dillon [Thu, 8 Jan 2004 08:11:12 +0000 (08:11 +0000)]
Make the phase synchronization of the hz clock interrupt (I8254 timer0)
to the timecounter more generic.  This will work with all time counters
as long as the 8254's crystal isn't to terribly off, but it could take a
few minutes for the computer to lock the phase after boot.  I'm being
conservative here and do not want to skew the clock interrupt too much.

Tested by: Paul Herman <pherman@frenchfries.net>

16 years agoAdd necessary critical sections to microtime() and nanotime().
Matthew Dillon [Wed, 7 Jan 2004 20:21:46 +0000 (20:21 +0000)]
Add necessary critical sections to microtime() and nanotime().

16 years agoFix a bug introduced in the last commit. When calculating the delta count
Matthew Dillon [Wed, 7 Jan 2004 20:21:20 +0000 (20:21 +0000)]
Fix a bug introduced in the last commit.  When calculating the delta count
from the 8254 we have to use timer0_max_count + 1 instead of timer0_max_count
because our frequency correction may load timer0_max_count + 1.

Implement clkintr_pending in the FAST_INTR path as well as the normal INTR
path.

16 years agoMove the FreeBSD 2.2 and 3.x PCI compatibility code into pci_compat.c and let it
Joerg Sonnenberger [Wed, 7 Jan 2004 18:13:19 +0000 (18:13 +0000)]
Move the FreeBSD 2.2 and 3.x PCI compatibility code into pci_compat.c and let it
depend on COMPAT_OLDPCI. Adjust LINT to accordingly.

16 years agonote last commit based on evidence supplied by: Paul Herman <pherman@frenchfries...
Matthew Dillon [Wed, 7 Jan 2004 11:08:06 +0000 (11:08 +0000)]
note last commit based on evidence supplied by: Paul Herman <pherman@frenchfries.net>

16 years agotvtohz() was originally designed for tsleep() and timeout() operations but
Matthew Dillon [Wed, 7 Jan 2004 11:07:04 +0000 (11:07 +0000)]
tvtohz() was originally designed for tsleep() and timeout() operations but
it is also used to time nanosleep() ops.  The problem is that in order to
compensate for the fact that a clock interrupt might occur just after a
thread blocks or registers a timeout, this function effectively added +1
to the returned value plus added another +1 for timeouts that were not
integer multiples if the clock interrupt frequency.

Split tvtohz() into two routines: tvtohz_low() and tvtohz_high().
tvtohz_low() does not do any compensation, tvtohz_high() does.

Add the kern.sleep_hardloop sysctl, which defaults to 0 (off).  If set to
1 this will cause nanosleep() to attempt to time exactly the requested
interval (which could cost more cpu) rather then rounding it off to a
multiple of hz.  If set to 2 nanosleep() will only do the more rigid
timing for requests less then 1 second.   Also change the normal hz-baesd
case to only compensate by +1, not +2, in order to improve accuracy.

16 years agoCompensate for the frequency error that occurs at higher 'hz' settings.
Matthew Dillon [Wed, 7 Jan 2004 10:59:09 +0000 (10:59 +0000)]
Compensate for the frequency error that occurs at higher 'hz' settings.
e.g. by default at 100hz the 8254 running at 1193182Hz needs
a count load of 11931.82, but we can only load integer values so the
clock interrupt winds up being slightly slower or faster then 100hz.
This will fix phase creep in things like nanosleep().

The problem is solved by keeping track of the fractional error and
adjusting the counter load register for the following interrupt.

Report-by: Paul Herman <pherman@frenchfries.net>
16 years ago*** empty log message ***
Matthew Dillon [Wed, 7 Jan 2004 10:54:57 +0000 (10:54 +0000)]
*** empty log message ***

16 years agobktr depends on bktr_mem. Add a KMODDEPS line.
Matthew Dillon [Wed, 7 Jan 2004 03:15:01 +0000 (03:15 +0000)]
bktr depends on bktr_mem.  Add a KMODDEPS line.

Reported-by: Adam K Kirchhoff <adamk@voicenet.com>
16 years ago * Nuke calendar.freebsd
Eirik Nygaard [Tue, 6 Jan 2004 20:26:38 +0000 (20:26 +0000)]
 * Nuke calendar.freebsd

16 years agoAdd PCI identifier to match against a Dell OEM version of the SB Live!
Jeroen Ruigrok/asmodai [Tue, 6 Jan 2004 16:31:55 +0000 (16:31 +0000)]
Add PCI identifier to match against a Dell OEM version of the SB Live!

16 years agoAdd support for SoundBlaster Audigy and Audigy 2.
Jeroen Ruigrok/asmodai [Tue, 6 Jan 2004 16:07:41 +0000 (16:07 +0000)]
Add support for SoundBlaster Audigy and Audigy 2.

Based on patches by Orlando Bassotto, which were taken from the ALSA Project
and the SoundBlaster OSS repository.

16 years ago * Add devname_r(3) function, which takes a buffer and buffer length as
Eirik Nygaard [Tue, 6 Jan 2004 15:38:09 +0000 (15:38 +0000)]
 * Add devname_r(3) function, which takes a buffer and buffer length as
   arguments.

16 years ago * Default to a calendar file that actually exists (calendar.all)
Eirik Nygaard [Tue, 6 Jan 2004 15:29:09 +0000 (15:29 +0000)]
 * Default to a calendar file that actually exists (calendar.all)

16 years agoSynch up with FreeBSD 5 with clean up changes.
Jeroen Ruigrok/asmodai [Tue, 6 Jan 2004 08:35:42 +0000 (08:35 +0000)]
Synch up with FreeBSD 5 with clean up changes.
-h option added (for help)
Relative volume values are now also supported.

Submitted by: Craig Dooley <craig@xlnx-x.net>

16 years agoAdd the -r option to set the hostname based on a reverse lookup of an IP
Matthew Dillon [Tue, 6 Jan 2004 08:29:34 +0000 (08:29 +0000)]
Add the -r option to set the hostname based on a reverse lookup of an IP
address, the -i option to set the hostname based on a reverse lookup of
an interface's primary IP address, and -6 and -4 to select an interface's
IPV4 or IPV6 address to run the reverse on.

Submitted-by: Kent Ibbetson <bsd@kibbet.com>
16 years agoif_xname support Part 2b/2: Convert remaining netif devices and implement full
Matthew Dillon [Tue, 6 Jan 2004 03:21:18 +0000 (03:21 +0000)]
if_xname support Part 2b/2: Convert remaining netif devices and implement full
support for if_xname.  Restructure struct ifnet in net/if_var.h, pulling in
a few minor additional changes from current including making if_dunit an int,
and making if_flags an int.

Submitted-by: Max Laier <max@love2party.net>
16 years agoif_xname support Part 2/2: Convert remaining netif devices and implement full
Matthew Dillon [Tue, 6 Jan 2004 03:17:28 +0000 (03:17 +0000)]
if_xname support Part 2/2: Convert remaining netif devices and implement full
support for if_xname.  Restructure struct ifnet in net/if_var.h, pulling in
a few minor additional changes from current including making if_dunit an int,
and making if_flags an int.

Submitted-by: Max Laier <max@love2party.net>
16 years agoif_xname support Part 1/2: Convert most of the netif devices to use
Matthew Dillon [Tue, 6 Jan 2004 01:40:51 +0000 (01:40 +0000)]
if_xname support Part 1/2: Convert most of the netif devices to use
if_initname().

Submitted-by: Max Laier <max@love2party.net>
16 years agoMaintain the fnmatch() API from FreeBSD-5 using an inline, rename the
Matthew Dillon [Tue, 6 Jan 2004 01:05:52 +0000 (01:05 +0000)]
Maintain the fnmatch() API from FreeBSD-5 using an inline, rename the
core fnmatch procedure to _fnmatch, and add a nesting count to it to avoid
stack overflows.  Also cleanup the syntax (mainly add braces and ansification).

16 years agoImport the libkern/fnmatch code from FreeBSD-5.
Matthew Dillon [Tue, 6 Jan 2004 00:56:49 +0000 (00:56 +0000)]
Import the libkern/fnmatch code from FreeBSD-5.

Submitted-by: Max Laier <max@love2party.net>
16 years agoWhen you attempt to kldload snd_sb16 and then unload it, the system crashes.
Matthew Dillon [Mon, 5 Jan 2004 20:23:53 +0000 (20:23 +0000)]
When you attempt to kldload snd_sb16 and then unload it, the system crashes.

the problem turns out to be in snd_pcm.  snd_sbc needs a dependancy on
snd_pcm.  Without it, if you load a module that depends on both snd_sbc and
snd_pcm (like snd_sb16), then later try to unload it, the system may
unload snd_pcm before snd_sbc causing a panic.

Reported-by: Galen Sampson <galen_sampson@yahoo.com>, esmith <esmith@patmedia.net>
16 years ago* Merge in changes from FreeBSD with some modification
David Rhodus [Mon, 5 Jan 2004 17:40:00 +0000 (17:40 +0000)]
* Merge in changes from FreeBSD with some modification
by drhodus.

date: 2003/12/02 07:57:20;  author: ps;  state: Exp;
After extensive QA cycles at 3ware, bring the driver in-line with all the
issues which they found and asked to be changed so 3ware can offcially
support the driver.

Summary of the most significant changes:

- TWE_OVERRIDE is no longer supported
- If twe_getparam failed, bogus data would be returned to the caller
- Cache the device unit in the twe_drive structure to aid debugging
- Add the 3ware driver version.
- Proper return error codes for many functions.
- Track the minimum queue length statistics
- 4.x compat: use the cached unit number from the twe_drive structure
  instead of the the cached si_drv2.  3ware found that after many loads
   and unloads that si_drv2 became corrupted.  This did not happen in
   -current.

16 years ago* Add in some basic parameter values that we will use for
David Rhodus [Mon, 5 Jan 2004 17:36:20 +0000 (17:36 +0000)]
* Add in some basic parameter values that we will use for
synchronization of the device drivers.

16 years agoReplace the boring beastie with a dragonfly.
Jeroen Ruigrok/asmodai [Mon, 5 Jan 2004 16:34:52 +0000 (16:34 +0000)]
Replace the boring beastie with a dragonfly.

Submitted by: Aaron Malone <aaron@munge.net>

16 years agoAdd entry for the EHCI controller, pretty common these days (especially
Jeroen Ruigrok/asmodai [Mon, 5 Jan 2004 14:07:31 +0000 (14:07 +0000)]
Add entry for the EHCI controller, pretty common these days (especially
if you care about USB 2.0).

16 years agoRemove proc related extern's from sys/proc.h that are now static's inside
Matthew Dillon [Sun, 4 Jan 2004 22:14:39 +0000 (22:14 +0000)]
Remove proc related extern's from sys/proc.h that are now static's inside
kern_switch.c

Submitted-by: Peter Kadau <peter.kadau@tuebingen.mpg.de>
16 years ago * Remove the historical r in front of the old raw character devices in /dev
Eirik Nygaard [Sun, 4 Jan 2004 20:33:44 +0000 (20:33 +0000)]
 * Remove the historical r in front of the old raw character devices in /dev

Rerun `MAKEDEV all` in /dev after you have installed the new MAEKDEV script
to remove the old r* devices.

16 years ago * Remove the use of the kern.devname sysctl since it does not exist.
Eirik Nygaard [Sun, 4 Jan 2004 20:20:16 +0000 (20:20 +0000)]
 * Remove the use of the kern.devname sysctl since it does not exist.
 * K&R function removal

16 years ago * K&R function removal
Eirik Nygaard [Fri, 2 Jan 2004 18:19:49 +0000 (18:19 +0000)]
 * K&R function removal

16 years ago* Welcome the DragonFly project into to new year by bumping
David Rhodus [Thu, 1 Jan 2004 18:31:09 +0000 (18:31 +0000)]
* Welcome the DragonFly project into to new year by bumping
up the copyright year.

16 years agoFix a bug: remove an extra crit_enter() in the default waitport/waitmsg
Matthew Dillon [Thu, 1 Jan 2004 00:32:34 +0000 (00:32 +0000)]
Fix a bug: remove an extra crit_enter() in the default waitport/waitmsg
function.

16 years agoRearrange an INVARIANTS overflow test so it works with more immediacy.
Matthew Dillon [Thu, 1 Jan 2004 00:31:46 +0000 (00:31 +0000)]
Rearrange an INVARIANTS overflow test so it works with more immediacy.

16 years agoGet EHCI to compile. This will make USB2.0 work when 'device ehci' is
Matthew Dillon [Thu, 1 Jan 2004 00:29:25 +0000 (00:29 +0000)]
Get EHCI to compile.  This will make USB2.0 work when 'device ehci' is
specified.  Note that USB2.0 support is not as good as USB1.x support,
but it does appear to work with my USB2.0 external hard drive.

16 years ago* Remove references to deprecated options.
David Rhodus [Wed, 31 Dec 2003 03:22:57 +0000 (03:22 +0000)]
* Remove references to deprecated options.

Sent in from: Kent Ibbetson <bsd@kibbet.com>

16 years agoBump the network interface cloning API to what is in 5.x with the following
Matthew Dillon [Tue, 30 Dec 2003 03:56:04 +0000 (03:56 +0000)]
Bump the network interface cloning API to what is in 5.x with the following
nice additions:

1) All if_unit allocations are handled in the cloner common case
removing a lot of (repetitive) code from callers as well as the rman.h
dependency.

2) Initial device instances are created when the cloner is attached.

Submitted-by: Max Laier <max@love2party.net>
Testing-by: David Rhodus <drhodus@machdep.com>
16 years agoCleanup a DIAGNOSTIC test so LINT compiles.
Matthew Dillon [Tue, 30 Dec 2003 03:33:28 +0000 (03:33 +0000)]
Cleanup a DIAGNOSTIC test so LINT compiles.

Report-by: David Rhodus <drhodus@catpa.com>
16 years agoAdd idle entry halt vs spin statistics counters machdep.cpu_idle_*,
Matthew Dillon [Tue, 30 Dec 2003 03:19:04 +0000 (03:19 +0000)]
Add idle entry halt vs spin statistics counters machdep.cpu_idle_*,
Clear the reschedule flag in chooseproc() to prevent stale reschedule
requests from causing double-reschedules, and only disable HLT when a
system interrupt is pending (verses non critical process requests which
do not apply to the idle thread).

Problem focused in by: YONETANI Tomokazu <qhwt+dragonfly-kernel@les.ath.cx>

16 years agoThese files have been moved to bus/usb.
Matthew Dillon [Tue, 30 Dec 2003 01:04:04 +0000 (01:04 +0000)]
These files have been moved to bus/usb.

16 years agoBring in the entire FreeBSD-5 USB infrastructure. As of this commit my
Matthew Dillon [Tue, 30 Dec 2003 01:01:48 +0000 (01:01 +0000)]
Bring in the entire FreeBSD-5 USB infrastructure.  As of this commit my
USB camera, Hard Drive, Mouse, and Sony memory key all work and I can even
unplug and replug them in without crashing the port.

Not all drivers and subsystems compile as of this commit, but the ones that
do not are very close.

16 years agoAdd support for cam_calc_geometry(), from FreeBSD-5.
Matthew Dillon [Mon, 29 Dec 2003 23:31:00 +0000 (23:31 +0000)]
Add support for cam_calc_geometry(), from FreeBSD-5.

16 years agoAdd missing prototypes in last commit, other minor adjustments.
Matthew Dillon [Mon, 29 Dec 2003 23:09:30 +0000 (23:09 +0000)]
Add missing prototypes in last commit, other minor adjustments.

16 years agoGet rid of individual /* $xxx$ */ comments entirely (which was an artifact
Matthew Dillon [Mon, 29 Dec 2003 18:07:38 +0000 (18:07 +0000)]
Get rid of individual /* $xxx$ */ comments entirely (which was an artifact
of the original programmatic adding of the $DragonFly id), and just put all
the id's in one big comment.

16 years agominor syntax cleanup
Matthew Dillon [Mon, 29 Dec 2003 18:04:59 +0000 (18:04 +0000)]
minor syntax cleanup

16 years agoPrimarily add a missing lwkt_reltoken() in ntfs_ntput(), plus a little
Matthew Dillon [Mon, 29 Dec 2003 18:04:50 +0000 (18:04 +0000)]
Primarily add a missing lwkt_reltoken() in ntfs_ntput(), plus a little
cleanup.  Remove a few gettoken/reltoken pairs (depend on the MP lock more).
NTFS, as a non-critical filesystem, will eventually be serialized anyway.

From-panics-reported-by: Adam K Kirchhoff <adamk@voicenet.com>
16 years ago* Merge From FreeBSD
David Rhodus [Mon, 29 Dec 2003 16:00:01 +0000 (16:00 +0000)]
* Merge From FreeBSD

deischen    2003/12/29 07:18:01 PST

  FreeBSD src repository

  Modified files:        (Branch: RELENG_4)
    lib/libc_r/uthread   uthread_write.c
  Log:
  MFC: In the wrapped write(), return if the syscall write() returns 0.

  PR:     59291

16 years ago* Merge From FreeBSD
David Rhodus [Mon, 29 Dec 2003 15:04:13 +0000 (15:04 +0000)]
* Merge From FreeBSD

yar         2003/12/29 06:24:58 PST

  FreeBSD src repository

  Modified files:        (Branch: RELENG_4)
    sys/netgraph         ng_pppoe.c
  Log:
  MFC: Fix the DoS condition triggered by a non-standard PPPoE frame.

16 years ago* Add ending comment to line as to avoid warning messages.
David Rhodus [Mon, 29 Dec 2003 14:45:36 +0000 (14:45 +0000)]
* Add ending comment to line as to avoid warning messages.

16 years agoFix the peripheral list scan code, which was broken when the new linker set
Matthew Dillon [Mon, 29 Dec 2003 08:37:38 +0000 (08:37 +0000)]
Fix the peripheral list scan code, which was broken when the new linker set
code was brought in.  This caused camcontrol, cdrecord, and other cam-using
entities to be unable to lookup SCSI devices by bus:target:lun.

16 years agoSynchronize the USB, CAM, and TASKQUEUE subsystems with FreeBSD RELENG_4.
Matthew Dillon [Mon, 29 Dec 2003 06:42:22 +0000 (06:42 +0000)]
Synchronize the USB, CAM, and TASKQUEUE subsystems with FreeBSD RELENG_4.
Also update the $FreeBSD$ ids in the files to the synchronized rev numbers.

This has the side effect of bringing in some additional SCSI robustness
checks, bug fixes, quirk inheritance between subsystems (e.g. USB now sets
PIM_NO_6_BYTE by default and CAM now understands it).

This also brings in a huge amount of SCSI CD code that had been MFCd to
FreeBSD-4 from FreeBSD-5.

16 years agoMost motherboards these days have at least two USB controllers. Adjust
Matthew Dillon [Mon, 29 Dec 2003 04:02:43 +0000 (04:02 +0000)]
Most motherboards these days have at least two USB controllers.  Adjust
MAKEDEV all to create devices for two controllers instead of one.

16 years agoFreeBSD-5.x removed the 'read interrupt arrived early' check code, for
Matthew Dillon [Mon, 29 Dec 2003 03:42:43 +0000 (03:42 +0000)]
FreeBSD-5.x removed the 'read interrupt arrived early' check code, for
undocumented reasons.  As far as I can tell, only the ATA_S_READY bit needs
to be set when a read interrupt arrives for a PIO read operation so reduce
the test from ATA_S_READY|ATA_S_DSC|ATA_S_DRQ to just ATA_S_READY.

Change the ATA RESET timing.  Instead of polling up to 310000 times in 100uS
intervals poll 3100 times in 10000uS intervals.  Note that 5.x polls 310
times in 100ms intervals, which is silly (an unnecessarily long polling
delay).

Add a mandatory 50ms delay after all BUSY bits have been released.  Some
ATA devices release BUSY before they are ready to accept commands.  Note
that the ATA code waits 100ms after releasing RESET, before checking BUSY,
which is probably overkill, but this does not cover the mandatory delay
that must occur after BUSY is observed to have been released.

(This patch primarily removes bogus 'read interrupt arrived early' warnings
on the console for things like CF card IDE adapters and other badly designed
IDE devices).

16 years agoBackgroundable NFS mounts can still cause a boot sequence to stall for
Matthew Dillon [Mon, 29 Dec 2003 00:07:44 +0000 (00:07 +0000)]
Backgroundable NFS mounts can still cause a boot sequence to stall for
several minutes or longer if DNS services are not available during boot.
The stall time depends on the state of the network, DNS, ethernet and arp
timeouts, and the number of backgroundable NFS mounts.

Furthermore, temporary DNS failures caused NFS mounts (foreground or
background) to permanently fail and exit, which will likely result in
inconsistent system state after booting completes if DNS services or the
network is down during boot.  This case is most likely to occur when
multiple machines boot simultaniously after recovering from a power outage.

Adjust foreground timeouts for 'bg' optioned NFS mounts to 1 second and reduce
the retry sleep() from 60 seconds to 20 seconds.  60 seconds is ridiculously
long even if you had a hundred machines with dozens of backgrounded nfs mounts
all trying to mount at the same time.  Do not exit on temporary DNS
failures, and if a warning is generated for an earlier failure generate
another warning if the mount later succeeds rather then silence (which might
be misinterpreted in the logs as the mount having failed).

16 years agoTry to catch mbuf cluster mclfree list corruption a little earlier with
Matthew Dillon [Sun, 28 Dec 2003 06:11:33 +0000 (06:11 +0000)]
Try to catch mbuf cluster mclfree list corruption a little earlier with
KKASSERT()s.

16 years ago* Change __guard back into a multi-character int
David Rhodus [Sun, 28 Dec 2003 05:05:59 +0000 (05:05 +0000)]
*       Change __guard back into a multi-character int

Pointed out by Matt Dillon <dillon@backplane.com>

16 years agoThe attribution for the last commit was incorrect, it should have been:
Matthew Dillon [Sat, 27 Dec 2003 23:58:40 +0000 (23:58 +0000)]
The attribution for the last commit was incorrect, it should have been:

Requested-by: Peter Kadau <peter.kadau@tuebingen.mpg.de>
16 years ago* Implement POSIX (XSI)'s header file re_comp.h
David Rhodus [Sat, 27 Dec 2003 19:29:32 +0000 (19:29 +0000)]
* Implement POSIX (XSI)'s header file re_comp.h

16 years ago* Merge From FreeBSD
David Rhodus [Sat, 27 Dec 2003 19:23:02 +0000 (19:23 +0000)]
* Merge From FreeBSD

Revision 1.116 by truckman

Tweak the calculation of minbfree in ffs_dirpref() so that only
those cylinder groups that have at least 75% of the average free
space per cylinder group for that file system are considered as
candidates for the creation of a new directory.  The previous formula
for minbfree would set it to zero if the file system was more than
75% full, which allowed cylinder groups with no free space at all
to be chosen as candidates for directory creation, which resulted
in an expensive search for free blocks for each file that was
subsequently created in that directory.

Modify the calculation of minifree in the same way.

Decrease maxcontigdirs as the file system fills to decrease the
likelyhood that a cluster of directories will overflow the available
space in a cylinder group

16 years agoAdd a p_sched field to accomodate Adam K Kirchhoff's scheduler work. This
Matthew Dillon [Sat, 27 Dec 2003 19:21:05 +0000 (19:21 +0000)]
Add a p_sched field to accomodate Adam K Kirchhoff's scheduler work.  This
will eventually turn into a loadable scheduler module API.

Requested-by: Adam K Kirchhoff <adamk@voicenet.com>
16 years ago* Merge From FreeBSD
David Rhodus [Sat, 27 Dec 2003 17:49:38 +0000 (17:49 +0000)]
* Merge From FreeBSD

ceri        2003/12/27 09:32:13 PST

  FreeBSD src repository (doc committer)

Modified files:        (Branch: RELENG_4)
bin/ls               util.c
Log:
MFC revision 1.32:

Add the -m, -w and -x options to ls's usage message.

PR:             51493
Submitted by:   Walter Belgers
MFC after:      1 month

16 years agoMerge from FreeBSD:
Jeffrey Hsu [Sat, 27 Dec 2003 05:13:32 +0000 (05:13 +0000)]
Merge from FreeBSD:

alc         2003/12/26 13:54:45 PST

  FreeBSD src repository

  Modified files:
    sys/vm               vm_map.c
  Log:
  Minor correction to revision 1.258: Use the proc pointer that is passed to
  vm_map_growstack() in the RLIMIT_VMEM check rather than curthread.

  Revision  Changes    Path
  1.324     +1 -2      src/sys/vm/vm_map.c

16 years ago* Add the pst(4) driver to the GENERIC kernel build.
David Rhodus [Sat, 27 Dec 2003 03:17:21 +0000 (03:17 +0000)]
* Add the pst(4) driver to the GENERIC kernel build.
Should be helpful if someone is trying to install
DragonFly on a Promise controller card.

16 years ago* Cleanup compiler warnings and other style cleaning while here.
David Rhodus [Sat, 27 Dec 2003 03:12:56 +0000 (03:12 +0000)]
* Cleanup compiler warnings and other style cleaning while here.

16 years ago* Add the POSIX.1-2001 header file <cpio.h>
David Rhodus [Sat, 27 Dec 2003 02:17:01 +0000 (02:17 +0000)]
* Add the POSIX.1-2001 header file <cpio.h>
The cpio archive values.

16 years agoPatch to make the P4S8X run in ATA100 mode. This is a compromise, since
Matthew Dillon [Thu, 25 Dec 2003 07:16:35 +0000 (07:16 +0000)]
Patch to make the P4S8X run in ATA100 mode.  This is a compromise, since
both the mainboard and the hard drive support ATA133 mode, but there doesn't
seem to be much difference between ATA100 and ATA133 even on FreeBSD-current.

Submitted-by: YONETANI Tomokazu <qhwt@les.ath.cx>
16 years ago* Sync Changes over from FreeBSD
David Rhodus [Tue, 23 Dec 2003 20:07:43 +0000 (20:07 +0000)]
* Sync Changes over from FreeBSD

16 years agoMerge from FreeBSD rev 1.43 (original commit made by tjr@FreeBSD.org).
Jeffrey Hsu [Mon, 22 Dec 2003 17:41:08 +0000 (17:41 +0000)]
Merge from FreeBSD rev 1.43 (original commit made by tjr@FreeBSD.org).
Widen local variable "oldsize" to 64 bits to match the 64-bit "n_size"
field in struct smbnode.