Commit Graph

115583 Commits

Author SHA1 Message Date
Marius Strobl
3b8c3ece32 - Sprinkle some KBD_IS_* and KBD_*_DONE macros in sunkbd_configure() as
a band-aid allowing to call this function savely multiple times, e.g.
  during sckbdprobe() and sc_probe_unit(). Otherwise calling it a second
  time results in a non-working keyboard. This needs a lot of more work
  to actually do the right thing and work like expected.
- Let sunkbd_configure() return the number of the found keyboards, i.e.
  1 in case probing succeeds, as it's expected. The return values of the
  keyboard configure functions however currently aren't checked so this
  doesn't make a difference at the moment.
- Use FBSDID.
2005-05-21 20:26:30 +00:00
Marius Strobl
a831ab3810 - MFpowerpc: sys/powerpc/powerpc/nexus.c rev. 1.7 (partial)
Use bus_generic_probe() and add a bus_add_child() interface method to
  allow device drivers to use the identify method to add themselves if
  need be (e.g. syscons(4)).
- Use FBSDID.
2005-05-21 20:19:27 +00:00
Marius Strobl
820992ecfd - Make sure that the OFW address properties that are going to be decode
consist of the expected number of address and size cells (we can't use
  dynamic arrays here because at the point in the boot process when this
  code is used malloc() doesn't work, yet). This fixes a Fast Data Access
  MMU Miss when uart(4) (erroneously) calls OF_decode_addr() to decode
  the address of PS/2 keyboards. PS/2 keyboards use a different and also
  undocumented scheme at the first parent node than mapping at 'ranges'
  properties. It's however not worth implementing that other scheme and
  actually also fits atkbdc(4) better to just start at the first parent
  node of PS/2 keyboards which is the 8042 controller (I have atkbdc(4)
  working that way).
- Use FBSDID.

MFC after:	1 month
2005-05-21 20:17:01 +00:00
Marius Strobl
912dd06aed For sparc64 conditionalize the compilation of the gfb_cursor() variant
which doesn't assume a hardware cursor on __sparc64__ rather than on
DEV_CREATOR. If we want to include more than one framebuffer driver in
e.g. the GENERIC kernel all drivers have to work the same way. Now that
DEV_CREATOR is no longer used remove it from options.sparc64.
2005-05-21 20:15:14 +00:00
Tim Kientzle
b33c1067f8 Start to address the race issue between restoring a file's contents
and restoring the metadata.  In particular, the metadata-restore
functions now all accept a file descriptor and a pathname.  If the
file descriptor is set and the platform supports the appropriate
syscall, restore the metadata through the file descriptor.  Otherwise,
restore it through the pathname.  This is complicated by varying
syscall support (FreeBSD has an fchmod(2) but no fchflags(2), for
example) and because non-file entries don't have an fd to use in
restoring attributes (for example, mknod(2) doesn't return a file
handle).

MFC after: 14 days
2005-05-21 19:45:56 +00:00
Tim Kientzle
21805f33bf Correct return values in myopen() and myclose() in Example code.
Bug: docs/79318
Thanks to: Derek Tattersall
MFC after: 7 days
2005-05-21 19:38:19 +00:00
Tom Rhodes
846e187c43 Fix sentence structure to follow a better logic (zero is disable and
one is enable).
2005-05-21 17:22:12 +00:00
Hajimu UMEMOTO
10cb8fdace NI_WITHSCOPEID cleanup 2005-05-21 15:28:42 +00:00
Ruslan Ermilov
9e752adbc2 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 10:14:11 +00:00
Ruslan Ermilov
f682f10c76 Sync program's usage() with manpage's SYNOPSIS. 2005-05-21 09:55:10 +00:00
Ruslan Ermilov
9b3eb50354 Synchronize program's usage() with manpage's SYNOPSIS. 2005-05-21 07:08:32 +00:00
Max Laier
ffa4a5867a Unbreak handling of "ip[v]6" protocol and option flag. No more segfaults
and not every protocol is IPv6.
2005-05-21 03:27:33 +00:00
Paul Saab
2cdbfa66ee Replace t_force with a t_flag (TF_FORCEDATA).
Submitted by:   Raja Mukerji.
Reviewed by:    Mohan, Silby, Andre Opperman.
2005-05-21 00:38:29 +00:00
Peter Grehan
bd8fa19da3 Quick hack-o-rama to allow the Xorg Radeon driver to start up. It
tries to mmap memory outside of the available BARs, so allow the
range checks to be relaxed with a sysctl.
2005-05-21 00:22:57 +00:00
Peter Wemm
c592ba5f3f For non-profiling kernels, there were two symbols assigned to the same
address.  One was alltraps_with_regs_pushed, the other was calltrap.

When the stack tracer walks up, it looks for magic symbol names to
determine how to parse non-standard stack frames, such as a trapframe.
It was looking for "calltrap".  Which of the two symbols you got depended
on things like Phase of moon, etc.  If you were unlucky, you got a
garbage stack trace for things like 'debug.trace_on_panic', which would
completely hide the actual source of the problem.
2005-05-21 00:02:12 +00:00
Maksim Yevmenkin
4f39f90f5f Fix yet another cut-and-paste bug.
kbd was allocated from M_VKBD not from M_DEVBUF
2005-05-20 23:29:55 +00:00
Alan Cox
071a1710d1 Reduce the number of times that we acquire and release locks in
swap_pager_getpages().

MFC after: 1 week
2005-05-20 21:26:05 +00:00
Nate Lawson
b3a9f68f8c Fix LINT build, original breakage was rev 1.23. There are 2 definitions
of MCOUNT to have a C version and an asm version with the same name and
not have LOCORE ifdefs to distinguish them.  <machine/profile.h> provides
a C version and <machine/asmacros.h> provides an assembler version.

Discussed with:	bde
2005-05-20 17:16:24 +00:00
David E. O'Brien
c8dddf0d55 Adjust the start_ap delay to match i386. 2005-05-20 16:25:08 +00:00
David E. O'Brien
5d12ba1ff7 Fix mismerge in rev 1.226: wait 5 seconds as the comment documents,
not .5 seconds.
2005-05-20 16:23:15 +00:00
Hajimu UMEMOTO
77cf61aeb0 reduce strlen() call. 2005-05-20 15:39:20 +00:00
Hartmut Brandt
cfc967e66a Add a test to check whether in compat mode make detectes builtins
on the command line and really executes the shell instead of directly
executing the command.
2005-05-20 15:25:04 +00:00
Hajimu UMEMOTO
8a4d3d8400 use reentrant.h and simplify. 2005-05-20 15:17:08 +00:00
Hartmut Brandt
ac8946e3d3 Add a test to ensure that in compat mode when a line contains no
shell meta characters it is not passed to the shell, but the command
is executed directly (given that the line is not a shell builtin) and
that the line with a meta character is passed to the shell.
2005-05-20 15:06:27 +00:00
Hajimu UMEMOTO
532e65b886 check return value of ttyname_r(). 2005-05-20 14:59:20 +00:00
Hajimu UMEMOTO
db297254fe ttyname_r() didn't pass correct buffer size to devname_r(). 2005-05-20 14:56:55 +00:00
Hartmut Brandt
c9302692e6 Add a test that test whether we can replace the shell to use by
make with another shell and set all its parameters (meta and builtins
not tested here).
2005-05-20 14:50:30 +00:00
Philippe Charnier
f942457007 Remove unused variables. Remove prototype for function that does not exist. 2005-05-20 13:14:18 +00:00
Philippe Charnier
d36dd0b78e Remove unused variables. 2005-05-20 13:09:49 +00:00
Philippe Charnier
4b937b7019 Remove unused variables. int -> size_t for lenghts. 2005-05-20 13:04:10 +00:00
Philippe Charnier
7838f9dd89 Add FBSDID. Add missing prototypes. Remove unused variables. Give variable
an initial value to silent compiler.
2005-05-20 13:01:47 +00:00
Philippe Charnier
20b5a7b446 Remove unused variable. 2005-05-20 12:57:01 +00:00
Philippe Charnier
e479377e63 Remove unused variable. Shorten the path to WARNS=6 compliance. 2005-05-20 12:55:38 +00:00
Philippe Charnier
3fe9d89a62 Remove unused variables. Shorten the path to a WARNS=6 compliance. 2005-05-20 12:50:47 +00:00
Philippe Charnier
109a0e6b26 Remove unused variables. Whitespace cleaning. 2005-05-20 12:46:34 +00:00
Philippe Charnier
0af0a63a7a Remove unused variables 2005-05-20 12:44:04 +00:00
Marius Strobl
c44123e174 Recognize the integrated (though not necessarily enabled) FireWire
controllers of Sun PCIO-2 chips which are used onboard in most of
the newer PCI-based sun4u machines (cosmetic change as they were also
already probed as generic FWOHCI without this). As with gem(4), hme(4)
and ohci(4) detect whether their intpin register is valid and correct
it if necessary, i.e. set the respective IVAR to the right value for
allocating the IRQ resource, as some of them come up having it set
to 0 (in fact in all machines I'm currently aware of the FireWire
part being enabled). This fixes attaching affected controllers.

Apporved by:	simokawa
Tested by:	Michiel Boland <michiel@boland.org>
MFC after:	1 month
2005-05-20 12:37:16 +00:00
Gleb Smirnoff
e9ace2571c Calling xl_rxeof() at the end of xl_start_locked() leads to recursion
in case of IP fast forwarding. Enqueue a taskqueue(9) task instead of
calling xl_rxeof() directly.

Reported & tested by:	Slava Alpatov
Reviewed by:		wpaul
MFC after:		1 week
2005-05-20 07:16:09 +00:00
Søren Schmidt
06b97dbc13 Print the rigth argv string on error (too much c&p).. 2005-05-20 06:23:40 +00:00
Maxim Konovalov
92aa3968f2 Add OpenBSD 3.7. 2005-05-20 05:13:25 +00:00
Nate Lawson
96ab794b26 Document that the returned pointer should be freed even if the number
of items returned is 0.
2005-05-20 05:04:22 +00:00
Nate Lawson
1c9ec53854 If devclass_get_devices() returns success but a count of 0, free the
pointer.  If kernel malloc(0) returns a valid pointer, it needs to be
freed.  If it returns NULL, it's ok to free this also.

Submitted by:	pjd
Reviewed by:	imp, dfr
Obtained from:	Coverity Prevent
2005-05-20 05:00:43 +00:00
Bruce A. Mah
201aed7a77 New release notes: libalias as kernel module, ng_nat(4), sed(1) -l,
ATA mkIII, chflags(1) -h, kldstat(8) -m, what(1) -q, GNU grep patches
from Fedora.
2005-05-20 04:19:56 +00:00
Bill Paul
0b6c3bf1bc Missed kern_windrv.c in the last checkin. 2005-05-20 04:01:36 +00:00
Bill Paul
450a94af7a Deal with a few bootstrap issues:
We can't call KeFlushQueuedDpcs() during bootstrap (cold == 1), since
the flush operation sleeps to wait for completion, and we can't sleep
here (clowns will eat us).

On an i386 SMP system, if we're loaded/probed/attached during bootstrap,
smp_rendezvous() won't run us anywhere except CPU 0 (since the other CPUs
aren't launched until later), which means we won't be able to set up
the GDTs anywhere except CPU 0. To deal with this case, ctxsw_utow()
now checks to see if the TID for the current processor has been properly
initialized and sets up the GTD for the current CPU if not.

Lastly, in if_ndis.c:ndis_shutdown(), do an ndis_stop() to insure we
really halt the NIC and stop interrupts from happening.

Note that loading a driver during bootstrap is, unfortunately, kind of
a hit or miss sort of proposition. In Windows, the expectation is that
by the time a given driver's MiniportInitialize() method is called,
the system is already in 'multiuser' state, i.e. it's up and running
enough to support all the stuff specified in the NDIS API, which includes
the underlying OS-supplied facilities it implicitly depends on, such as
having all CPUs running, having the DPC queues initialized, WorkItem
threads running, etc. But in UNIX, a lot of that stuff won't work during
bootstrap. This causes a problem since we need to call MiniportInitialize()
at least once during ndis_attach() in order to find out what kind of NIC
we have and learn its station address.

What this means is that some cards just plain won't work right if
you try to pre-load the driver along with the kernel: they'll only be
probed/attach correctly if the driver is kldloaded _after_ the system
has reached multiuser. I can't really think of a way around this that
would still preserve the ability to use an NDIS device for diskless
booting.
2005-05-20 04:00:50 +00:00
Sam Leffler
eb2a391f14 guard against bogus address data
Submitted by:	Bakul Shah
2005-05-20 03:58:53 +00:00
Peter Wemm
d9d99c5478 Fix libstand on amd64. Rev 1.46 (obrien) removed the -I. that the
bzip2 support provided, and amd64 depended on.  Amd64 has a custom
${.OBJDIR}/machine symlink in it and the -I. picked this up.  Without
it, the libstand code was being compiled in 32 bit mode, but with 64 bit
machine headers.
2005-05-20 03:18:19 +00:00
Bill Paul
cebddbda3b In ndis_halt_nic(), invalidate the miniportadapterctx early to try and
prevent anything from making calls to the NIC while it's being shut down.
This is yet another attempt to stop things like mdnsd from trying to
poke at the card while it's not properly initialized and panicking
the system.

Also, remove unneeded debug message from if_ndis.c.
2005-05-20 02:35:43 +00:00
Christian Brueffer
e9a32efc6e Document support for the 5714.
MFC after:	3 days
2005-05-20 01:20:23 +00:00
Christian Brueffer
bf7f62ef58 Add nve(4). 2005-05-20 01:19:02 +00:00