Commit Graph

112423 Commits

Author SHA1 Message Date
Warner Losh
711c07db68 Fix the support for the ax88[17]90 to print the right type, rather
than the generic ne-2000 string.  This should have no effect on the
actual support of the parts, just reporting what the part was.

Also, rename a few functins and symbols to reflect a more generic
part support that grew out of the early specific support.
2005-02-17 18:15:13 +00:00
Ruslan Ermilov
be2ff1d140 Make the on-disk format of .dat files produced by strfile(8)
architecture independent.  Besides the fixed-width types in
the header, the offsets are now stored as 64-bit off_t (also
in big endian format).

Tested on:	i386, amd64, sparc64, ia64
2005-02-17 18:06:37 +00:00
Herve Quiroz
f812d8f8c6 Add myself to the calendar 2005-02-17 16:38:56 +00:00
Lukas Ertl
3608f72533 In case of drive errors, don't close the associated consumer and
detach it, but instead let the geom wither away.

Bump copyright year.
2005-02-17 16:08:36 +00:00
Christian Brueffer
40dda406a4 Remove dublicated device entry from the synopsis.
Submitted by:	Ulrich Spoerlein <q@uni.de>
MFC after:	3 days
2005-02-17 16:01:20 +00:00
Robert Watson
1eb7608e00 Mark netatm and netnatm explicitly as requiring Giant, as they still do.
MFC after:	3 days
2005-02-17 14:21:22 +00:00
Robert Watson
1e8f89541e In accept1(), extend coverage of the socket lock from just covering
soref() to also covering the update of so_state.  While no other user
threads can update the socket state here as it's not yet hooked up to
the file descriptor array yet, the protocol could also frob the
socket state here, leading to a lost update to the so_state field.
No reported instances of this bug (as yet).

MFC after:      3 days
2005-02-17 13:00:23 +00:00
Robert Watson
280249a66a In sonewconn(), set the new socket's state to show the protocol-provided
connection status before inserting the new socket into the listen
socket's accept queue, or there might be a race in which another thread
wakes up when the accept lock is released, and sees the socket before its
state is set correctly.  The wakeup still occurs after the accept lock is
released.  There have been no diagnoses of this bug in real-world systems
(as yet).

MFC after:	3 days
2005-02-17 12:53:45 +00:00
Hartmut Brandt
5fdd47f89b Whitespace cleanup: substitute mixed tabs and spaces by canonical
whitespace and line up some variable definitions.
2005-02-17 12:35:32 +00:00
Hartmut Brandt
b2a8c56e3a Move error case to begin of if-else chain. Do not needless initialize
startc, but only at the place where the initialisation is needed. Remove
a needless else.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (partly)
2005-02-17 12:31:53 +00:00
Dag-Erling Smørgrav
b32a1f4405 Document the new default init_path.
Reminded by:	ru
MFC after:	2 weeks
2005-02-17 11:14:45 +00:00
Poul-Henning Kamp
4d8ac58b05 Introduce vx_wait{l}() and use it instead of home-rolled versions. 2005-02-17 10:49:51 +00:00
Poul-Henning Kamp
58aac12894 Convert KASSERTS to VNASSERTS 2005-02-17 10:28:58 +00:00
Dag-Erling Smørgrav
f3f4baf099 Add /rescue/init to the default init_path, before /stand/sysinstall.
MFC after:	2 weeks
2005-02-17 10:00:10 +00:00
Hartmut Brandt
3ff4a47ba0 Fix two typos in comments.
Submitted by:	ru & Max Okumoto <okumoto@ucsd.edu>
2005-02-17 09:09:34 +00:00
Hartmut Brandt
768820f8c7 Sort out the error case that a single '$' was passed a little bit
earlier instead of mixing its handling with other cases.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-17 09:01:19 +00:00
Pyun YongHyeon
a94f16f4fa Fix inteface clear time. pf printed "Thu Jan 1 09:00:01 1970"
in "pfctl -vvsI" output when pf was statically linked to kernel.

Discussed with:	mlaier
2005-02-17 03:36:31 +00:00
Nate Lawson
ededc31dd1 The correct error value for not having enough storage is E2BIG, not
ENOMEM.  The manpage and ichss(4) are correct.
2005-02-17 01:02:58 +00:00
Nate Lawson
6655857ec7 Fix the check for acpi_perf(4) so that we verify if it is fully attached
or just offering info.  In the former case, we don't probe/attach to allow
the ACPI driver precedence.  A refinement of this would be to actually
use the info provided by acpi_perf(4) to get the real CPU clock rates
instead of estimating them but since all systems that support both
acpi_perf(4) and ichss(4) export the control registers to acpi_perf(4),
it can just handle the registers on its own.
2005-02-17 01:01:40 +00:00
Marius Strobl
eab1708c9e UltraSparc II[e,i] based systems come up with the tick compare register
loaded, the tick interrupt enabled and a handler that resets the tick
counter on every tick interrupt. While this isn't documented this can
cause DELAY() to wait for a value the tick counter will not reach when
used in early boot, i.e. before cpu_initclocks() is called, depending
on when in the cycle DELAY() is called, the delay value and the value
the tick compare register is set to. The excessive use of DELAY() in
uart(4) when probing Sun keyboards seems to always manage to trigger
this, resulting in a hang during boot.
Disable the tick interrupt in tick_init(), which is called early in
sparc64_init(), until the interrupt is enabled again in tick_start(),
called by cpu_initclocks(), with our own handler. This fixes the hang
during probing Sun keyboards on AXi boards and Ultra 10, with other
machines like Ultra 5 probably being affected but not tested.

Additional testing by:	Matthias Muthmann
MFC after:		1 week
2005-02-17 00:13:49 +00:00
Justin T. Gibbs
cb29ab3392 aic79xx.c:
aic7xxx.c:
	Allow print_reg() to be called with a NULL column.

aic79xx.c:
	Correct new usage of SCB_GET_TAG().

aic7xxx.c:
	Fix stray ahd that snuck in here.
2005-02-16 23:13:38 +00:00
Pawel Jakub Dawidek
07b9f1becd Fix year in copyrights. 2005-02-16 22:26:34 +00:00
Pawel Jakub Dawidek
6201b4ec28 Copyright year update. 2005-02-16 22:24:15 +00:00
Pawel Jakub Dawidek
fa30f3b293 Fix year in copyrights. 2005-02-16 22:19:13 +00:00
Pawel Jakub Dawidek
0218292cdf Update copyright in files changed this year. 2005-02-16 22:14:52 +00:00
Pawel Jakub Dawidek
99394c59ae Fix year in copyrights. 2005-02-16 22:13:22 +00:00
Bosko Milekic
8076cb5289 Well, it seems that I pre-maturely removed the "All rights reserved"
statement from some files, so re-add it for the moment, until the
related legalese is sorted out.  This change affects:

sys/kern/kern_mbuf.c
sys/vm/memguard.c
sys/vm/memguard.h
sys/vm/uma.h
sys/vm/uma_core.c
sys/vm/uma_dbg.c
sys/vm/uma_dbg.h
sys/vm/uma_int.h
2005-02-16 21:45:59 +00:00
Bill Paul
2b0dcd6b18 Remove redundant label. 2005-02-16 21:24:04 +00:00
Ruslan Ermilov
c769f664c9 Generate locale-agnostic configuration date. 2005-02-16 21:02:50 +00:00
Ruslan Ermilov
e7b3b699a2 Define PLATFORM correctly when cross-building. 2005-02-16 20:55:47 +00:00
Bosko Milekic
500f29d06e Make UMA set the overloaded page->object back to kmem_object for
UMA_ZONE_REFCNT and UMA_ZONE_MALLOC zones, as the page(s) undoubtedly
came from kmem_map for those two.  Previously it would set it back
to NULL for UMA_ZONE_REFCNT zones and although this was probably not
fatal, it added MORE code for no reason.
2005-02-16 20:06:11 +00:00
Bill Paul
513c5292f8 Fix freeing of custom driver extensions. (ExFreePool() was being
called with the wrong pointer.)
2005-02-16 19:21:07 +00:00
Bill Paul
ef7012e1fc Re-staticize a few functions I un-staticized for debugging purposes
on amd64 and accidentally forgot to put back. (Have I mentioned that
gdb on amd64 needs work? It does. Boy howdy.)
2005-02-16 18:37:14 +00:00
Bill Paul
2adbfd5436 KeAcquireSpinLockRaiseToDpc() and KeReleaseSpinLock() are (at least
for now) exactly the same as KfAcquireSpinLock() and KfReleaseSpinLock().
I implemented the former as small routines in subr_ntoskrnl.c that just
turned around and invoked the latter. But I don't really need the wrapper
routines: I can just create an entries in the ntoskrnl func table that
map KeAcquireSpinLockRaiseToDpc() and KeReleaseSpinLock() to
KfAcquireSpinLock() and KfReleaseSpinLock() directly. This means
the stubs can go away.
2005-02-16 18:18:30 +00:00
Justin T. Gibbs
05899a48a7 On Rev. B silicon, we disabled the enhanced busfree detection logic to
close holes in detecting busfrees that occur after a packetized target
transitions to a non-packetized phase.  The most common case where this
occurs is when a target is externally reset so the controller believes
a packetzied negotiation agreement is still in effect.  Unfortunately,
disabling this feature seems to cause problems for the 7901B.  Re-enable
ehanced busfree detection for this part until I can get my hands on a
samble to figure out if the old workaround is necessary and, if so, how
to make it work correctly.
2005-02-16 18:16:35 +00:00
Justin T. Gibbs
3db6c642f5 MF5S: Explicitly initialize timedout_scb lists, use SCB_TAG for all access
to the hardware_scb->tag field, limit max lun reported to CAM to 63,
      return after a panic to silence a warning.
2005-02-16 18:09:41 +00:00
Hartmut Brandt
46f05faa3a Mostly stylistic issues: move a variable into local scope, make
condition positive and fix long lines.

Submitted by:	Max Okumoto <okumoto@ucsd.edu>
2005-02-16 17:20:09 +00:00
Pawel Jakub Dawidek
ccbef85dd0 Remove mutex asserion from g_gate_find(). We don't want g_gate_list_mtx
mutex to be held here, because we want speed here.
2005-02-16 16:13:56 +00:00
Pawel Jakub Dawidek
f906581296 Remove TDP_GEOM flag from thread after ggate device creation.
This flag means "wait for all pending requests before returning to userland".
There are pending events for sure, because we just created new provider and
other classes want to taste it, but we cannot answer on I/O requests until
we're here.
2005-02-16 16:12:28 +00:00
Gleb Smirnoff
848a25c773 Remove a recursion protection, which we inherited from splnet() netgraph times.
Now several threads may write data to ng_ksocket. Locking of socket is done in
sosend().

Reviewed by:	archie, julian, rwatson
MFC after:	2 weeks
2005-02-16 16:00:35 +00:00
Dag-Erling Smørgrav
55cf7be1ab Fix a memory leak: when freeing the connection structure, don't forget to
free the connection buffer as well.

PR:		bin/76153
MFC after:	1 week
2005-02-16 12:46:46 +00:00
Hartmut Brandt
5e431bae8f Better version of the patch in 1.117: bring a variable into local scope
to prepare for function splitting and slightly reorganise the code
in anticipation of Var_Subst returning a Buffer.

Submitted by:	Max Okumoto <okumoto@ucsd.edu> (with slight changes)
2005-02-16 12:39:32 +00:00
Yaroslav Tykhiy
f9036ce6dc Add some consistency checks to the signal-related code.
MFC:	along with rev. 1.202
2005-02-16 11:35:51 +00:00
Yaroslav Tykhiy
91ae77792e A call to maskurg() makes sense only when a transfer is under way,
the function will emit an annoying log message otherwise.

Reported by:	kris
MFC:		along with rev. 1.202
2005-02-16 11:22:20 +00:00
David E. O'Brien
c82b8ff04f va_list style tweaks 2005-02-16 06:48:35 +00:00
Warner Losh
8e325e2991 On second though, print the OUI, model and revision. This is the same
information that's in the id1 and id2 fields we were using, but is in
a form that the drivers will be using in their matching routines.
2005-02-16 05:56:39 +00:00
Bill Paul
d8f2dda739 Add support for Windows/x86-64 binaries to Project Evil.
Ville-Pertti Keinonen (will at exomi dot comohmygodnospampleasekthx)
deserves a big thanks for submitting initial patches to make it
work. I have mangled his contributions appropriately.

The main gotcha with Windows/x86-64 is that Microsoft uses a different
calling convention than everyone else. The standard ABI requires using
6 registers for argument passing, with other arguments on the stack.
Microsoft uses only 4 registers, and requires the caller to leave room
on the stack for the register arguments incase the callee needs to
spill them. Unlike x86, where Microsoft uses a mix of _cdecl, _stdcall
and _fastcall, all routines on Windows/x86-64 uses the same convention.
This unfortunately means that all the functions we export to the
driver require an intermediate translation wrapper. Similarly, we have
to wrap all calls back into the driver binary itself.

The original patches provided macros to wrap every single routine at
compile time, providing a secondary jump table with a customized
wrapper for each exported routine. I decided to use a different approach:
the call wrapper for each function is created from a template at
runtime, and the routine to jump to is patched into the wrapper as
it is created. The subr_pe module has been modified to patch in the
wrapped function instead of the original. (On x86, the wrapping
routine is a no-op.)

There are some minor API differences that had to be accounted for:

- KeAcquireSpinLock() is a real function on amd64, not a macro wrapper
  around KfAcquireSpinLock()
- NdisFreeBuffer() is actually IoFreeMdl(). I had to change the whole
  NDIS_BUFFER API a bit to accomodate this.

Bugs fixed along the way:
- IoAllocateMdl() always returned NULL
- kern_windrv.c:windrv_unload() wasn't releasing private driver object
  extensions correctly (found thanks to memguard)

This has only been tested with the driver for the Broadcom 802.11g
chipset, which was the only Windows/x86-64 driver I could find.
2005-02-16 05:41:18 +00:00
Garance A Drosehn
5cc540d471 Change /bin/sh so *it* implements the processing needed for scripts to
work as expected when they have a "shebang line" of:

     #!/bin/sh -- # -*- perl -*- -p

This specific line is recommended in some perl documentation, and I think
I've seen similar lines in documentation for ruby and python.  Those
write-ups expect `sh' to ignore everything after the '--' if the first
thing after the '--' is a '#'.  See chapter 19, "The Command-Line Interface"
in 3rd edition of "Programming Perl", for some discussion of why perl
recommends using this line in some circumstances.

The above line does work on solaris, irix and aix (as three data points),
and it used to work on FreeBSD by means of a similar patch to execve().
However, that change to execve() effected *all* shells (which caused
other problems), and that processing was recently removed.

PR:		16393  (the original request to fix the same issue)
Reviewed by:	freebsd-current (looking at a slightly different patch)
MFC after:	1 week
2005-02-16 05:17:58 +00:00
Paul Saab
7776346f83 Fix for a SACK (receiver) bug where incorrect SACK blocks are
reported to the sender - in the case where the sender sends data
outside the window (as WinXP does :().

Reported by:	Sam Jensen <sam at wand dot net dot nz>
Submitted by:	Mohan Srinivasan
2005-02-16 01:46:17 +00:00
Warner Losh
aa4c3a8cd3 Add location and PNP info to the mii bus 2005-02-16 01:08:43 +00:00