phk [Wed, 20 Dec 2000 21:50:37 +0000 (21:50 +0000)]
Replace logwakeup() with "int msgbuftrigger". There is little
point in calling a function just to set a flag.
Keep better track of the syslog FAC/PRI code and try to DTRT if
they mingle.
Log all writes to /dev/console to syslog with <console.info>
priority. The formatting is not preserved, there is no robust,
way of doing it. (Ideas with patches welcome).
deischen [Wed, 20 Dec 2000 17:04:12 +0000 (17:04 +0000)]
When retrieving the time of day in nanosleep(), store it in the
global time of day. This costs us nothing, but is a bit of a hack
to work around a process blocking and not having the time updated
by an ITIMER_PROF signal.
deischen [Wed, 20 Dec 2000 16:55:57 +0000 (16:55 +0000)]
Enable check for pending signals after calling a signal handler.
Restoration of a threads signal mask after invocation of a signal
handler may allow pending signals to become deliverable.
takawata [Wed, 20 Dec 2000 12:51:08 +0000 (12:51 +0000)]
Add PECOFF (WIN32 Execution file format) support.
To use it, some dll is needed. And currently, the dll is only for NetBSD.
So one more kernel module is needed.
For more infomation,
http://chiharu.haun.org/peace/ .
aic7xxx_freebsd.c:
Capture the eventhandle returned by EVENTHANDER_REGISTER
so we can kill the handler off during detach.
Use AHC_* constants instead of hard coded numbers in a
few more places.
Test PPR option state when deciding to "really" negotiate
when the CAM_NEGOTIATE flag is passed in a CCB.
Make use of core "ahc_pause_and_flushwork" routine in our
timeout handler rather than re-inventing this code.
Cleanup all of our resources (really!) in ahc_platform_free().
We should be all set to become a module now.
Implement the core ahc_detach() routine shared by all of
the FreeBSD front-ends.
aic7xxx_freebsd.h:
Softc storage for our event handler.
Null implementation for the ahc_platform_flushwork() OSM
callback. FreeBSD doesn't need this as XPT callbacks are
safe from all contexts and are done directly in ahc_done().
aic7xxx_inline.h:
Implement new lazy interrupt scheme. To avoid an extra
PCI bus read, we first check our completion queues to
see if any work has completed. If work is available, we
assume that this is the source of the interrupt and skip
reading INTSTAT. Any remaining interrupt status will be
cleared by a second call to the interrupt handler should
the interrupt line still be asserted. This drops the
interrupt handler down to a single PCI bus read in the
common case of I/O completion. This is the same overhead
as in the not so distant past, but the extra sanity of
perforning a PCI read after clearing the command complete
interrupt and before running the completion queue to avoid
missing command complete interrupts added a cycle.
aic7xxx.c:
During initialization, be sure to initialize all scratch
ram locations before they are read to avoid parity errors.
In this case, we use a new function, ahc_unbusy_tcl() to
initialize the scratch ram busy target table.
Replace instances of ahc_index_busy_tcl() used to unbusy
a tcl without looking at the old value with ahc_unbusy_tcl().
Modify ahc_sent_msg so that it can find single byte messages.
ahc_sent_msg is now used to determine if a transfer negotiation
attempt resulted in a bus free.
Be more careful in filtering out only the SCSI interrupts
of interest in ahc_handle_scsiint.
Rearrange interrupt clearing code to ensure that at least
one PCI transaction occurrs after hitting CLRSINT1 and
writting to CLRINT. CLRSINT1 writes take a bit to
take effect, and the re-arrangement provides sufficient
delay to ensure the write to CLRINT is effective. The
old code might report a spurious interrupt on some "fast"
chipsets.
export ahc-update_target_msg_request for use by OSM code.
If a target does not respond to our ATN request, clear
it once we move to a non-message phase. This avoids
sending a MSG_NOOP in some later message out phase.
Use max lun and max target constants instead of
hard-coded values.
Use softc storage built into our device_t under FreeBSD.
Fix a bug in ahc_free() that caused us to delete
resources that were not allocated.
Clean up any tstate/lstate info in ahc_free().
Clear the powerdown state in ahc_reset() so that
registers can be accessed.
Add a preliminary function for pausing the chip and
processing any posted work.
Add a preliminary suspend and resume functions.
aic7xxx.h:
Limit the number of supported luns to 64. We don't
support information unit transfers, so this is the
maximum that makes sense for these chips.
Add a new flag AHC_ALL_INTERRUPTS that forces the
processing of all interrupt state in a single invokation
of ahc_intr(). When the flag is not set, we use the
lazy interrupt handling scheme.
Add data structures to store controller state while
we are suspended.
Use constants instead of hard coded values where appropriate.
Correct some harmless "unsigned/signed" conflicts.
aic7xxx.seq:
Only perform the SCSIBUSL fix on ULTRA2 or newer controllers.
Older controllers seem to be confused by this.
In target mode, ignore PHASEMIS during data phases.
This bit seems to be flakey on U160 controllers acting
in target mode.
aic7xxx_pci.c:
Add support for the 29160C CPCI adapter.
Add definitions for subvendor ID information
available for devices with the "9005" vendor id.
We currently use this information to determine
if a multi-function device doesn't have the second
channel hooked up on a board.
Add rudimentary power mode code so we can put the
controller into the D0 state. In the future this
will be an OSM callback so that in FreeBSD we don't
duplicate functionality provided by the PCI code.
The powerstate code was added after I'd completed
my regression tests on this code.
Only capture "left over BIOS state" if the POWRDN
setting is not set in HCNTRL.
In target mode, don't bother sending incremental
CRC data.
jhay [Tue, 19 Dec 2000 19:08:11 +0000 (19:08 +0000)]
Various fixes to make leased line operation more robust. On lcp_up, start
to negotiate from scratch. Make leased lines survive being put into
loopback mode. Bits and pieces and ideas taken from PRs 11238 and 21771.
Make it a module so that it can be kldloaded. Whitespace cleanup. (Can be
ignored with "cvs diff -b".)
iwasaki [Tue, 19 Dec 2000 15:45:11 +0000 (15:45 +0000)]
Fix testing reboot howto flags in acpi_shutdown_final().
This sould make the system power-off correctly where the howto had
more bits set than RB_POWEROFF, e.g. RB_NOSYNC.
rwatson [Tue, 19 Dec 2000 14:12:46 +0000 (14:12 +0000)]
o Back out 1.39, it was a bad idea. There was, and should be, a
distinction between the OS copyright message and the message displayed
gratuitously to each user at login. Because, well, they may be
different, among other things, and boy can a copyright message each
login consume some screen space. If people really want to do this,
they can copy /COPYRIGHT to /etc/COPYRIGHT.
Submitted by: Anders Andersson <anders@codefactory.se>
mckusick [Tue, 19 Dec 2000 04:20:13 +0000 (04:20 +0000)]
Get rid of spurious check in ffs_truncate for i_size == length
which fails to set the modification time on the file. The same
check a few lines later takes the correct action.
jhb [Mon, 18 Dec 2000 23:56:16 +0000 (23:56 +0000)]
Convert the sio driver to use a spin mutex instead of a s_lock. This is
going to hurt sio(4) performance for the time being. As we get closer to
release and have more of the kernel unlocked we can come back to doing
arcane optimizations to workaround the limitations of the sio hardware.
jhb [Mon, 18 Dec 2000 23:49:56 +0000 (23:49 +0000)]
Attempt to read and verify the card's status in wi_stop() before sending it
the disable command. On some systems, writing to the card after it has
been ejected causes the machine to hang.
wpaul [Mon, 18 Dec 2000 22:06:12 +0000 (22:06 +0000)]
Add power state manipulation to the fxp driver. Some people have
claimed that their Intel NIC is comatose after a warm boot from Windoze.
This is most likely due to the card getting put in the D3 state. This
should bring it back to life.
wpaul [Mon, 18 Dec 2000 21:53:05 +0000 (21:53 +0000)]
Use pci_get_powerstate()/pci_set_powerstate() which now exists in the
PCI code. This saves each driver from having to grovel around looking
for the right registers to twiddle.
I should eventually convert the other PCI drivers to do this; for now,
these three are ones which I know need power state handling.
imp [Mon, 18 Dec 2000 21:08:53 +0000 (21:08 +0000)]
o Add cardbus support (use pci attachment for now)
<bde>
o Add comments in some places to clarify some points.
o Don't typedef sc_p. This isn't usually done in the drivers and may
cause problems in teh future if C goes the C++ route of requiring
one and only one definition for each and every type. Instead use
the current convetion of expanding struct ${1}_softc * inline needed.
o change some comments to be more style(9)-like.
o Define and use DEV2SOFTC to encapsulate storing/getting softc from a
dev_t. This also takes care of the missing cast from the examples.
o Define and use DEVICE2SOFTC, similar to DEV2SOFTC for getting the
softc from a device_t.
</bde>
We still should have this generate foo_{isa,pci,pccard,cardbus,eisa}.c
and foovar.h from templates of some sort, but I was too lazy to do
that in this commit. I did document it in the comments, however.
Note: bde-like corrections made with the help of my my portable
plastic bde icon. Results with the real bde may vary with use.
julian [Mon, 18 Dec 2000 20:03:32 +0000 (20:03 +0000)]
Divorce the kernel binary ABI version number from the message
format version number. (userland programs should not need to be
recompiled when the netgraph kernel internal ABI is changed.
Also fix modules that don;t handle the fact that a caller may not supply
a return message pointer. (benign at the moment because the calling code
checks, but that will change)
toshi [Mon, 18 Dec 2000 15:28:53 +0000 (15:28 +0000)]
Linksys Fast Ethernet PCCARD cards supported by the ed driver now
require the addition of flag 0x80000 to their config line in
pccard.conf(5). This flag is not optional. These Linksys cards will
not be recognized without it.
jake [Mon, 18 Dec 2000 06:10:17 +0000 (06:10 +0000)]
Forced commit to note that the previous commit message was wrong.
An exclusive lock is sufficient for a shared assertion to pass,
but not the other way around.
jake [Mon, 18 Dec 2000 05:50:31 +0000 (05:50 +0000)]
Add an assertion macro for lockmgr locks, LOCKMGR_ASSERT(lkp, what, p).
The what argument is the hold type that assertion acts on. LK_SHARED
to assert that the process holds a shared, LK_EXCLUSIVE to assert that
the process holds _either_ a shared lock or an exclusive lock.
dillon [Sun, 17 Dec 2000 23:57:05 +0000 (23:57 +0000)]
Avoid a data-consistency race between write() and mmap()
by ensuring that newly allocated blocks are zerod. The
race can occur even in the case where the write covers
the entire block.
Reported by: Sven Berkvens <sven@berkvens.net>, Marc Olzheim <zlo@zlo.nu>
dougb [Sun, 17 Dec 2000 23:42:45 +0000 (23:42 +0000)]
* Fix a long line that I introduced in the last commit
* Backslash escape non-alphanumeric chars in the login name so that perl
doesn't choke on things like '$'.
jdp [Sun, 17 Dec 2000 20:50:22 +0000 (20:50 +0000)]
Fix bug: a read() on a bpf device which was in non-blocking mode
and had no data available returned 0. Now it returns -1 with errno
set to EWOULDBLOCK (== EAGAIN) as it should. This fix makes the bpf
device usable in threaded programs.