Provide our own FPSWA definitions, instead of depending on the Intel
EFI headers and put them all in <machine/fpu.h>. The Intel EFI headers
conflict with the Intel ACPI headers (duplicate type definitions), so
are being phased out in the kernel.
Bruce M Simpson [Fri, 17 Sep 2004 19:54:26 +0000 (19:54 +0000)]
Fix compiler warnings, when __stdcall is #defined, by adding explicit casts.
These normally only manifest if the ndis compat module is statically
compiled into a kernel image by way of 'options NDISAPI'.
The early-adopter doesn't exist in HEAD anymore. The source is there,
but it's disconnected from the build. Remove it from the architecture
independent release documentation set, because it breaks "make release"
when NODOC is undefined.
Warner Losh [Fri, 17 Sep 2004 18:50:38 +0000 (18:50 +0000)]
The long dead hand of the past has pushed forward useless bits in this
driver. Trim its fingernails by removing some useless bits before
fixing the 'thread not terminated on detach' problem.
o dmacnt is no longer used now that we allocate at attach time. Remove
it from struct fdc_data.
o ISPNP was only ever set, but never tested. It used to be used for the
allocation routines to change how it allocated resources. Since that's
no longer necessary, retire the flag.
o ISPCMICA was only ever tested, but never set. GC it. This removes
a special case in determining the drive type. The drive type is
now set in fdc_pcmcia.c, so the hack isn't needed anymore. Sadly,
this isn't tested with a Y-E Data pcmcia floppy drive because there
are a number of other issues that preclude it from working.
o Fix ifdef for reading from the rtc. I'm of the opinion that this ifdef
should be moved into fdc_isa.c, but not today as ideally there'd be
other fixes to the probing of children. So now we just read it on
i386 ! pc98 (there's no #define for MACHINE_ARCH, just MACHINE, hence
this slightly inelegant kludge) and amd64. The PC98 exclusion likely
isn't meaningful since pc98 uses a different driver, but will be when
merging of the pc98 floppy code into this driver is complete (this is the
other reason I think this block of code belongs outside fdc.c).
Teach swap1 script how to remove added swap devices on system shutdown.
Without this change, if one had a swap-on-mirror configuration, gmirror
will rebuild mirror component(s) on boot, because they are dirty (they
were open on shutdown).
Ruslan Ermilov [Fri, 17 Sep 2004 09:17:33 +0000 (09:17 +0000)]
Pass the idea of the make(1) binary to use down to newvers.sh.
This is necessary so source upgrades use the correct binary.
MFC after: 3 days
For the record: Problem spotted by Scott Long, who mentioned
that source upgrades from 4.7 to recent 5.x and 6.0 are broken.
Detailed analysis shows that 4.7 has a broken make(1) binary.
A breakage was fixed in RELENG_4 in make/main.c,v 1.35.2.7 by
imp@, though the commit log erroneously stated "MFC 1.68"
while in fact it should have been spelled as "MFC 1.67".
- Show all commands in usage, even if those commands are not available.
- When command is not available, just say it, instead of says, that command
is unknown. Old behaviour seems to be too confusing.
David Schultz [Fri, 17 Sep 2004 05:15:33 +0000 (05:15 +0000)]
Further refine some #ifs:
- Simplify the logic by using __GNUC_PREREQ__.
Suggested by stefanf.
- Make math.h compile with old (pre-8.0) versions of icc.
Submitted by sf [sic].
Bill Paul [Fri, 17 Sep 2004 04:58:17 +0000 (04:58 +0000)]
Commit patch to supress spurious link change events. Apparently, with
copper NICs, a link change event is posted whenever MII autopolling is
toggled off and on, which happens whenever someone calls
bge_miibus_readreg() or bge_miibus_writereg() to access the PHY
registers. This means anytime someone called the SIOCGIFMEDIA ioctl
on a bge interface, the link would reset. Even a simple "ifconfig bge0"
would do it, though other apps like dhclient or the PPPoE daemon could
trigger it as well. An obvious symptom of this problem is lots of
"bgeX: gigabit link up" messages appearing on the console for no
apparent reason.
Through experimentation, I determined that when a real link change
event occurs, the BGE_MIMODE_AUTOPOLL in the BGE_MI_MODE register
is always set, so now if we have a copper NIC and an link change
event occurs and the BGE_MIMODE_AUTOPOLL bit is clear, we ignore
the event.
Note that this does not apply to the original BCM5700 chip since we
use a different method for sensing link changes with that chip (the
status block method was broken), nor to fiber optic NICs since they
don't use the GMII PHY access registers.
Tim Kientzle [Fri, 17 Sep 2004 04:39:07 +0000 (04:39 +0000)]
Fix two ugly errors:
1. The correct cutoff for large uid/gid handling is 1<<18, not 1<<20.
2. Limit the uid/gid in the 'x' extension header (where numeric extensions
are not permitted) to 1<<18, but use the correct value in the regular
header (where numeric extensions are permitted).
Thanks to: Dan Nelson
MFC after: 3 days
Handle _FDE results of 5 bytes (vs. 5 uint32_t's). BIOS vendors find yet
another way to misinterpret the spec. Also, always fall back to the hints
probe on any attach failure, not just when _FDE fails.
Max Laier [Fri, 17 Sep 2004 02:15:05 +0000 (02:15 +0000)]
Break out altq_enable/disable from DIOC{START,STOP}ALTQ into seprate
functions that can be called from enable/disable pf as well. This improves
switching from non-altq ruleset to altq ruleset (and the other way 'round)
by a great deal and makes pfctl act like the user would except it to.
- Make md(4) 64-bit clean.
After this change it should be possible to use very big md(4) devices.
- Clean up and simplify the code a bit.
- Use humanize_number(3) to print size of md(4) devices.
- Add 't' suffix which stands for terabyte.
- Make '-S' to really work with all types of devices.
- Other minor changes.
There is no need to keep 'npage' value inside our softc structure,
it is only used in one function. While doing so, change its type to
vm_ooffset_t.
We are still limited for swap-backed devices to 16TB on 32-bit architectures
where PAGE_SIZE is 4096 bytes.
Andre Oppermann [Thu, 16 Sep 2004 18:33:39 +0000 (18:33 +0000)]
Fix an out of bounds write during the initialization of the PF_INET protocol
family to the ip_protox[] array. The protocol number of IPPROTO_DIVERT is
larger than IPPROTO_MAX and was initializing memory beyond the array.
Catch all these kinds of errors by ignoring protocols that are higher than
IPPROTO_MAX or 0 (zero).
Ignore leading '_' in model name returned by devices.
This make "_NEC" devices appear as "NEC" which is more corrent.
The reason is tha NEC originally screwed up on the byteorder in the
model string, so now that they have realized that they prefixed the '_'
so that not every ATA driver on the planet would call them "EN C" :)
Warner Losh [Thu, 16 Sep 2004 06:34:00 +0000 (06:34 +0000)]
Reserve the DMA memory at attach time, rather than at use. While
reserving it at use time is more miserly, low memory (< 16MB)
evaporates quickly on many systems, so there may not be any suitable
buffers available. This specifically doesn't use the newer, fancier
isa_dma_init to ease merging to 5.
Scott Long [Thu, 16 Sep 2004 02:37:40 +0000 (02:37 +0000)]
If the timeout handler runs and notices that commands are timed out, check
the firmware status register on the card to see if the firmware is still
running. There is no way to recover from this, but at least it can give
a hint as whether the car has crashed (which happens all too often).
Warner Losh [Thu, 16 Sep 2004 01:51:21 +0000 (01:51 +0000)]
For the moment, treat failures to attach floppy drives as non-fatal
errors for the attachment process for the floppy controller. This is
a band-aide because it doesn't try any of the fallback methods when
_FDE isn't long enough, but should be sufficient for people
experiencing the dreaded mutex not initialized panic.
Peter Wemm [Thu, 16 Sep 2004 01:41:11 +0000 (01:41 +0000)]
Update path to c++ internals includes for the 3.4 location.
No longer use make -k since the libraries target should build now.
Remove hacks for gnu/lib/libregex.
Backout the code which tries to use undocumented way to determine if
fm801 has sound capabilities or not. Unfortunately this code doesn't
work as expected.
Fix breakpoint handling for i386.
not sure yet about 5.x... MFC if needed.
Also fixes small problems with examining some registers and
some specific gdb transfer problems.
As the patch says:
This is not a pretty patch and only meant as a temporary
fix until a better solution is committed.
Andre Oppermann [Wed, 15 Sep 2004 20:13:26 +0000 (20:13 +0000)]
Remove the last two global variables that are used to store packet state while
it travels through the IP stack. This wasn't much of a problem because IP
source routing is disabled by default but when enabled together with SMP and
preemption it would have very likely cross-corrupted the IP options in transit.
The IP source route options of a packet are now stored in a mtag instead of the
global variable.