Lukas Ertl [Wed, 18 Aug 2004 20:34:45 +0000 (20:34 +0000)]
Fix a stupid bug in the drive taste function: when checking if a
drive is known to the configuration check also if it already has a geom.
Without this check several needless geoms are created and valid
configuration data was overwritten.
This change obsoletes the need for a separate geom to taste an
offered provider and the consumer doesn't need to be opened with the
exclusive bit set.
Justin T. Gibbs [Wed, 18 Aug 2004 17:17:43 +0000 (17:17 +0000)]
Initialize iobase from the resource allocated by bus_alloc_resource_any()
rather than with isa_get_port(). This value is only used in diagnostics,
but the value we want to print is the value in our resource, not in any
hint.
Justin T. Gibbs [Wed, 18 Aug 2004 16:56:54 +0000 (16:56 +0000)]
ss if_vx through indent, and use ANSI function definitions, prior to adding
if_media and DMA support to the driver. The previous style was inconsistent
making it difficult to emulate existing style.
Nate Lawson [Wed, 18 Aug 2004 16:39:59 +0000 (16:39 +0000)]
If _CRS fails, assume that it succeeded. The ASUS K8V (and others) defines
single-entry irq links even though it uses an APIC. It appears that it
ignores _SRS when in APIC mode but returns a valid irq at other times.
Justin T. Gibbs [Wed, 18 Aug 2004 16:35:52 +0000 (16:35 +0000)]
Invert the polarity of two tests in the recovery code that could cause
the driver to issue a bus reset more quickly than intended. We want to
*wait* if we find another SCB that could be the cause of this timeout,
not proceed to a bus reset.
Ruslan Ermilov [Wed, 18 Aug 2004 13:21:40 +0000 (13:21 +0000)]
A fix from rev. 1.52 of gnu/usr.bin/cc/cc_tools/Makefile was lost
in rev. 1.57. Fix this regression by making cc_tools a new-style
build-tool in Makefile.inc1. For details of what has been fixed,
please see the gnu/usr.bin/cc/cc_tools/Makefile,v 1.52 commit log.
Caught this by accidentally touching param.h while in the process
of cross-buildworld for amd64.
Ruslan Ermilov [Wed, 18 Aug 2004 07:17:01 +0000 (07:17 +0000)]
My take at improving the universe: allow the worlds to be
built in parallel. Examples:
make universe
Build worlds sequentially, each world sequentially.
make universe JFLAG=-j4
Build worlds sequentially, each world in parallel.
make -j4 universe
make -j4 universe JFLAG=-j2
Build four worlds in parallel, each world will be
built in parallel too. World parallelization is
set to four in the first synopsis, and to two in
the second.
make -j4 universe JFLAG=-B
Build worlds in parallel, each world sequentially.
Nate Lawson [Wed, 18 Aug 2004 07:00:43 +0000 (07:00 +0000)]
Call AcpiLeaveSleepState() before DEVICE_RESUME(). The former calls the
BFS and WAK methods, which are needed to initialize some devices before
the driver can resume them. This was the original order.
Ruslan Ermilov [Wed, 18 Aug 2004 06:49:56 +0000 (06:49 +0000)]
Moved the MAKEOBJDIRPREFIX check from Makefile.inc1 to Makefile,
to suppress warnings with installworld and distributeworld when
env(1) cannot be found in the PATH.
David E. O'Brien [Wed, 18 Aug 2004 06:29:48 +0000 (06:29 +0000)]
Import of LukeM's ftpd taken from the NetBSD CVS repo on 9-Aug-2004.
This closes the remotely exploitable vulnerability documented at
ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2004-009.txt.asc
http://www.vuxml.org/freebsd/c4b025bb-f05d-11d8-9837-000c41e2cdad.html
Nate Lawson [Wed, 18 Aug 2004 05:56:07 +0000 (05:56 +0000)]
When one entry in the RSDT is corrupted, just skip it instead of bailing out.
This gets us the info we need on systems which have proprietary tables that
don't match the standard. For instance, an AMI system has a table of type
"OEMB" with an invalid checksum.
Tested by: Maxim Maximov <mcsi_at_mcsi.pp.ru>
MFC after: 1 day
Nate Lawson [Wed, 18 Aug 2004 05:48:24 +0000 (05:48 +0000)]
Remove the ACPIIO_ENABLE and ACPIIO_DISABLE ioctls as well as all
callers. These ioctls attempted to enable and disable the ACPI
interpreter at runtime. In practice, it is not possible to boot with
ACPI and then disable it on many systems and trying to do so can cause
crashes, interrupt storms, etc. Binary compatibility with userland is
retained.
Nate Lawson [Wed, 18 Aug 2004 05:41:21 +0000 (05:41 +0000)]
Add a padding member to the header overlaid on data allocated in the
ACPI_DEBUG case. Without this, use of allocated memory is unaligned and
causes a trap on ia64. Intel may fix this differently in a subsequent
release but this is adequate for now.
Robert Watson [Wed, 18 Aug 2004 03:46:39 +0000 (03:46 +0000)]
Since pc98 shares the AGP driver with the i386, also define the
amd64 agp option here in order to let the pc98 kernel build
complete. This doesn't seem right, since there probably aren't
plans to build a pc98 amd64 box; however, it's not clear to me
how to get config to generate an opt_agp.h without an option
defined.
Andre Oppermann [Tue, 17 Aug 2004 22:05:54 +0000 (22:05 +0000)]
Convert ipfw to use PFIL_HOOKS. This is change is transparent to userland
and preserves the ipfw ABI. The ipfw core packet inspection and filtering
functions have not been changed, only how ipfw is invoked is different.
However there are many changes how ipfw is and its add-on's are handled:
In general ipfw is now called through the PFIL_HOOKS and most associated
magic, that was in ip_input() or ip_output() previously, is now done in
ipfw_check_[in|out]() in the ipfw PFIL handler.
IPDIVERT is entirely handled within the ipfw PFIL handlers. A packet to
be diverted is checked if it is fragmented, if yes, ip_reass() gets in for
reassembly. If not, or all fragments arrived and the packet is complete,
divert_packet is called directly. For 'tee' no reassembly attempt is made
and a copy of the packet is sent to the divert socket unmodified. The
original packet continues its way through ip_input/output().
ipfw 'forward' is done via m_tag's. The ipfw PFIL handlers tag the packet
with the new destination sockaddr_in. A check if the new destination is a
local IP address is made and the m_flags are set appropriately. ip_input()
and ip_output() have some more work to do here. For ip_input() the m_flags
are checked and a packet for us is directly sent to the 'ours' section for
further processing. Destination changes on the input path are only tagged
and the 'srcrt' flag to ip_forward() is set to disable destination checks
and ICMP replies at this stage. The tag is going to be handled on output.
ip_output() again checks for m_flags and the 'ours' tag. If found, the
packet will be dropped back to the IP netisr where it is going to be picked
up by ip_input() again and the directly sent to the 'ours' section. When
only the destination changes, the route's 'dst' is overwritten with the
new destination from the forward m_tag. Then it jumps back at the route
lookup again and skips the firewall check because it has been marked with
M_SKIP_FIREWALL. ipfw 'forward' has to be compiled into the kernel with
'option IPFIREWALL_FORWARD' to enable it.
DUMMYNET is entirely handled within the ipfw PFIL handlers. A packet for
a dummynet pipe or queue is directly sent to dummynet_io(). Dummynet will
then inject it back into ip_input/ip_output() after it has served its time.
Dummynet packets are tagged and will continue from the next rule when they
hit the ipfw PFIL handlers again after re-injection.
BRIDGING and IPFW_ETHER are not changed yet and use ipfw_chk() directly as
they did before. Later this will be changed to dedicated ETHER PFIL_HOOKS.
More detailed changes to the code:
conf/files
Add netinet/ip_fw_pfil.c.
conf/options
Add IPFIREWALL_FORWARD option.
modules/ipfw/Makefile
Add ip_fw_pfil.c.
net/bridge.c
Disable PFIL_HOOKS if ipfw for bridging is active. Bridging ipfw
is still directly invoked to handle layer2 headers and packets would
get a double ipfw when run through PFIL_HOOKS as well.
netinet/ip_divert.c
Removed divert_clone() function. It is no longer used.
netinet/ip_dummynet.[ch]
Neither the route 'ro' nor the destination 'dst' need to be stored
while in dummynet transit. Structure members and associated macros
are removed.
netinet/ip_fastfwd.c
Removed all direct ipfw handling code and replace it with the new
'ipfw forward' handling code.
netinet/ip_fw.h
Removed 'ro' and 'dst' from struct ip_fw_args.
netinet/ip_fw2.c
(Re)moved some global variables and the module handling.
netinet/ip_fw_pfil.c
New file containing the ipfw PFIL handlers and module initialization.
netinet/ip_input.c
Removed all direct ipfw handling code and replace it with the new
'ipfw forward' handling code. ip_forward() does not longer require
the 'next_hop' struct sockaddr_in argument. Disable early checks
if 'srcrt' is set.
netinet/ip_output.c
Removed all direct ipfw handling code and replace it with the new
'ipfw forward' handling code.
netinet/ip_var.h
Add ip_reass() as general function. (Used from ipfw PFIL handlers
for IPDIVERT.)
netinet/raw_ip.c
Directly check if ipfw and dummynet control pointers are active.
netinet/tcp_input.c
Rework the 'ipfw forward' to local code to work with the new way of
forward tags.
netinet/tcp_sack.c
Remove include 'opt_ipfw.h' which is not needed here.
sys/mbuf.h
Remove m_claim_next() macro which was exclusively for ipfw 'forward'
and is no longer needed.
Nate Lawson [Tue, 17 Aug 2004 18:36:07 +0000 (18:36 +0000)]
Fix a deadlock on boot for some systems where reading the battery status
also generates a notify. Since we held the lock over this call, the
notify never got to run and the battery status read never returned.
Document this also.
Tested by: Maxim Maximov <mcsi_at_mcsi.pp.ru>
Approved by: re (scottl)
Justin T. Gibbs [Tue, 17 Aug 2004 18:12:37 +0000 (18:12 +0000)]
Defer the capture of the "expected sync bits" until the first "normal"
data packet is received from the mouse. In the case of many KVM's,
this avoids a bug in their mouse emulation that sends back incorrect
sync when you explicitly request a data packet from the mouse. Without
this change, you must force the driver into stock PS/2 mode or be flooded
with a never ending stream of "out of sync" messages on these KVMs.
Tom Rhodes [Tue, 17 Aug 2004 04:45:52 +0000 (04:45 +0000)]
Fix incorrect code in an example. The previous example would produce
19 column positions wide in the first line and 20 in the rest of the lines.
This fixes the example to provide the correct output.
PR: 53454
Noticed by: Kuang-che Wu <kcwu@kcwu.homeip.net>
Submitted by: Marc Silver <marcs@draenor.org>
Approved by: re (scottl)
Justin T. Gibbs [Tue, 17 Aug 2004 00:14:31 +0000 (00:14 +0000)]
Add an ISA attachement to the aic7xxx driver to handle 284X controllers.
The ISA probe uses an identify routine to probe all slot locations from
1 to 14 that do not conflict with other allocated resources. This required
making aic7770.c part of the driver core when compiled as a module.
aic7xxx.c:
aic79xx.c:
aic_osm_lib.c:
Use aic_scb_timer_start() consistently to start the watchdog timer.
This removes a few places that verbatum copied the code in
aic_scb_timer_start().
During recovery processing, allow commands to still be queued to
the controller. The only requirement we have is that our recovery
command be queued first - something the code already guaranteed.
The only other change required to make this work is to prevent
timers from being started for these newly queued commands.
Marius Strobl [Mon, 16 Aug 2004 23:23:21 +0000 (23:23 +0000)]
- Sync whitespace and comments with i386 GENERIC.
- Add some commented out NICs from i386 GENERIC. Most of them look like they
would work but I'm not sure if they are endian-clean and can't test. There
was a report that sk(4) works on sparc64 but it doesn't look like it would
because it doesn't use busdma.
- Improve some of the descriptions of sparc64 specific devices.
There's no functional change, i.e. no added or deleted uncommented devices or
options, in this commit.
Marius Strobl [Mon, 16 Aug 2004 23:21:06 +0000 (23:21 +0000)]
Try to catch up with reality:
- Chase the split of pcm(4). This unbreaks LINT compiles.
- sc(4) basically works and a lot of its options should be supported.
- Add the creator and ofw_console drivers.
- vinum(4) should work, at least its module was turned on for sparc64 a while
ago.
- Don't build sio(4). Its EBus front-end was removed a while ago and the ISA
one hardly works. Use uart(4) instead, it's not perfect yet but works much
better.
Thomas Quinot [Mon, 16 Aug 2004 22:41:58 +0000 (22:41 +0000)]
Properly identify the root filesystem to be used in /etc/fstab in each
slice of the flash card, ensuring that the loader will mount the root fs
from the booted slice by default.
Allow usage of FFS volume labels instead of hardcoded device names through
WITH_GEOM_VOL Makefile knob.
Martin Blapp [Mon, 16 Aug 2004 22:35:56 +0000 (22:35 +0000)]
Make 'client DNS forward update' working again which got broken in rev.
RC9 of dhclient 3.0.1. This fix will be part of dhclient 3.0.2. It is
also part of the official redhat package.
Submitted by: Jason Vas Dias <jvdias@redhat.com>
Discussed on: dhcp-hackers@isc.org
Arun Sharma [Mon, 16 Aug 2004 22:09:58 +0000 (22:09 +0000)]
The existing code fails some corner cases. Replace it with
ia64_bsp_adjust() which has been tested to work in all cases for
arbitrary (bsp, nslots) combinations.
Justin T. Gibbs [Mon, 16 Aug 2004 22:05:53 +0000 (22:05 +0000)]
Remove outb to "prime" the EISA ID registers of each slot. This was
only required to support probing of the Adaptec 284X VLB SCSI controller
which becomes visible in EISA space if you perform these writes. 284X
probing is moving to an ISA attachment.
Justin T. Gibbs [Mon, 16 Aug 2004 21:55:29 +0000 (21:55 +0000)]
Modify the "legacy bus" to pass all resource allocations through to its
parent rather than track resources locally. The original code
was incomplete in that it would only honor requests for resources
that already exist in its resource list. This prevented many ISA
identify routines from allocating temporary resources. Passing
the requests up to legacy's parent losing no functionality and
allows these requests to succeed.
Martin Blapp [Mon, 16 Aug 2004 21:26:04 +0000 (21:26 +0000)]
Recommit removed Rev. 1.40. This fix does solve a FPE with negative lease
time as described in the PR below.
It seems that this patch should have been part of the vendor tree but got
accidently missed in the 3.0.1 final version. It will definitly be
part of 3.0.2 but until then it's a long way to go.
Marcel Moolenaar [Mon, 16 Aug 2004 20:33:20 +0000 (20:33 +0000)]
We now handle SSDT tables. Remove a reference from the BUGS section
and explicitly mention SSDT when we talk about the DSDT so that people
don't have to guess whether it includes the SSDT.
While here, touch date.
Marcel Moolenaar [Mon, 16 Aug 2004 18:54:23 +0000 (18:54 +0000)]
Catch up with the drive-by renaming of IA32 to COMPAT_IA32. It must
have been rush hour...
While here, move COMPAT_IA32 from opt_global.h to opt_compat.h like on
amd64. Consequently, it's unsafe to use the option in pcb.h. We now
unconditionally have the ia32 specific registers in the PCB.
Bill Paul [Mon, 16 Aug 2004 18:50:20 +0000 (18:50 +0000)]
Make the Texas Instruments 802.11g chipset work with the NDISulator.
This was tested with a Netgear WG311v2 802.11b/g PCI card. Things
that were fixed:
- This chip has two memory mapped regions, one at PCIR_BAR(0) and the
other at PCIR_BAR(1). This is a little different from the other
chips I've seen with two PCI shared memory regions, since they tend
to have the second BAR ad PCIR_BAR(2). if_ndis_pci.c tests explicitly
for PCIR_BAR(2). This has been changed to simply fill in ndis_res_mem
first and ndis_res_altmem second, if a second shared memory range
exists. Given that NDIS drivers seem to scan for BARs in ascending
order, I think this should be ok.
- Fixed the code that tries to process firmware images that have been
loaded as .ko files. To save a step, I was setting up the address
mapping in ndis_open_file(), but ndis_map_file() flags pre-existing
mappings as an error (to avoid duplicate mappings). Changed this so
that the mapping is now donw in ndis_map_file() as expected.
- Made the typedef for 'driver_entry' explicitly include __stdcall
to silence gcc warning in ndis_load_driver().
NOTE: the Texas Instruments ACX111 driver needs firmware. With my
card, there were 3 .bin files shipped with the driver. You must
either put these files in /compat/ndis or convert them with
ndiscvt -f and kldload them so the driver can use them. Without
the firmware image, the NIC won't work.