Hartmut Brandt [Tue, 27 Jan 2004 10:45:37 +0000 (10:45 +0000)]
Style: add __FBSDID, relocate some { that were on the wrong line,
correct some indendation, change __FUNCTION__ to __func__ and remove
a local KASSERT definition.
Bill Paul [Tue, 27 Jan 2004 09:08:12 +0000 (09:08 +0000)]
This should have been checked in as part of the last update to if_ndis.c:
add yet another member to the ndis_softc as part of the workaround for
the net80211 dain bramage.
Bill Paul [Tue, 27 Jan 2004 09:05:52 +0000 (09:05 +0000)]
Some Windows .INF files are deliberately sabotaged to prevent them from
loading on a particular version of Windows. For example, a .INF file
for a Windows 2000 driver may have an empty [foo.NT.5.1] section which
will be ingored on Win2K (whose .INF parser won't look for sections
decorated with .NT.5.1) in favor of a [foo] section. Likewise, a
WinXP file will have an empty [foo] section which will be ignored in
favor of [foo.NT.5.1].
The problem is, we can handle both Win2K and WinXP drivers, and we
don't want to exclude either one.
As a workaround, we try to pretend we are WinXP by default and search
for sections decorated with .NT.5.1, but if we don't turn up any records,
we assume that maybe we're being fooled by a sabotaged .INF file and
make one more pass looking for undecorated sections instead.
This allows us to parse the .INF files for both the Win2K and the WinXP
Centrino wireless drivers.
I'd give anything for 5 minutes alone in a room with whoever wrote
Microsoft's .INF file parser. Just 5 minutes. That's all.
Bill Paul [Tue, 27 Jan 2004 07:57:42 +0000 (07:57 +0000)]
Add a kludge to avoid having ndis_init() called needlessly by dhclient
on an SIOCSIFADDR (by way of brain damage in net80211).
Also, avoid trying to set NDIS_80211_AUTHMODE_AUTO since the Microsoft
documentation I have recommends not using it, and the Centrino driver
seems to dislike being told to use it.
Nate Lawson [Tue, 27 Jan 2004 06:04:15 +0000 (06:04 +0000)]
Document my adventures in newbus land. Clarify some examples, especially
that count is in bytes, not bits. There are some drivers that I think make
this mistake. (I've seen counts of 16 in the tree).
Robert Watson [Tue, 27 Jan 2004 04:40:19 +0000 (04:40 +0000)]
Stick two XXX's in the syscall() code: we call STOPEVENT() twice for
every system call, and that grabs and release the process lock each
time. Don't fix it (yet), but document it so we know to fix it.
Also should be a 5.3-RELEASE todo item.
Brooks Davis [Tue, 27 Jan 2004 03:15:09 +0000 (03:15 +0000)]
Clean up macro usage in if_attach():
- Use the system offsetof macro rather then making out own.
- undef ROUND after we use it rather then polluting the whole file.
Brooks Davis [Tue, 27 Jan 2004 01:43:14 +0000 (01:43 +0000)]
Use IFNAMSIZ instead of a magic value for the length of an interface
name.
Prevent the kernel from potentially overflowing the interface name
variable. The size argument of strlcpy is complex because the name is
not null-terminated in sdl_data.
Bill Paul [Mon, 26 Jan 2004 21:21:53 +0000 (21:21 +0000)]
Reorganize the timer code a little and implement NdisInitializeTimer()
and NdisCancelTimer(). NdisInitializeTimer() doesn't accept an NDIS
miniport context argument, so we have to derive it from the timer
function context (which is supposed to be the adapter private context).
NdisCancelTimer is now an alias for NdisMCancelTimer().
Also add stubs for NdisMRegisterDevice() and NdisMDeregisterDevice().
These are no-ops for now, but will likely get fleshed in once I start
working on the Am1771/Am1772 wireless driver.
John Baldwin [Mon, 26 Jan 2004 19:58:38 +0000 (19:58 +0000)]
Overhaul our boot floppy generation system so that it scales better and
requires minimal care and feeding for future releases.
- Consolidate multitude of floppy related constants down to a normal
FLOPPY set for 1.44 floppies and on PC98 a SMALLFLOPPY set for 1.2
floppies. Also, cleanup the i386 arch section by not duplicating
constants that are the same on both machine types (i386 and pc98).
- Update the ZIPNSPLIT macro to generate a file chunks that will actually
fit onto 1.44 floppies formatted with UFS1. Unfortunately, split(1)
seems to be somewhat buggy, so the files generated are slightly larger
than the argument passed to split.
- Split the release.10 target into 3 targers: floppies.1, floppies.2 and
floppies.3 that are added to EXTRAS only if NOFLOPPIES is defined.
floppies.1 builds the install floppies, floppies.2 builds the fixit
floppy, and floppies.3 generates the md5 sums and READMEs for the
floppies/ directory.
- Drop the by now largely obsolete and less useful boot.flp picture. This
was more useful when the mfsroot lived inside the kernel rather than
being loaded from a separate file by the loader.
- Only build a single mfsroot containing no modules that is used for all
installation methods.
- Use split-file.sh to split up a gzipped GENERIC kernel into however many
floppies it takes for the boot kernel. Currently, a stock 5.2 GENERIC
kernel including WITNESS, INVARIANTS, DDB, and other assorted bloat fits
onto 2 additional floppies besides the boot floppy with some room to
spare.
- If SPLIT_MFSROOT is defined, the mfsroot.gz file is similar split into
however many floppies are needed. Currently it is not defined as the
mfsroot.gz fits onto the current boot.flp with room to spare.
- Add a 'makeFloppySet' target which builds a floppy set for a file that
was split using split-file.sh.
- Rename the doMFSKERN target to 'buildBootFloppy' as that more closely
matches what it does now. We no longer build a custom BOOTMFS kernel for
each boot floppy.
- We no longer build a 2.88 boot.flp image to use with emulated CD booting.
The non-emulated cdboot works for almost everyone who boots off of CD and
if it doesn't work on a particular machine, the user can always boot from
the 1.44 floppy images.
- We no longer build a driver floppy or stick kernel modules in the mfsroot
since we now use a stock kernel when booting from floppy.
John Baldwin [Mon, 26 Jan 2004 19:45:09 +0000 (19:45 +0000)]
Add a script to split a single file up into chunks using split along with
a list file suitable for use with libstand's splitfs filesystem. The first
chunk of the file is 16k and has an extension of '.boot' and is meant to be
placed on the boot floppy. This is required because the current
implementations of gzipfs and bzipfs in libstand want to read in the header
of the file each time it is opened.
David E. O'Brien [Mon, 26 Jan 2004 19:40:47 +0000 (19:40 +0000)]
The problem Makefile rev 1.70 and fbsd-kgdb-i386.h rev 1.4 fixed is that
GDB was using the instruction pointer for 'calltrap', rather than the
infinitely more useful instruction pointer where the trap occurred.
Submitted by: Peter Edwards <pmedwards@eircom.net>
John Baldwin [Mon, 26 Jan 2004 19:34:24 +0000 (19:34 +0000)]
- Call acpi_Startup() before parsing interrupt-related APIC resources so we
can look at the ACPI tables. If the startup fails, we panic and tell the
user to try rebooting with ACPI disabled. Previously in this case we
would try to use $PIR interrupt routing which only works for the atpic
while using the apic to handle interrupts which would result in misrouted
interrupts and a hang at boot time with no error message.
- Read the SCI out of the FADT instead of hardcoding 9 when checking to see
if an interrupt override entry is for the SCI.
- Try to work around some BIOS brain damage for the SCI's programming by
forcing the SCI to be level triggered and active low if it is routed
to a non-ISA interrupt (greater than 15) or if it is identity mapped with
edge trigger and active high polarity. This should fix some of the hangs
with device apic and ACPI that some people see.
John Baldwin [Mon, 26 Jan 2004 19:29:04 +0000 (19:29 +0000)]
Move the code to initialize ACPI-CA into a separate acpi_Startup() function
that other modules can call to initialize ACPI-CA before the new-bus probe
and change acpi_identify() to call it.
Hartmut Brandt [Mon, 26 Jan 2004 15:19:43 +0000 (15:19 +0000)]
Replace deprecated NG_NODELEN with the new NG_NODESIZ. There is one
problem here still to be solved: the sockaddr_hci has still a 16 byte
field for the node name. The code currently does not correctly use the
length field in the sockaddr to handle the address length, so
node names get truncated to 15 characters when put into a sockaddr_hci.
Hartmut Brandt [Mon, 26 Jan 2004 14:54:39 +0000 (14:54 +0000)]
Define the new command NGM_SOURCE_START_NOW to allow generation of
traffic for non-ethernet hooks. This commit should have been packaged
with the commit to ng_source.c.
Hartmut Brandt [Mon, 26 Jan 2004 14:53:16 +0000 (14:53 +0000)]
Make ng_source to work with non-ethernet interfaces. We do this by
introducing a START_NOW command. This command does not send
and GET_IFINDEX message downstream (to wait for the response from
the ETHERNET node), but directly starts the sending process. This allows
one to generate traffic as input for any hook on any node.
Hartmut Brandt [Mon, 26 Jan 2004 14:46:35 +0000 (14:46 +0000)]
Should use the non-locking versions of the ifqueue macros to
fiddle around with private queues, because their mutex is not
needed. All this processing should be protected by the netgraph
locking.
Maxim Sobolev [Mon, 26 Jan 2004 12:33:56 +0000 (12:33 +0000)]
Add support for WCCPv2. It should be enablem manually using link2
ifconfig(8) flag since header for version 2 is the same but IP payload
is prepended with additional 4-bytes field.
Inspired by: Roman Synyuk <roman@univ.kiev.ua>
MFC after: 2 weeks
Hartmut Brandt [Mon, 26 Jan 2004 10:28:31 +0000 (10:28 +0000)]
Update the upgrade instructions to account for the fact, that
there is no need anymore to re-create files. Also give a hint to
look for changes needed to the Makefiles.
Bill Paul [Mon, 26 Jan 2004 08:36:18 +0000 (08:36 +0000)]
Avoid possible panic on shutdown: if there are still some devices
attached when shutting down, kill our kthreads, but don't destroy
the mutex pool and uma zone resources since the driver shutdown
routine may need them later.
Stephen McKay [Mon, 26 Jan 2004 04:27:22 +0000 (04:27 +0000)]
Use malloc() instead of alloca() to allocate a (potentially) large buffer
for storing the "diff -n" output. Some files (eg ports/INDEX,v) are too
big nowadays to fit on the stack.
Submitted by: Stephen Montgomery-Smith <stephen@math.missouri.edu>
Ian Dowse [Mon, 26 Jan 2004 00:46:46 +0000 (00:46 +0000)]
Be much more strict about parsing tagged log messages from /dev/klog;
if the line doesn't match ^<%d>, then treat it as a regular kernel
printf line. Previously if a kernel printf message started with "<"
it would be interpreted as a log message, often with LOG_EMERG
level. This was triggered by some printfs in sys/dev/aic7xxx/, and
can also happen with the partial lines that result if syslogd cannot
keep up with the rate of arrival of kernel messages.
Mathew Kanner [Sun, 25 Jan 2004 22:46:22 +0000 (22:46 +0000)]
Fix a panic in dsp_clone when trying to access a sound
device that doesn't exists. I'm using my discretion and
committing without mentor approval since Seigo is away.
Doug Ambrisko [Sun, 25 Jan 2004 19:52:16 +0000 (19:52 +0000)]
- Existing code would ignore pccard_ether_delay when more then 9 seconds
- If there was an exiting dhclient running on the same interface as the
new iface that left and returned then dhclient would be told to use the
same interface twice. Dhclient would fail and exit after getting
confused. Use "sort -u" on them to ensure no duplicates.
This is a mostly a race condition on suspend and resume and how things
happen to occur.
- Check for netmask being set on an interface rather then up. An interface
can be up but not configured.
Ruslan Ermilov [Sun, 25 Jan 2004 12:28:36 +0000 (12:28 +0000)]
Fixed a bug that previous revision has introduced -- we missed
the double quotes ("" and '') as a separate argument.
Reported by: ache
The fix in this and previous revisions combined is functionally
equivalent to the below patch against rev. 1.27 but the code is
now much easier to follow:
I don't normally use my middle name, so remove it from attributions in
man pages (though not from copyright notices). While I'm here, add email
addresses where appropriate.
Martin Blapp [Sun, 25 Jan 2004 11:30:50 +0000 (11:30 +0000)]
Dhclient dumps core on suspend/resume cycles. If the client isn't active
then we need to go to the reboot state or in state_bound it will core on
the de-reference of client -> active -> options since client -> active = NULL.
Maxim Sobolev [Sun, 25 Jan 2004 09:59:16 +0000 (09:59 +0000)]
Move LongRun support out of identcpu.c, where it hardly belongs, into its
own file and make it opt-in, not mandatory, depending on CPU_ENABLE_LONGRUN
config(8) option.
Maxim Sobolev [Sun, 25 Jan 2004 09:59:15 +0000 (09:59 +0000)]
Move LongRun support out of identcpu.c, where it hardly belongs, into its
own file and make it opt-in, not mandatory, depending on CPU_ENABLE_LONGRUN
config(8) option.
Jeff Roberson [Sun, 25 Jan 2004 08:04:45 +0000 (08:04 +0000)]
- Now that both schedulers support temporary cpu pinning use this rather
than the switchin functions to guarantee that we're operating with the
correct tlb entry.
- Remove the post copy/zero tlb invalidations. It is faster to invalidate
an entry that is known to exist and so it is faster to invalidate after
use. However, some architectures implement speculative page table
prefetching so we can not be guaranteed that the invalidated entry is still
invalid when we re-enter any of these functions. As a result of this we
must always invalidate before use to be safe.
Jeff Roberson [Sun, 25 Jan 2004 07:47:57 +0000 (07:47 +0000)]
- Compile 4BSD in LINT since ULE will be tested by GENERIC kernel builds.
- Fix the formatting on the ULE options line, I didn't notice that a space
was used normally.