]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
20 years agoRevert previous commit. We should not get any FP traps from within
Marcel Moolenaar [Fri, 7 May 2004 05:35:31 +0000 (05:35 +0000)]
Revert previous commit. We should not get any FP traps from within
the kernel. We can guarantee this by resetting the FP status register.
This masks all FP traps. The reason we did get FP traps was that we
didn't reset the FP status register in all cases.

Make sure to reset the FP status register in syscall(). This is one of
the places where it was forgotten.

While on the subject, reset the FP status register only when we trapped
from user space.

20 years agoMake sure to sanitize the FP status register. Specifically this
Marcel Moolenaar [Fri, 7 May 2004 05:29:12 +0000 (05:29 +0000)]
Make sure to sanitize the FP status register. Specifically this
masks all FP traps, which should not happen in the kernel.

20 years agoChange hw.acpi.cpu.cx_lowest to accept values in the form of C1,
Nate Lawson [Fri, 7 May 2004 05:22:38 +0000 (05:22 +0000)]
Change hw.acpi.cpu.cx_lowest to accept values in the form of C1,
C2, ...  Update power_profile to use the new format.  Update the
man page to reflect this and give more info on Cx states.

20 years agoRemove unwinder files that are commented-out.
Marcel Moolenaar [Fri, 7 May 2004 03:56:00 +0000 (03:56 +0000)]
Remove unwinder files that are commented-out.

20 years agoo IFNAMSIZ does include the trailing \0.
Maxim Konovalov [Fri, 7 May 2004 01:24:53 +0000 (01:24 +0000)]
o IFNAMSIZ does include the trailing \0.

Approved by: andre

o Document net.inet.icmp.reply_src.

20 years agoProperly remove MAP_FUTUREWIRE when a vm_map_entry gets torn down.
Brian Feldman [Fri, 7 May 2004 00:17:07 +0000 (00:17 +0000)]
Properly remove MAP_FUTUREWIRE when a vm_map_entry gets torn down.
Previously, mlockall(2) usage would leak MAP_FUTUREWIRE of the process's
vmspace::vm_map and subsequent processes would wire all of their memory.
Coupled with a wired-page leak in vm_fault_unwire(), this would run the
system out of free pages and cause programs to randomly SIGBUS when
faulting in new pages.

(Note that this is not the fix for the latter part; pages are still
 leaked when a wired area is unmapped in some cases.)

Reviewed by: alc
PR kern/62930

20 years agoProvide the sysctl net.inet.ip.process_options to control the processing
Andre Oppermann [Thu, 6 May 2004 18:46:03 +0000 (18:46 +0000)]
Provide the sysctl net.inet.ip.process_options to control the processing
of IP options.

 net.inet.ip.process_options=0  Ignore IP options and pass packets unmodified.
 net.inet.ip.process_options=1  Process all IP options (default).
 net.inet.ip.process_options=2  Reject all packets with IP options with ICMP
  filter prohibited message.

This sysctl affects packets destined for the local host as well as those
only transiting through the host (routing).

IP options do not have any legitimate purpose anymore and are only used
to circumvent firewalls or to exploit certain behaviours or bugs in TCP/IP
stacks.

Reviewed by: sam (mentor)

20 years agoRename acpi_cpu to cpu. Change the probe routine to early on reject
Nate Lawson [Thu, 6 May 2004 17:25:23 +0000 (17:25 +0000)]
Rename acpi_cpu to cpu.  Change the probe routine to early on reject
devices it cannot attach to.  This gets rid of extraneous but harmless
device_probe_and_attach() errors.  While I'm here, make the device
description more useful.  The !acpi case for cpu is handled by legacy0.

20 years agoMove the CPU newbus attachment to i386 legacy. The acpi_cpu device will
Nate Lawson [Thu, 6 May 2004 15:54:02 +0000 (15:54 +0000)]
Move the CPU newbus attachment to i386 legacy.  The acpi_cpu device will
become just "cpu" and provide attachments in the !legacy case.

Tested by: des

20 years agoMention that hme(4) now supports long frames for vlan(4) natively.
Joerg Wunsch [Thu, 6 May 2004 13:51:00 +0000 (13:51 +0000)]
Mention that hme(4) now supports long frames for vlan(4) natively.

20 years agoDetach i386/isa/elcr.c.
Yoshihiro Takahashi [Thu, 6 May 2004 13:49:53 +0000 (13:49 +0000)]
Detach i386/isa/elcr.c.

20 years agoFixed PC98 support.
Yoshihiro Takahashi [Thu, 6 May 2004 13:48:34 +0000 (13:48 +0000)]
Fixed PC98 support.
 - Disable an ELCR on PC98.
 - Correct IRQs.

20 years agoDisable an EISA support on PC98.
Yoshihiro Takahashi [Thu, 6 May 2004 13:45:45 +0000 (13:45 +0000)]
Disable an EISA support on PC98.

20 years agoMention that hme(4) natively supports oversized frames.
Joerg Wunsch [Thu, 6 May 2004 13:38:53 +0000 (13:38 +0000)]
Mention that hme(4) natively supports oversized frames.

20 years agoThe Sun hme hardware supposedly supports Tx frames up to 65535 octets,
Joerg Wunsch [Thu, 6 May 2004 13:38:19 +0000 (13:38 +0000)]
The Sun hme hardware supposedly supports Tx frames up to 65535 octets,
and Rx frames up to 8191 octets, so it is perfectly capable of supporting
vlan(4)-style VLAN natively.

Thus, make it support VLAN `oversize' frames.

Reviewed by: tmm

20 years agofix SONY_CLIE_41 (as PEG-SJ33/U)
MIHIRA Sanpei Yoshiro [Thu, 6 May 2004 13:33:59 +0000 (13:33 +0000)]
fix SONY_CLIE_41 (as PEG-SJ33/U)

PR: kern/64968
Submitted by: John Merryweather Cooper <coop9211@uidaho.edu>
MFC after: 1 week

20 years agoUse a proper protoype to declare interp() and move it to tip.h. Fix an
Stefan Farfeleder [Thu, 6 May 2004 13:25:09 +0000 (13:25 +0000)]
Use a proper protoype to declare interp() and move it to tip.h.  Fix an
invocation with a wrong number of arguments.

Approved by: das (mentor)

20 years agoLink state change notification of ethernet media to the routing socket.
Andre Oppermann [Thu, 6 May 2004 13:17:02 +0000 (13:17 +0000)]
Link state change notification of ethernet media to the routing socket.

o The ndis_ticktask() function updates the ifi_link_state field and
  calls rt_ifmsg() to notify listeners on the routing socket.

Approved by: wpaul

20 years agoMereged from sys/dev/sio/sio.c revision 1.429.
Yoshihiro Takahashi [Thu, 6 May 2004 13:16:45 +0000 (13:16 +0000)]
Mereged from sys/dev/sio/sio.c revision 1.429.

20 years agoThe prototypes for cabs() and cabsf() are in <complex.h>. Fix their arguments'
Stefan Farfeleder [Thu, 6 May 2004 13:11:18 +0000 (13:11 +0000)]
The prototypes for cabs() and cabsf() are in <complex.h>.  Fix their arguments'
types and describe them briefly.

Reviewed by: ru, bde
Approved by: das (mentor)

20 years agoWhen a denormal underflows to zero, raise an underflow exception.
David Schultz [Thu, 6 May 2004 09:36:11 +0000 (09:36 +0000)]
When a denormal underflows to zero, raise an underflow exception.

Thanks to marcel for helping me test this.

20 years agoDon't clear the exception flags after we finish emulating a
David Schultz [Thu, 6 May 2004 09:35:57 +0000 (09:35 +0000)]
Don't clear the exception flags after we finish emulating a
floating-point instruction in the kernel.  The flags are
supposed to be cumulative.

Thanks to marcel for helping me test this.

20 years agoRemove "Scheduling overrun" interrupts from the set of normal interrupts
Mike Silbersack [Thu, 6 May 2004 09:21:05 +0000 (09:21 +0000)]
Remove "Scheduling overrun" interrupts from the set of normal interrupts
that the OHCI driver uses.  Broken OHCI devices (like the controller
in my laptop, apparently) like to set this bit at times.  Research
through google shows that this problem has shown up on other systems
as well.

As the scheduling overrun handler doesn't actually do anything, and
the only effect is console spamming, disabling the interrupt seems
to be the right thing to do.  (And it is also what linux 2.6 does.)

20 years agoSelect the highest valid (i.e., S3) sleep state for the default for the
Nate Lawson [Thu, 6 May 2004 08:04:34 +0000 (08:04 +0000)]
Select the highest valid (i.e., S3) sleep state for the default for the
sleep button.  Change the default for the lid switch to NONE.  This can
be overridden in /etc/sysctl.conf as desired.

20 years agoMake vm_page's PG_ZERO flag immutable between the time of the page's
Alan Cox [Thu, 6 May 2004 05:03:23 +0000 (05:03 +0000)]
Make vm_page's PG_ZERO flag immutable between the time of the page's
allocation and deallocation.  This flag's principal use is shortly after
allocation.  For such cases, clearing the flag is pointless.  The only
unusual use of PG_ZERO is in vfs_bio_clrbuf().  However, allocbuf() never
requests a prezeroed page.  So, vfs_bio_clrbuf() never sees a prezeroed
page.

Reviewed by: tegge@

20 years agoAdd back sys/reboot.h which is needed.
Nate Lawson [Thu, 6 May 2004 02:57:24 +0000 (02:57 +0000)]
Add back sys/reboot.h which is needed.

20 years agoMake unnecessary globals static and remove unused includes.
Nate Lawson [Thu, 6 May 2004 02:18:58 +0000 (02:18 +0000)]
Make unnecessary globals static and remove unused includes.

Pointed out by: cscout

20 years agoFix setting debug strings via sysctl. Also, clean up the way we print
Nate Lawson [Thu, 6 May 2004 02:05:45 +0000 (02:05 +0000)]
Fix setting debug strings via sysctl.  Also, clean up the way we print
debug strings.

20 years agoName the pri argument to cv_broadcastpri() to match the existing style of
John Baldwin [Wed, 5 May 2004 21:57:44 +0000 (21:57 +0000)]
Name the pri argument to cv_broadcastpri() to match the existing style of
this file.

20 years agoAdd --unlink and --unlink-first synonyms for -U
Tim Kientzle [Wed, 5 May 2004 21:06:37 +0000 (21:06 +0000)]
Add --unlink and --unlink-first synonyms for -U
Make indentation of tar_longopts array more consistent.

20 years agoRemove extra parentheses.
Nate Lawson [Wed, 5 May 2004 20:07:52 +0000 (20:07 +0000)]
Remove extra parentheses.

20 years agoAdd an MI implementation of the ACPI global lock routines and retire the
Nate Lawson [Wed, 5 May 2004 20:04:14 +0000 (20:04 +0000)]
Add an MI implementation of the ACPI global lock routines and retire the
individual asm versions.  The global lock is shared between the BIOS and
OS and thus cannot use our mutexes.  It is defined in section 5.2.9.1 of
the ACPI specification.

Reviewed by: marcel, bde, jhb

20 years agoAdd sys/types.h for both kernel and user compiles.
Nate Lawson [Wed, 5 May 2004 20:02:02 +0000 (20:02 +0000)]
Add sys/types.h for both kernel and user compiles.

20 years agoStyle cleanups, u_intXX -> uintXX.
Nate Lawson [Wed, 5 May 2004 19:51:15 +0000 (19:51 +0000)]
Style cleanups, u_intXX -> uintXX.

20 years agoRegen
Josef Karthauser [Wed, 5 May 2004 19:40:03 +0000 (19:40 +0000)]
Regen

20 years agoAdd support for the new Zire 31 device.
Josef Karthauser [Wed, 5 May 2004 19:39:24 +0000 (19:39 +0000)]
Add support for the new Zire 31 device.

Submitted by: Adriaan de Groot <adridg@cs.kun.nl>

20 years agoMFi386: Add elcr.c.
John Baldwin [Wed, 5 May 2004 18:03:40 +0000 (18:03 +0000)]
MFi386: Add elcr.c.

20 years agoAdd support for Cronyx Tau-PCI adapters.
Roman Kurakin [Wed, 5 May 2004 16:14:00 +0000 (16:14 +0000)]
Add support for Cronyx Tau-PCI adapters.

20 years agoAdd support for Cronyx Tau-PCI adapters.
Roman Kurakin [Wed, 5 May 2004 16:11:45 +0000 (16:11 +0000)]
Add support for Cronyx Tau-PCI adapters.

Note: cpddk.c is in obfuscated form (discussed with core@).

As always, driver will be connected to the build a bit
later after some extra testings.

20 years agoLink state change notification of ethernet media to the routing socket.
Andre Oppermann [Wed, 5 May 2004 15:48:06 +0000 (15:48 +0000)]
Link state change notification of ethernet media to the routing socket.

o The ieee80211_media_status() function updates the ifi_link_state field
  and calls rt_ifmsg() to notify listeners on the routing socket.

Approved by: sam

20 years agoFixed some style bugs (unsorting of prototypes in previous commit, and
Bruce Evans [Wed, 5 May 2004 15:12:55 +0000 (15:12 +0000)]
Fixed some style bugs (unsorting of prototypes in previous commit, and
messes involving the idempotency guard).

20 years agoUpdate the version history in the driver to note everything that has happened
Scott Long [Wed, 5 May 2004 14:19:43 +0000 (14:19 +0000)]
Update the version history in the driver to note everything that has happened
over the last three weeks.

20 years agoAdd my birthday.
Stefan Farfeleder [Wed, 5 May 2004 13:11:33 +0000 (13:11 +0000)]
Add my birthday.

Approved by: das (mentor)

20 years ago1. Spell Cronyx Sigma-ISA and Cronyx Tau-ISA correctly.
Roman Kurakin [Wed, 5 May 2004 13:09:11 +0000 (13:09 +0000)]
1. Spell Cronyx Sigma-ISA and Cronyx Tau-ISA correctly.
2. Note that ct device uses ctau name as driver name (due to name conflict
with ct driver) and also mark it as a driver inside the CVS tree.

MFC after: 10 days

20 years agoAdd URLS_ABSOLUTE=YES into the doc.1 target.
Hiroki Sato [Wed, 5 May 2004 13:06:40 +0000 (13:06 +0000)]
Add URLS_ABSOLUTE=YES into the doc.1 target.

20 years agoUnbreak kernel build in the !apic case. We moved to using enums for
Maxime Henrion [Wed, 5 May 2004 12:39:02 +0000 (12:39 +0000)]
Unbreak kernel build in the !apic case.  We moved to using enums for
setting the polarity and the trigger mode of interrupts.

Tested by: Mark Santcroos, Russell Jackson, Christian Hiris

20 years agoClose some small wakeup<->msleep races.
Pawel Jakub Dawidek [Wed, 5 May 2004 12:30:41 +0000 (12:30 +0000)]
Close some small wakeup<->msleep races.

20 years agoCronyx Tau-PCI's driver name is "cp".
Roman Kurakin [Wed, 5 May 2004 12:23:02 +0000 (12:23 +0000)]
Cronyx Tau-PCI's driver name is "cp".

MFC after: 10 days

20 years agoFixed some insertion sort errors.
Bruce Evans [Wed, 5 May 2004 11:17:26 +0000 (11:17 +0000)]
Fixed some insertion sort errors.

20 years agoCorrect misinformation, vm_map_remove(9) is the `exported' version of
Hiten Pandya [Wed, 5 May 2004 10:59:50 +0000 (10:59 +0000)]
Correct misinformation, vm_map_remove(9) is the `exported' version of
vm_map_delete(9), not vm_map_remove(9).

20 years agoMFi386 (rev.1.488: demangle svr4 entries).
Bruce Evans [Wed, 5 May 2004 10:57:06 +0000 (10:57 +0000)]
MFi386 (rev.1.488: demangle svr4 entries).

20 years agoFixed unformatting of svr4 entries in rev.1.326 and consistent misformatting
Bruce Evans [Wed, 5 May 2004 10:50:54 +0000 (10:50 +0000)]
Fixed unformatting of svr4 entries in rev.1.326 and consistent misformatting
of them in rev.1.358.

20 years agomdoc(7) police:
Hiten Pandya [Wed, 5 May 2004 10:47:19 +0000 (10:47 +0000)]
mdoc(7) police:

* correctly place parenthisized sentences
* remove hard sentence breaks
* use .Vt instead of .Fn

20 years agoMake the manual page consistent and add a cross-reference to wakeup(9).
Hiten Pandya [Wed, 5 May 2004 10:01:06 +0000 (10:01 +0000)]
Make the manual page consistent and add a cross-reference to wakeup(9).

20 years agoSupport for dynamic adjustment of FPU precision is only available on
David Schultz [Wed, 5 May 2004 09:53:29 +0000 (09:53 +0000)]
Support for dynamic adjustment of FPU precision is only available on
i386 and amd64, so fp[gs]prec(3) don't exist on other platforms.

PR: 52882

20 years agoEnable the build of the vinum KLD on sparc64. It is known to work so
Joerg Wunsch [Wed, 5 May 2004 08:24:57 +0000 (08:24 +0000)]
Enable the build of the vinum KLD on sparc64.  It is known to work so
there's no reason to not build it.

20 years agoA minor refactoring to simplify portability: assign the filename
Tim Kientzle [Wed, 5 May 2004 06:33:00 +0000 (06:33 +0000)]
A minor refactoring to simplify portability: assign the filename
length to a separate variable so that it will be easier to adapt to
systems that don't have d_namlen in struct dirent.

20 years agoRoto-till the ioctl code. Remove all the groping around in the x86 BIOS
Scott Long [Wed, 5 May 2004 05:29:19 +0000 (05:29 +0000)]
Roto-till the ioctl code.  Remove all the groping around in the x86 BIOS
segment, remove the groping around in the Option ROM segments, remove the
bogus tests for bcopy vs. copyout.  There really is no reason for a
management app to know these things other than to create l33t info tables
for the user.

20 years agoConvert the asr driver to use the bus_space API. This does not represent
Scott Long [Wed, 5 May 2004 03:42:33 +0000 (03:42 +0000)]
Convert the asr driver to use the bus_space API.  This does not represent
a significant functional change, but it further cleans up the code and
brings it closer to being portable.  Thanks to Don Bowman for helping to
test this.

20 years agoRemove redundant call to soisdisconnected() from ddp_abort(), as it
Robert Watson [Wed, 5 May 2004 03:34:37 +0000 (03:34 +0000)]
Remove redundant call to soisdisconnected() from ddp_abort(), as it
calls at_pcbdetach() which also immediately calls soisdisconnected().

20 years agoFix typo (in comment): s/IA-46/IA-64/
Marcel Moolenaar [Wed, 5 May 2004 02:38:54 +0000 (02:38 +0000)]
Fix typo (in comment): s/IA-46/IA-64/

Submitted by: Miod Vallat <miod@online.fr>

20 years agoDefine MID_ARM6.
Olivier Houchard [Tue, 4 May 2004 22:49:47 +0000 (22:49 +0000)]
Define MID_ARM6.

20 years agoDon't declare osigset_t, as it is done in sys/_sigset.h.
Olivier Houchard [Tue, 4 May 2004 22:38:22 +0000 (22:38 +0000)]
Don't declare osigset_t, as it is done in sys/_sigset.h.

20 years agoFix bug introduced in revision 1.9; in nexus_probe_nomatch() get device name
Marius Strobl [Tue, 4 May 2004 22:31:16 +0000 (22:31 +0000)]
Fix bug introduced in revision 1.9; in nexus_probe_nomatch() get device name
and type for printing info about the device that didn't probe from child, not
parent.
This fixes a panic on systems where not yet supported devices hang off of the
nexus, e.g. on E450.

Reported by: joerg

20 years agoAdd some endianess-related functions and macros.
Olivier Houchard [Tue, 4 May 2004 22:24:56 +0000 (22:24 +0000)]
Add some endianess-related functions and macros.

20 years agoAdd the Elf32_Auxinfo declaretion.
Olivier Houchard [Tue, 4 May 2004 22:21:36 +0000 (22:21 +0000)]
Add the Elf32_Auxinfo declaretion.
Define AT_*.
(Maybe some of this could go in a MI header ?)

20 years agoDefine __double_t and __float_t.
Olivier Houchard [Tue, 4 May 2004 22:16:29 +0000 (22:16 +0000)]
Define __double_t and __float_t.

20 years agoPrototype __ashldi3(), __ashrdi3() and __lshrdi3().
Olivier Houchard [Tue, 4 May 2004 22:15:54 +0000 (22:15 +0000)]
Prototype __ashldi3(), __ashrdi3() and __lshrdi3().

20 years agoContrariwise, Linux sys/stat.h doesn't define mode_t and friends,
Tim Kientzle [Tue, 4 May 2004 21:40:09 +0000 (21:40 +0000)]
Contrariwise, Linux sys/stat.h doesn't define mode_t and friends,
even though POSIX requires it.  <sigh>

20 years ago- Create a pir0 psuedo device as a child of legacy0 if we attach a legacy
John Baldwin [Tue, 4 May 2004 21:17:52 +0000 (21:17 +0000)]
- Create a pir0 psuedo device as a child of legacy0 if we attach a legacy
  host-PCI bridge device and find a valid $PIR.
- Make pci_pir_parse() private to pci_pir.c and have pir0's attach routine
  call it instead of having legacy_pcib_attach() call it.
- Implement suspend/resume support for the $PIR by giving pir0 a resume
  method that calls the BIOS to reroute each link that was already routed
  before the machine was suspended.
- Dump the state of the routed flag in the links display code.
- If a link's IRQ is set by a tunable, then force that link to be re-routed
  the first time it is used.
- Move the 'Found $PIR' message under bootverbose as the pir0 description
  line lists the number of entries already.  The pir0 line also only shows
  up if we are actually using the $PIR which is a bonus.
- Use BUS_CONFIG_INTR() to ensure that any IRQs used by a PCI link are
  set to level/low trigger/polarity.

20 years agoHave ACPI use BUS_CONFIG_INTR() to force the SCI to level trigger and
John Baldwin [Tue, 4 May 2004 21:04:24 +0000 (21:04 +0000)]
Have ACPI use BUS_CONFIG_INTR() to force the SCI to level trigger and
active low polarity when using the PIC interrupt model.  This should fix
broken SCI interrupts on machines when not using the APIC where the BIOS
doesn't program the ELCR to level trigger for the ACPI SCI.

Requested by: njl

20 years ago- Add a new pic method pic_config_intr() to set the trigger mode and
John Baldwin [Tue, 4 May 2004 21:02:56 +0000 (21:02 +0000)]
- Add a new pic method pic_config_intr() to set the trigger mode and
  polarity for a specified IRQ.  The intr_config_intr() function wraps
  this pic method hiding the IRQ to interrupt source lookup.
- Add a config_intr() method to the atpic(4) driver that reconfigures
  the interrupt using the ELCR if possible and returns an error otherwise.
- Add a config_intr() method to the apic(4) driver that just logs any
  requests that would change the existing programming under bootverbose.
  Currently, the only changes the apic(4) driver receives are due to bugs
  in the acpi(4) driver and its handling of link devices, hence the reason
  for such requests currently being ignored.
- Have the nexus(4) driver on i386 implement the bus_config_intr() function
  by calling intr_config_intr().

20 years ago- Change the APIC code to mostly use the recently added intr_trigger
John Baldwin [Tue, 4 May 2004 20:39:24 +0000 (20:39 +0000)]
- Change the APIC code to mostly use the recently added intr_trigger
  and intr_polarity enums for passing around interrupt trigger modes and
  polarity rather than using the magic numbers 0 for level/low and 1 for
  edge/high.
- Convert the mptable parsing code to use the new ELCR wrapper code rather
  than reading the ELCR directly.  Also, use the ELCR settings to control
  both the trigger and polarity of EISA IRQs instead of just the trigger
  mode.
- Rework the MADT's handling of the ACPI SCI again:
  - If no override entry for the SCI exists at all, use level/low trigger
    instead of the default edge/high used for ISA IRQs.
  - For the ACPI SCI, use level/low values for conforming trigger and
    polarity rather than the edge/high values we use for all other ISA
    IRQs.
  - Rework the tunables available to override the MADT.  The
    hw.acpi.force_sci_lo tunable is no longer supported.  Instead, there
    are now two tunables that can independently override the trigger mode
    and/or polarity of the SCI.  The hw.acpi.sci.trigger tunable can be
    set to either "edge" or "level", and the hw.acpi.sci.polarity tunable
    can be set to either "high" or "low".  To simulate hw.acpi.force_sci_lo,
    set hw.acpi.sci.trigger to "level" and hw.acpi.sci.polarity to "low".
    If you are having problems with ACPI either causing an interrupt storm
    or not working at all (e.g., the power button doesn't turn invoke a
    shutdown -p now), you can try tweaking these two tunables to find the
    combination that works.

20 years ago- Add a member to the atpic interrupt source structures to indicate if the
John Baldwin [Tue, 4 May 2004 20:12:52 +0000 (20:12 +0000)]
- Add a member to the atpic interrupt source structures to indicate if the
  IRQ is edge triggered or level triggered.  For ISA interrupts, we assume
  that edge triggered interrupts are always active high and that level
  triggered interrupts are always active low.
- Don't disable an edge triggered interrupt in the PIC.  This avoids
  outb instructions to the actual PIC for traditional ISA IRQs such as
  IRQ 1, 6, 14, and 15.  (Fast interrupts such as IRQs 0 and 8 don't mask
  their source, so this doesn't change anything for them.)
- For MCA systems we assume that all interrupts are level triggered and
  thus need masking.  Otherwise, we probe the ELCR.  If it exists we trust
  what it tells us regarding which interrupts are level triggered.  If it
  does not exist, we assume that IRQs 0, 1, 2, and 8 are edge triggered
  and that all other IRQs are level triggered and need masking.
- Instruct the ELCR mini-driver to restore its saved state during resume.

20 years agoAdd a simple mini-driver for the ELCR register. Originally, the ELCR
John Baldwin [Tue, 4 May 2004 20:07:46 +0000 (20:07 +0000)]
Add a simple mini-driver for the ELCR register.  Originally, the ELCR
register controlled the trigger mode and polarity of EISA interrupts.
However, it appears that most (all?) PCI systems use the ELCR to manage
the trigger mode and polarity of ISA interrupts as well since ISA IRQs used
to route PCI interrupts need to be level triggered with active low
polarity.  We check to see if the ELCR exists by sanity checking the value
we get back ensuring that IRQS 0 (8254), 1 (atkbd), 2 (the link from the
slave PIC), and 8 (RTC) are all clear indicating edge trigger and active
high polarity.

This mini-driver will be used by the atpic driver to manage the trigger and
polarity of ISA IRQs.  Also, the mptable parsing code will use this mini
driver rather than examining the ELCR directly.

20 years agoAdd some lines to note that 'www' is available as an option
Josef El-Rayes [Tue, 4 May 2004 20:03:50 +0000 (20:03 +0000)]
Add some lines to note that 'www' is available as an option
to get the www tree.

20 years agoInclude local copies of fts.c and fts.h to be used ONLY on non-FreeBSD
Tim Kientzle [Tue, 4 May 2004 17:21:01 +0000 (17:21 +0000)]
Include local copies of fts.c and fts.h to be used ONLY on non-FreeBSD
systems.  The fts.h here is an exact copy of include/fts.h (except for
an initial explanatory comment and the revision tags, of course).  The
fts.c here is slightly modified from lib/libc/gen/fts.c so it can
compile correctly on non-FreeBSD systems.

20 years agoOops^2, finish switch to using the moved cy driver for pc98 by removing
Bruce Evans [Tue, 4 May 2004 16:01:47 +0000 (16:01 +0000)]
Oops^2, finish switch to using the moved cy driver for pc98 by removing
cy.c and not legacy.c here.

20 years agoo Document m_getcl(9).
Maxim Konovalov [Tue, 4 May 2004 14:53:34 +0000 (14:53 +0000)]
o Document m_getcl(9).

Submitted by: Gleb Smirnoff
MFC after: 2 weeks

20 years agomdoc(7) cleanup for the last commit to this file.
Simon L. B. Nielsen [Tue, 4 May 2004 14:39:32 +0000 (14:39 +0000)]
mdoc(7) cleanup for the last commit to this file.

OK'ed by: bmilekic

20 years agoSync to 1.176 of usbdevs
MIHIRA Sanpei Yoshiro [Tue, 4 May 2004 11:37:26 +0000 (11:37 +0000)]
Sync to 1.176 of usbdevs

20 years agofix typo (adapte -> adapter)
MIHIRA Sanpei Yoshiro [Tue, 4 May 2004 11:36:54 +0000 (11:36 +0000)]
fix typo (adapte -> adapter)

Submitted by: Daan Vreeken [PA4DAN] <Danovitsch@Vitsch.net>

20 years agoSync to 1.175 of usbdevs
MIHIRA Sanpei Yoshiro [Tue, 4 May 2004 11:23:45 +0000 (11:23 +0000)]
Sync to 1.175 of usbdevs

20 years agoFix device ID for Linksys USB 2.0 10/100 ethernet controller
MIHIRA Sanpei Yoshiro [Tue, 4 May 2004 11:22:09 +0000 (11:22 +0000)]
Fix device ID for Linksys USB 2.0 10/100 ethernet controller
(use LINKSYS2)

Submitted by: takawata-san

20 years agoWhen editing a Sun label, make the search for a valid partition line
Joerg Wunsch [Tue, 4 May 2004 09:50:41 +0000 (09:50 +0000)]
When editing a Sun label, make the search for a valid partition line
violate POLA a little less by not requiring exactly two spaces in front
of the entry (and silently discarding any non-matching entry).  We now
recognize anything starting with a letter followed by a colon as the
first non-space chars as a partition entry.

20 years agoSync to 1.174 of usbdevs
MIHIRA Sanpei Yoshiro [Tue, 4 May 2004 09:41:08 +0000 (09:41 +0000)]
Sync to 1.174 of usbdevs

20 years agoAdd some device ID for atuwi USB wlan driver
MIHIRA Sanpei Yoshiro [Tue, 4 May 2004 09:39:44 +0000 (09:39 +0000)]
Add some device ID for atuwi USB wlan driver
(Atmel at76c503a http://vitsch.net/bsd/atuwi)

Fix ATMEL DWL-120 Wireless adapter product ID.
(I checked http://www.linux-usb.org/usb.ids)

PR: kern/66227
Submitted by: Daan Vreeken [PA4DAN] <Danovitsch@Vitsch.net>

20 years agoFix compilation on 64-bit architectures.
Pawel Jakub Dawidek [Tue, 4 May 2004 07:45:39 +0000 (07:45 +0000)]
Fix compilation on 64-bit architectures.

Noticed by: Tinderbox

20 years agoInclude <sys/time.h> for the declaration of struct bintime instead of
Bruce Evans [Tue, 4 May 2004 07:08:04 +0000 (07:08 +0000)]
Include <sys/time.h> for the declaration of struct bintime instead of
depending on namespace pollution in <sys/stat.h>.  struct bintime is
only needed to satisfy leakage of kernel interfaces to userland and
namespace bugs in those interfaces...

20 years agoFix hangs caused by z8530_bus_ipend() returning UART_IPEND_TXIDLE
Marcel Moolenaar [Tue, 4 May 2004 06:58:10 +0000 (06:58 +0000)]
Fix hangs caused by z8530_bus_ipend() returning UART_IPEND_TXIDLE
not as a pending interrupt status, but as a matter of status quo.
Consequently, when there's no data to be transmitted the condition
is not cleared and uart_intr() is stuck in an infinite loop trying
to clear the UART_IPEND_TXIDLE status.
The z8530_bus_ipend() function is changed to return idle only once
after having sent any data.

The root cause for this problem is that we cannot use the interrupt
status bits of the SCC itself. The register that holds the interrupt
status can only be accessed by channel A and holds the status for
both channels. Using the interrupt status register would complicate
the driver because we need to synchronize access to the SCC between
the channels.

Elementary testing: marius

20 years agoIncrease BUS_SPACE_IAT_MAXSIZE to 33 for the ed driver.
Yoshihiro Takahashi [Tue, 4 May 2004 06:38:13 +0000 (06:38 +0000)]
Increase BUS_SPACE_IAT_MAXSIZE to 33 for the ed driver.

20 years agoWhen the interrupt cannot be INTR_FAST, it still is INTR_MPSAFE.
Marcel Moolenaar [Tue, 4 May 2004 05:54:02 +0000 (05:54 +0000)]
When the interrupt cannot be INTR_FAST, it still is INTR_MPSAFE.
Mark it as such.

20 years agoFix a typo from rev 1.56 that somehow escaped my testing.
Scott Long [Tue, 4 May 2004 03:16:22 +0000 (03:16 +0000)]
Fix a typo from rev 1.56 that somehow escaped my testing.

20 years agoAdd route.h to pick up the rt_ifmsg() declaration.
Scott Long [Tue, 4 May 2004 02:39:41 +0000 (02:39 +0000)]
Add route.h to pick up the rt_ifmsg() declaration.

20 years agoNeed to mark the interrupt from cbb as being MP safe on resume too.
Warner Losh [Tue, 4 May 2004 02:25:00 +0000 (02:25 +0000)]
Need to mark the interrupt from cbb as being MP safe on resume too.

20 years agoSwitch to using the inpcb MAC label instead of socket MAC label when
Robert Watson [Tue, 4 May 2004 02:11:47 +0000 (02:11 +0000)]
Switch to using the inpcb MAC label instead of socket MAC label when
labeling new mbufs created from sockets/inpcbs in IPv4.  This helps avoid
the need for socket layer locking in the lower level network paths
where inpcb locks are already frequently held where needed.  In
particular:

- Use the inpcb for label instead of socket in raw_append().
- Use the inpcb for label instead of socket in tcp_output().
- Use the inpcb for label instead of socket in tcp_respond().
- Use the inpcb for label instead of socket in tcp_twrespond().
- Use the inpcb for label instead of socket in syncache_respond().

While here, modify tcp_respond() to avoid assigning NULL to a stack
variable and centralize assertions about the inpcb when inp is
assigned.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, McAfee Research

20 years agoAssert inpcb lock in udp_append().
Robert Watson [Tue, 4 May 2004 01:08:15 +0000 (01:08 +0000)]
Assert inpcb lock in udp_append().

Obtained from: TrustedBSD Project
Sponsored by: DARPA, McAfee Research

20 years agoAssert the inpcb lock on 'last' in udp_append(), since it's always
Robert Watson [Tue, 4 May 2004 00:10:16 +0000 (00:10 +0000)]
Assert the inpcb lock on 'last' in udp_append(), since it's always
called with it, and also requires it.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, McAfee Research

20 years agoIf the mbuf pointer passed to mac_mbuf_to_label() is NULL, or the tag
Robert Watson [Mon, 3 May 2004 23:37:48 +0000 (23:37 +0000)]
If the mbuf pointer passed to mac_mbuf_to_label() is NULL, or the tag
lookup for the label tag fails, return NULL rather than something close
to NULL.  This scenario occurs if mbuf header labeling is optional and
a policy requiring labeling is loaded, resulting in some mbufs having
labels and others not.  Previously, 0x14 would be returned because the
NULL from m_tag_find() was not treated specially.

Obtained from: TrustedBSD Project
Sponsored by: DARPA, McAfee Research

20 years agoAdd /* !MAC */ to final #endif.
Robert Watson [Mon, 3 May 2004 22:54:46 +0000 (22:54 +0000)]
Add /* !MAC */ to final #endif.