Commit Graph

115827 Commits

Author SHA1 Message Date
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
Maxim Sobolev
4d87b291ad Extend `autoboot_delay' handling - is this variable is set to -1 don't allow
user to interrupt autoboot process at all. Currently, even when
`autoboot_delay' is set to 0, loader(8) still allows autoboot process to be
interrupted by pressing any key on the console when the loader reads kernel
and modules from the disk. In some cases (i.e. untrusted environment) such
behaviour is highly indesirable and user should not be allowed to interfere
with the autoboot process at all.

Sponsored by:	PBXpress Inc.
MFC after:	3 days
2005-05-19 23:03:02 +00:00
Marius Strobl
cf87ad7afd Recognize the integrated USB 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 OHCI
without this). 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 (mainly those used in Blade 100 and the first
one on AX1105 boards). This fixes attaching affected controllers.
Correcting the intpin value might be better off in the PCI code
via a quirk table but on the other hand gem(4) and hem(4) also
correct it themselves and at least for the USB controller part
the intpin register is truely hardwired to 0 and can't be changed.
This means that we would have to hook up the quirk information
in a lot of places in the PCI code (i.e. whenever the value of the
intpin register is read from or written to the pci_devinfo of the
respective device) in order to do it the right way.

MFC after:	1 month
2005-05-19 23:00:46 +00:00
Marius Strobl
a30881c7d7 Sync with the other files.<arch> files and put the keyboard map
generation stuff at the beginning of this file as well as add a
dependency on dev/kbd/kbd.c for ukbd(4).
2005-05-19 22:56:00 +00:00
Maxime Henrion
8835fa2759 Correct a few places where we called warn() when warnx() should have
been used.

Submitted by:	"Liam J. Foy" <liamfoy@sepulcrum.org>
Obtained from:	DragonFlyBSD
2005-05-19 21:33:48 +00:00
Marius Strobl
003daaea5f o mc146818(4):
- Add locking.
  - Account for if the MC146818_NO_CENT_ADJUST flag is set we don't need
    to check wheter year < POSIX_BASE_YEAR.
  - Add some comments about mapping the day of week from the range the
    generic clock code uses to the range the chip uses and which I meant
    to add in the initial version.
  - Minor clean-up, use __func__ instead of hardcoded function names in
    error strings.

o in the rtc(4) front-end additionally:
  - Don't leak resources in case mc146818_attach() fails.
  - Account for ebus(4) defaulting to SYS_RES_MEMORY for the memory
    resources since ebus.c rev. 1.22.
2005-05-19 21:20:42 +00:00
Marius Strobl
fb596371a9 - Add locking.
- Add support for storing the century in MK48TXX_WDAY_CB on MK48Txx with
  extended registers when the MK48TXX_NO_CENT_ADJUST flag is set (and which
  is termed somewhat confusing as it actually means don't manually adjust
  the century in the driver).
- Add the MI part of interfacing the watchdog functionality of MK48Txx with
  extended registers with watchdog(9). This is inspired by the SunOS/Solaris
  drivers for the 'eeprom' devices also having watchdog support. I actually
  expected this to work out of the box on Sun Exx00 machines with 'eeprom'
  devices which have a 'watchdog-enable' property. On terminal count of the
  the watchdog timer however only the MK48TXX_FLAGS_WDF bit rises but the
  reset signal and the interrupt respectively (depending on whether the
  MK48TXX_WDOG_WDS bit of the chip and the MK48TXX_WDOG_ENABLE_WDS flag
  of the driver respectively is set) goes nowhere. Apparently passing the
  reset signal on to the WDR line of the CPUs has to be enabled somewhere
  else but we don't have documentation for the Exx00 specific controllers.
  I decided to commit this nevertheless so it can be enabled in the eeprom(4)
  front-end later in e.g. 6.0-STABLE without breaking the API. Besides the
  Exx00 the watchdog part of the MK48Txx should also work on E250 and E450.
  Possibly also without extra fiddling on these machines but I haven't
  found someone willing to give it a try on such a machine so far.
- Use uintXX_t instead of u_intXX_t, use __func__ instead of hardcoded
  function names in error strings.
2005-05-19 21:16:50 +00:00
Christian S.J. Peron
8e56d2ee05 Add cases for ENOBUFS and ENETDOWN. We need to make sure that we
catch all transient errors. This fixes situations where transient
error conditions such as network interfaces losing carrier signals
or the system running out of mbufs would result in the permanent
removal of forwarding syslog messages.

MFC after:	1 week
2005-05-19 21:09:44 +00:00