implementations, and synchronizes us with the Nomad's latest code.
This code is based on the Nomad code, but heavily hacked by me.
Reviewed by: phk
Submitted by: the 'Nomads'
in place device drivers can now register power-down/power-up routines so
that we can use common routines to power-up/power-down cards for
insert/removals, suspend/resume, etc..
Reviewed by: phk
Submitted by: the 'Nomads'
strange results. This bug has been in here for a loooong time.
Many thanks to Pedro Salenbauch for finding this.
Submitted by: pedrosal@nce.ufrj.br (Pedro Salenbauch)
regarding apm to LINT
- Disabled the statistics clock on machines which have an APM BIOS and
have the options "APM_BROKEN_STATCLOCK" enabled (which is default
in GENERIC now)
- move around some of the code in clock.c dealing with the rtc to make
it more obvios the effects of disabling the statistics clock
Reviewed by: bde
8 not the 18 I was using during some of my own testing. Ooops.
For those that want to change the number for experimentation, you can
set the value on line 1553 of this file.
One of the manifiestations of the problem includes the -4 RSS problem
in ps.
Reviewed by: dyson
Submitted by: Stephen McKay <syssgm@devetir.qld.gov.au>
(Rev E or greater), aic7850, aic7860, aic7870, and aic7880 controllers.
SCB paging is enabled with the option "AHC_SCBPAGING_ENABLE". Full
comments on the algorithm are at the top of i386/scsi/aic7xxx.c.
options "AHC_TAGENABLE" and "AHC_QUEUE_FULL" have been removed. The
default is 4 tags without SCB paging, 8 with.
Clear the SCSIRSTI bit after throwing a bus reset. Some cards seem to get
confused otherwise.
Handle SCSIRSTI interrupts before checking to see if there is a valid
SCB in use since this can happen. (Clears PR# i386/1123)
Clean up the way we determine the number of SCBs on the card
(courtesy of Dan Eischen).
Guard against attempts to negotiate wide to a narrow controller.
Fix some comments.
Update my copyrights.
aic7770 >= Rev E, aic7850, aic7860, aic7870, and ai7880 based controllers.
Make findSCB safer for non-tagged commands when tagged commands are
active on the controller. The symptoms of this problem were
"Overlapped commands attempted" messages during error recovery
attempts.
Compact scratch ram usage. This leaves 8 bytes free for future use.
Clean up some comments.
aic7xxx_reg.h:
Update my copyright.
and B_READ before writing. This was was fatal. They also broke the
clearing of B_INVAL before doing i/o. This didn't actually matter.
Submitted by: mostly by joerg
compatibility slice. They were forgotten on last-close and then
creating them on first-open failed.
Devfs entries for slices other than the one containing the root file
system are still invisible unless you open a non-devfs inode on the
slice.
- More code cleanups
- #ifdef DEBUG debugging code
- More consistant printfs
- Better handling of the apm_int() assembly code (mostly from Bruce Evans)
Reviewed by: bde
1) Require all callers to pass a valid route pointer to ip_output()
so that we don't have to check and allocate one off the stack
as was done before. This eliminates one test and some stack
bloat from the common (UDP and TCP) case.
2) Perform the IP header checksum in-line if it's of the usual length.
This results in about a 5% speed-up in my packet-generation test.
3) Use ip_vhl field rather than ip_v and ip_hl bitfields.
forked child to be dissociated from the parent).
Cleanup fork1(), implement vfork() and fork() in terms of rfork() flags.
Remove RFENVG, RFNOTEG, RFCNAMEG, RFCENVG which are Plan9 specific and cannot
possibly be implemented in FreeBSD.
Renumbered the flags to make up for the removal of the above flags.
Reviewed by: peter, smpatel
Submitted by: Mike Grupenhoff <kashmir@umiacs.umd.edu>
1) Set the persist timer to help time-out connections in the CLOSING state.
2) Honor the keep-alive timer in the CLOSING state.
This fixes problems with connections getting "stuck" due to incompletion
of the final connection shutdown which can be a BIG problem on busy WWW
servers.
- always use pci_conf_read() and pci_conf_write(). (This is required to
simulate non-existant devices in my system for PCI bridge code tests.)
- reorder some functions (put the main functions at the end).
- correct off by one bug in the code dealing with unitialized PCI to PCI
bridge chips. (Bug found by ASAMI Satoshi.)
- print function number for multi-function devices.
assignment to avoid one bug and several pessimizations.
In the old version, gcc-2.6.3 (i386 version) generates 16 bytes
of static data and copies it using 4 4-byte load-stores. gcc-2.7.2
generates 2 1-byte stores and calls memset() to zero 14 bytes.
Linking fails because memset() doesn't exist in the kernel.
In both versions, the 2 bytes stored directly are all that is
actually used unless the null padding at the end is used, since
the 3 4-byte words in the middle are initialized again by struct
assignment. These words are misaligned. gcc generates misaligned
load-stores for (small) misaligned struct copies.
Submitted by: Bruce Evans
an application #defines `noreturn'.
Changed one instance of `const' similarly. This is less like to be a
problem since applications shouldn't #define `const', and the common
hack of #defining `const' as nothing gives harmless (?) null attributes
instead of syntax errors.
Fixed comments on #endifs to match code.
common labels for LINT. There are still some common declarations for the
!KERNEL case in tcp_debug.h and spx_debug.h. trpt depends on the ones in
tcp_debug.h.
common labels for LINT. There are still some common declarations for the
!KERNEL case in tcp_debug.h and spx_debug.h. trpt depends on the ones in
tcp_debug.h.
bug only affected FPU emulators. It might have caused bogus FPU states
in core dumps and in the child pcb after a fork. Emulated FPU states
in core dumps don't work for other reasons, and the child FPU state
is reinitialized by exec, so the problem might not have caused any
noticeable affects.
Cleaned up #includes.
was duplicated until the canq filled up, and write() normally returned 0.
This case is apparently rare. It was reported for Jove's shell buffer in
PR 1130.
Clarified GUS DMA Settings.
Other misc. changes.
This should hold us over until I can finish cleaning up TASD, and finish
reintegrating all of the FreeBSD changes to the sound driver. At that time
this document will be removed, and it's information moved to the handbook.
header for use in decompressing subsequant packets. If cslip gets garbage
(such as what happens when there is a port speed mismatch or modem line
noise), it will occasionally mistake the packet as a valid uncompressed
packet. When it tries to save off the header, it doesn't bother to check
for the validity of the header length and will happily clobber not only
the cslip data structure, but parts of other kernel memory that happens
to follow it...causing, ahem, undesired behavior.
is needed because of the vm_fault used to bring the page table page
for the kernel stack (UPAGES) back in. The consequence of the
previous incorrect change was a system hang.
channel at the same time. The functions isa_dma_acquire() and
isa_dma_release() should be used in all ISA drivers which call isa_dmastart().
This can be used more generally to register the usage of DMA channels in
any driver, but it is required for drivers using isa_dmastart() and friends.
Clean up sanity checks, error messages, etc.
Remove isa_dmadone_nobounce(), it is no longer needed
Reviewed by: bde
Moved declaration of bootverbose to a better place. It isn't
machine-dependent.
proc.h:
Moved declaration of cpu_fork() to a better place. Only its
implementation is machine-dependent.
hd essentially wired the FreeBSD drive number to 0 without changing
the BIOS drive number. Now the numbers can be specified independently.
Replaced the BOOT_HD compile time flag with with BOOT_HD_BIAS. Defining
the new flag as 1 should give the same behaviour as defining the old
flag as anything. I haven't tested defining these flags.
This fixes a panic that occurs when ifconfig ioctl(s) were interrupted
by IP traffic at the wrong time - resulting in a NULL pointer dereference.
This was originally noticed on a FreeBSD 1.0 system, but the problem still
exists in current sources.
#include <i386/include/clock.h> to get sysbeep() prototype
pcic.c:
add appropriate #ifdef around a prototype to quiet GCC because
fn decl. is also #ifdef'd.
They don't have BUSY de-asserted by the time they ACK (and thus cause
an interrupt). The workaround is to try seeing if the BUSY will be
de-asserted soon, and if not, to use an incremental backoff and
semi-polled mode instead of the fixed timeout with 1/2 s we've been
using previously (that caused the printer to run really slooow).
Printers that have been working previously should not be affected by
this.
keepalive on all tcp sessions. Setsockopt(2) cannot override this setting.
Maybe another one is needed that just changes the default for SO_KEEPALIVE ?
Requested by: Joe Greco <jgreco@brasil.moneng.mei.com>
in a suboptimal manner. I had also noticed some panics that appeared
to be at least superficially caused by this problem. Also, included
are some minor mods to support more general handling of page table page
faulting. More details in a future commit.
Changed DEVFS structure devfs_token so that adding the devices is
a simple matter of a 4 line for loop versus 16 lines of code
Reviewed by: julian@freebsd.org
Always delay using one inb(0x84) after each i/o in rtcin() - don't
do this conditional on the bogus option DUMMY_NOPS not being defined.
If you want an optionally slightly faster rtcin() again, then inline
it and use a better named option or sysctl variable. It only needs
to be fast in rtcintr().
aesthetics of using the 4.4 queue macros without paying undo space or time
in scenartios where a singly-linked list works fine.
From queue.h:
/*
* A singly-linked list is headed by a single forward pointer. The elements
* are singly linked for minimum space and pointer manipulation overhead at
* the expense of O(n) removal for arbitrary elements. New elements can be
* added to the list after an existing element or at the head of the list.
* Elements being removed from the head of the list should use the explicit
* macro for this purpose for optimum efficiency. A singly-linked list may
* only be traversed in the forward direction. Singly-linked lists are ideal
* for applications with large datasets and few or no removals or for
* implementing a LIFO queue.
*
* A singly-linked tail queue is headed by a pair of pointers, one to the
* head of the list and the other to the tail of the list. The elements are
* singly linked for minimum space and pointer manipulation overhead at the
* expense of O(n) removal for arbitrary elements. New elements can be added
* to the list after an existing element, at the head of the list, or at the
* end of the list. Elements being removed from the head of the tail queue
* should use the explicit macro for this purpose for optimum efficiency.
* A singly-linked tail queue may only be traversed in the forward direction.
* Singly-linked tail queues are ideal for applications with large datasets
* and few or no removals or for implementing a FIFO queue.
*/
Use new XS_SELTIMEOUT error code for selection timeouts.
aic7870.c:
Move SCB walking code to aic7xxx.c and make it work for all card types.
The flag AHC_EXTSCB is no longer needed since the SCBs are walked in
all cases now.
QINCNT. The 7850 puts random garbage in the high bits and all my attempts
to determine the cause of this failed. This approach does seem to work
around the problem.
Go back to relying on the SCSIPERR interrupt instead of having the sequencer
interrupt at the beginning of ITloop after a parity error occured.
Determine the number of SCBs on a card automatically and base the qcntmask
on the number of SCBs.
Add entries for 11.4MHz, 8.8MHz, 8.0MHz, and 7.2MHz to ULTRA portion of
the syncrate table. They seem to work fine on the 2940UW I have here and
will allow more non-ultra devices (like my tape drive) to run sync while
the adapter is in ULTRA mode.
Return XS_SELTIMEOUT instead of XS_TIMEOUT for selection timeouts. I was
getting sick of waiting for the SCSI code to retry each non-existant unit
multiple times during boot and XS_SELTIMEOUT bypasses all retries.
Use new SLIST queue macros. This was inspired by NetBSD using TAILQs in
their SCSI drivers. For optimum cache hits, the free scb list should
be LIFO which is what the old and new code does. NetBSD implemented a
FIFO queue for some reason.
Spaces -> tabs.
Fix support for the aic7850 by looking only at the relavent bits of the
QINCNT. The 7850 puts random garbage in the high bits and all my attempts
to determine the cause of this failed. This approach does seem to work
around the problem.
Don't trust SCSIPERR to tell us when there is a parity error. On
some revs of the 7870 and the 7880, this bit follows the parity of
the current byte. Instead of using a SEQINT to tell the kernel,
re-enable the standard parity error interrupt since it seems to pause
the sequencer right at the time of the error which is the effect we were
looking for anyway.
aic7xxx_reg.h:
Remove PARITY_ERROR seqeuncer interrupt type, its no longer used.
Define QCOUNTMASK as the SRAM location for the mask to use on the
QINCNT register. QCOUNTMASK is determined by the number of SCBs
supported by the device we're working on.
aic7xxx_asm.c
Properly check the return value of fopen, and define the arg list
in getopt correctly.
Submitted by: Pete Bentley <pete@demon.net>
Make the SA_NODEFER handling more correct, previously if you called
sigaction to set a handler and had SA_NODEFER set, and manually masked
the signal itself in sa_mask, and when you read the settings back later,
you'd find SA_NODEFER incorrectly cleared.
Pointed out by: bde
the process's memory, it was possible for the procfs_domem() call to
return a residual leftover, but with no errno. Since this is no good for
ptrace which ignored the the residual, remap a leftover amount into an
errno rather than fooling the caller into thinking it was successful when
in fact it was not.
Submitted by: bde (a very long time ago :-)
be called with the directory referenced, and this reference will
be dropped iff relookup() fails, so the value returned must not be
ignored.
Reviewed by: davidg
when rt == rt->rt_gwroute . rt == rt->gwroute shouldn't happen
in the first place, but that's another problem.
(try "route add -host <hostonmynet> <hostonmynet>; ping <hostonmynet>;
route delete <hostonmynet>")
can and will overflow on large machines - especially on machines with
filesystems with lots of files (like netnews servers), and the result
is a "free vnode isn't" panic or worse.
This fixes one of the causes of these panics that I've been experiancing on
wcarchive.
counter before loading the performance-monitor control register. I'm
not sure I believe this, but we'll follow their lead for the moment.
As a result of this commit, the performance-monitoring test program that
I wrote now works (the program will find its way to share/examples).