Commit Graph

98881 Commits

Author SHA1 Message Date
Hartmut Brandt
4e0dea9a30 Don't confuse NULL and 0, use 0 where an integer is expected. 2004-01-27 10:46:33 +00:00
Hartmut Brandt
76bd585721 Style: add __FBSDID, relocate some { that were on the wrong line,
correct some indendation, change __FUNCTION__ to __func__ and remove
a local KASSERT definition.
2004-01-27 10:45:37 +00:00
Bill Paul
5d2b8edda2 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.
2004-01-27 09:08:12 +00:00
Bill Paul
307ca1d625 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.
2004-01-27 09:05:52 +00:00
Bill Paul
3f7266edd6 Implement NdisVirtualBufferAddress() and NdisVirtualBufferAddressSafe().
The RealTek 8180 driver seems to need this.
2004-01-27 08:10:34 +00:00
Bill Paul
215e951637 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.
2004-01-27 07:57:42 +00:00
Nate Lawson
e0ccb58ad9 Add TUNABLE_STR to make "hw.acpi.os_name" more correct. However, the call
to getenv_string() still doesn't work.
2004-01-27 06:07:09 +00:00
Nate Lawson
ba4594dccd 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).
2004-01-27 06:04:15 +00:00
David E. O'Brien
b7300254ae Discontinuation of an action that now fits on one. 2004-01-27 05:01:08 +00:00
Robert Watson
bfd8097a69 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.
2004-01-27 04:40:19 +00:00
Brooks Davis
8abaf58586 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.
2004-01-27 03:15:09 +00:00
Bill Paul
0a4ab0aeef Use the M_BZERO flag with malloc() in a couple of places. 2004-01-27 03:14:59 +00:00
Brooks Davis
a4fa9864bf 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.
2004-01-27 01:43:14 +00:00
Bruce A. Mah
37c2cbe308 Modified release note: Rewrite CVS update note to reflect reality
Submitted by:	nectar
2004-01-27 00:50:21 +00:00
Bill Paul
581b0a24bc 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.
2004-01-26 21:21:53 +00:00
Max Khon
71f4a30d59 Fix ~/.hushlogin handling.
PR:		61354
Submitted by:	Eugeny Grosbein <eugen (at) kuzbass.ru>
2004-01-26 20:04:47 +00:00
John Baldwin
96300f5dc8 *BANG* *BANG* *BANG* *BANG* *BANG* *BANG* *CLICK* *CLICK* *CLICK*
*BANG* *BANG* *BANG* *BANG* *BANG* *BANG* *CLICK* *CLICK* *CLICK*

Death to the stripped down BOOTMFS kernel for boot floppies and all the
cruft that goes along with it.
2004-01-26 20:02:01 +00:00
John Baldwin
c0731f81d3 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.
2004-01-26 19:58:38 +00:00
John Baldwin
18e5e37daa 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.
2004-01-26 19:45:09 +00:00
David E. O'Brien
a7aba49e2c 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>
2004-01-26 19:40:47 +00:00
John Baldwin
afa632035c - 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.

Reviewed by:	njl
2004-01-26 19:34:24 +00:00
John Baldwin
bbc2815c8d 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.

Reviewed by:	njl
2004-01-26 19:29:04 +00:00
Dag-Erling Smørgrav
3a59e89e73 Implement pam_sm_close_session().
PR:		bin/61657
Submitted by:	Joe R. Doupnik <jrd@cc.usu.edu>
2004-01-26 19:28:37 +00:00
Bruce A. Mah
7ea97ca1c9 New release note: SMBFS request signing [1].
Modified release notes:  Expand on ULE features [2], provide a further
clarification on CVS changes.

Submitted by:	tjr [1], jeffr [2]
2004-01-26 16:41:46 +00:00
Hartmut Brandt
3b3948e881 Get rid of the last two uses of NG_NODELEN + 1 in the base system by
replacing them with NG_NODESIZ.
2004-01-26 16:41:21 +00:00
Alex Dupre
ce7e8baded Add missing 'device ataraid' to support ATA software RAID.
Noticed by:	Dario Freni <saturnero@gufi.org>
Approved by:	blackend (mentor)
Reviewed by:	sos
2004-01-26 16:38:33 +00:00
Alexander Kabaev
1d38183672 Do not treat make variables as Perl variables. 2004-01-26 16:12:29 +00:00
Eivind Eklund
93a876df31 Xref kqueue and poll 2004-01-26 15:20:16 +00:00
Eivind Eklund
1633f3b5a2 Xref kqueue 2004-01-26 15:19:54 +00:00
Hartmut Brandt
bbee16c0b9 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.
2004-01-26 15:19:43 +00:00
Colin Percival
96e3efc09f Avoid dereferencing null pointers in fsck_ffs. (pfatal may return,
so it isn't a safe way of handling [mc]alloc failures.)

PR:		misc/61800
Approved by:	rwatson (mentor)
2004-01-26 15:05:30 +00:00
Hartmut Brandt
211326affc Get rid of the old *LEN constants in favour of the new *SIZ constants
that also include the trailing \0 byte.
2004-01-26 14:57:49 +00:00
Hartmut Brandt
46005fe0eb 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.
2004-01-26 14:54:39 +00:00
Hartmut Brandt
f5d15522f7 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.
2004-01-26 14:53:16 +00:00
Hartmut Brandt
2cafef3ea4 Declare a function to silence a warning. 2004-01-26 14:48:21 +00:00
Hartmut Brandt
81a4ef8131 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.
2004-01-26 14:46:35 +00:00
Hartmut Brandt
b1b70498ba Replace a call to bzero() with an M_ZERO flag. Replace the MALLOC() with
malloc().
2004-01-26 14:44:36 +00:00
Hartmut Brandt
4321c5077c The version in the type description must be the ABI version, not
the netgraph version.

Correct the return type of a function: it wants to return an error
code, so it cannot be void.
2004-01-26 14:14:09 +00:00
Hartmut Brandt
87e2c66a6a Get rid of the deprecated *LEN constants in favour of the new
*SIZ constants that include the trailing \0 byte.
2004-01-26 14:05:31 +00:00
Eivind Eklund
9220eb85cb Make a message less scary (based on user feedback) 2004-01-26 13:45:21 +00:00
Yaroslav Tykhiy
5eb4925c66 Document the interface method if_input(). 2004-01-26 12:51:00 +00:00
Dag-Erling Smørgrav
b14fa90f01 mdoc cleanup.
Submitted by:	ru
2004-01-26 12:50:30 +00:00
Maxim Sobolev
7735aeb9bb 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
2004-01-26 12:33:56 +00:00
Yoshihiro Takahashi
9c9fcfa30d Fixed some style bugs. 2004-01-26 12:28:40 +00:00
Hartmut Brandt
2c858ebee0 Get rid of the deprecated *LEN constants and use the new *SIZ
(that include the trailing \0) constants instead.
2004-01-26 12:24:07 +00:00
Maxim Sobolev
6e628b8187 (whilespace-only)
Kill trailing spaces.
2004-01-26 12:21:59 +00:00
Hartmut Brandt
f94e15b224 Add support for virtual interfaces. These have no phy chip and, hence, we
need to handle interfaces without phy specially.
2004-01-26 12:17:49 +00:00
Hartmut Brandt
33fb8dc930 Add a device type for virtual interfaces. 2004-01-26 12:13:11 +00:00
Yaroslav Tykhiy
dede2093e5 Clearly state that upon SIOCSIFFLAGS, ifp->if_flags is updated
at the common ifioctl() level.
2004-01-26 12:08:23 +00:00
Hartmut Brandt
6eadc70894 Add an ATM sub-type for virtual interfaces. 2004-01-26 11:52:32 +00:00