- remove a redundant condition;
- complete all validity checks on segment before calling
soisconnected(so).
Reviewed by: Richard Stevens, davidg, wollman
have to decide whether to send a CC or CCnew option in our SYN segment
depending on the contents of our TAO cache. This decision has to be
made once when the connection starts. The earlier code delayed this
decision until the segment was assembled in tcp_output() and
retransmitted SYN segments could have different CC options.
Reviewed by: Richard Stevens, davidg, wollman
(maximum size of a socket buffer) tunable.
Permit callers of listen(2) to specify a negative backlog, which
is translated into somaxconn. Previously, a negative backlog was
silently translated into 0.
civilised manner than panicing. This only happens as a result of another
state botch somewhere else, eg: from a tty driver calling putc or b_to_q
on a closed device. Apparently, it's also been implicated in a panic
with a status (^T) event on ptys.
This change should pretty well be in it's final form now.
net.inet.ip.intr-queue-maxlen (=== ipintrq.ifq_maxlen)
and net.inet.ip.intr-queue-drops (=== ipintrq.ifq_drops)
There should probably be a standard way of getting the same information
going the other way.
the kernel. ppp_tty.c goes to some lengths to minimise the inter-layer
calling (including a soft ISR). ppp_tty.c takes care of the soft masking
that was needed still.
(I've discovered that bugs in this area show up within an hour if the
masking was not correct.. :-} This combination has proven stable on
specialix serial ports, although there was some concern about the softtty
parts of sio/cy and netisr colliding - but Bruce has fixed that now)
set in open() when CLOCAL is set unless carrier is present.
Fixed initialization of line discipline. It lived across opens.
Lines that started with the wrong discipline probably didn't work
at all, because TS_ISOPEN is only set by TTYDISC.
if_sl and if_ppp (from ppp-2.2), eliminating the nearly identical
pppcompress.[ch] code. Add maximum VJ compression states argument to
sl_compress_init().
if_sl: call sl_compress_init() with the extra argument.
non-fatal. I've make it return an appropriate error to the caller instead
of panic()ing.
Handling an error condition is inherently more friendly than exploding
the kernel.. :-) The new behavior is a little closer to traditional
clists, potentially making porting a little simpler.
Suggested by: bde (many months ago, I've been using this for a while..)
magneto-optical devices, it's scope can (and should) be widened to
cover all removable type 0 (direct) devices as well, since this class
of devices is sharing the same principles. Things like suport for
media eject etc. will be supported later. (Shunsuke is also working
on the problems arising out of the use of media with physical block
size != 512 bytes (which is not uncommon for MODs).
Submitted by: akiyama@kme.mei.co.jp (Shunsuke Akiyama)
itself. Will do this after this commit.)
Make scsiconf more flexible about recognizing ``foreign'' devices.
This part needs to be rewritten some day to allow for matches whithou
strict version number checks, but either Julian as Peter seem to be
too busy right now, so i'm finally commiting the version that's
working for me stable now for several months, as an interim
workaround.
Submitted by: akiyama@kme.mei.co.jp (Shunsuke Akiyama)
Submitted by: fgray@rice.edu
this driver hasn't been checked but as a separate module, bringing it in won't
break anything else and it't the best way of testing it......
julian
line discipline interrupt handlers more or less expect to be called at
spltty() == splimp(), although they have internal splimp()s that are
bogus if this expectation is satisfied. They are called at splsoftty()
from many tty drivers, so they were not protected from being reentered
from their own netisrs. They certainly don't expect that but are
apparently remarkably robust if it occurs. The problem in PR 798 seems
to be caused by pppstart() being reentered and finishing off the output
in progress by following the (stale) sc->sc_outm pointer. Then the
original pppstart() finds garbage in m2 after MFREE(m, m2). slstart()
doesn't have internal state like sc_outm so reentry of it probably only
causes out of order and dropped packets.
in the FIN_WAIT_2 state in order to prevent the conn. hanging there
forever.
Reviewed by: davidg, olah
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>
Obtained from: bugs@netbsd.org
modularization of the wd/wcd/atapi driver is ugly.
Include cons.h from a less bogus place.
Removed an ARGSUSED. Unused args are normal for devswitch functions
and lint was informed about them for about 5 functions out of 1000.
Lint should be informed about them, if at all, in some other way.
Remove confusing backwards compatibility code that allowed driver to be
used in pre-4.4 releases. The 3COM card's use -link2 to switch tranceivers.
(no functional changes here)
This code will only be included in your kernel if you have
'options DEVRANDOM', but that will fall away in a couple of days.
Obtained from: Theodore Ts'o, Linux
The goal is to make them "user-friendly" :-)
In the end this will allow a SNMP style "getnext" function, sysctl editing
in the boot-editor and/or debugger, LKMs can define sysctl vars when
they get loaded, and remove them when unloaded and other interesting
uses for dynamic sysctl variables.
convention of having their entry point named "<modname>_mod"".
Symorder is enforcing this when the current bsd.kmod.mk is installed.
I've not tested all these, but at least they all compile now.
Reattach them to the makefile.
Note that the change that I made to symorder needs to be compiled and
installed before any LKM's will work - the last version was corrupting
the relocation tables. A "make world" will to this, but if you
manually run a make on the lkm's you'll need to take care of it by
hand.
PR 795.
Set the size before one error return from sysctl_vnode() the same as before
the other. The caller might want to know about the amount successfully
read although the current caller doesn't.
If RAMENB is set in devconfig, walk the external SCBs. Some Intel Xpress
motherboards set this bit.
For external SCBs for the 3940. It doesn't set RAMPS or RAMENB, but does
have the ram.
the new seeprom format and negotiate up to 20MHz sync if set in SCSI-Select.
Reduce the complexity of the timeout code by running it at splhigh(). Fix
a bug that caused rescheduled timeouts at 0 clock ticks in the future causing
an infinite loop.
Obtained from: Timeout bug noticed by David Greenman and wcarchive.
in each phase routine. Saves a few instructions.
Be more careful in how we deal with SXFRCTL0. Or in the control bits of
interest instead of using mvi. The kernel driver will set the ULTRAEN
bit of SXFRCTL0 if we are using Ultra (20MHz) mode and we don't want to
clobber it.
In sdtr_to_rate divide by two if we are in ultra mode to get the correct
setting since its a 20MHz instead of 10MHz scale.
Submitted by: Mike Mitchell, supervisor@alb.asctmd.com
This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..
Mikes been using it for a year or so
but on 2.0
more changes and stuff will be merged in from other developers now that this is in.
Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
"I screwed the initialization of the burstsize. Right now it will default
to 0 (which can cause corruption problems on high latency PCI buses). It
should be set to 8 longwords to avoid problems with certain PCI chipsets."
Submitted by: Matt Thomas <matt@lkg.dec.com>
at the end of each write for writes of more than 1K.
Fixed handling of residual count for early returns in writes to pty masters.
It was only adjusted in 2 out of 6 cases.
Added prototypes.
TTYHOG = 1024 bytes, 10 cblocks were reserved. This was thought to
provide 10 * CBSIZE = 1080 bytes of buffering, but if the head pointer
is at the end of a cblock, then it only provides 1 + 9 * CBSIZE = 973
bytes of buffering. This caused serious data loss for ptys because the
flow control is deterministic and requires at least TTYHOG bytes of
buffering. For ttys, if input flow control is used then there is
usually enough slop in the high watermark to avoid problems, and if
input flow control isn't used then a limit of 973 is not much different
from a limit of 1024.
Add prototypes.
Continue cleaning up new init stuff.
the !COMPAT_43 case - use a common function even when there is no
`old' function. The diffs for this are large because of code motion
to restore the function order to what it was before the pseudo-argument
changes.
Include <sys/sysproto.h> to get correct args structs and prototypes.
The diffs for this are large because the declarations of the args structs
were moved to become comments in the function headers. The comments may
actually match the automatically generated declarations right now.
Add prototypes.
Fix the tests for being a console by reverting to the ones that
were used before the the RB_SERIAL changes. RB_SERIAL only needs
to be tested in one place. The initialization of comconsole was
wrong before the RB_SERIAL changes for the COMCONSOLE case. This
may have been the cause of the unnecessary changes.
Start eliminating #includes of <i386/i386/cons.h>. This header is
supposed to be included from <machine> although it should be
completely machine-independent and included from <sys>.
Remove a wrong XXX comment. `comconsole' is used to test for being
a console and even the tests for deciding the default termios state
are necessary (the semi-reentrant i/o routines don't handle ordinary
device i/o).
cy.c:
Sync with sio.c. The console tests are present but always fail.
filesystem layer, as was done in lite-2. Merged in some other cosmetic
changes while I was at it. Rewrote most of msdosfs_access() to be more
like ufs_access() and to include the FS read-only check.
Obtained from: partially from 4.4BSD-lite2
prototypes for all syscalls. The args structs are still declared in
comments as in VOP implementation functions. I don't like the
duplication for this, but several more layers of changes are required
to get it right. First we need to catch up with 4.4lite2, which uses
macros to handle struct padding. Then we need to catch up with NetBSD,
which passes the args correctly (as void *). Then we need to handle
varargs functions and struct padding better. I think all the details
can be hidden in machine-generated functions so that the args structs
and verbose macros to reference them don't have to appear in the core
sources.
Add prototypes.
Add bogus casts to hide the evil type puns exposed by the previous
steps. &uap[1] was used to get at the args after the first. This
worked because only the first arg in *uap was declared. This broke
when the machine- genenerated args struct declared all the args
(actually it declares extra args in some cases and depends on the
user stack having some accessible junk after the last arg, not to
mention the user args being on the stack. It isn't possible to
declare a correct args struct for a varargs syscall). The msgsys(),
semsys() and shmsys() syscall interfaces are BAD because they
multiplex several syscalls that have different types of args.
There was no reason to duplicate this sysv braindamage but now
we're stuck with it. NetBSD has reimplemented the syscalls properly
as separate syscalls #220-231.
Declare static functions as static in both their prototype and their
implementation (the latter is optional, and this misfeature was used).
Remove gratuitous #includes.
Continue cleaning up new init stuff.
handler (remove SA_NODEFER).
On the other hand, signal() case should set sa_flags to SA_NODEFER as
in previous change.
In addition, added #ifdef'd code for signal() to or in SA_RESETHAND
flag for when that compatability is implemented.
valid bytes, we must also clear the B_DONE flag. Some filesystems
depend on this (incl NFS) and is probably the cause of the biodone
error and subsequent crash. Anyway this change needs to be made.
Add SA_NODEFER define to signal.h
Add ps_nodefer field to struct sigacts in signalvar.h.
Add code to kern_sig.c to handle SA_NODEFER.
If flag is set, when the signal is delivered, it is not masked automatically
from receiving the same signal again.
Reviewed by: wollman, bde
accesses after the BIOS bus scan. The previous revision made the assumption,
that every PCI motherboard did ...
Change the test on the initial value of the CONF1_ADDR_PORT register in a way
that makes the probe succeed on triton based motherboards, without breaking
the EISA motherboard that has some non-PCI register at the same address.
ifp->if_output() functions. This way, initial implementations of
rt_output functionality can just lazily use if_output until customized
versions are written.
(mask,value) in the tree, don't immediately return EEXIST. Instead, check
to see if the pre-existing route was generated by protcol-cloning. If so,
then it is OK to simply blow away the old route and re-attempt the insertion.
If not, then fall back to the same error code as before.
a few new wrinkles for MTU discovery which tcp_output() had better
be prepared to handle. ip_output() is also modified to do something
helpful in this case, since it has already calculated the information
we need.
This is truly a hack. The idea is taken from the Linux ibcs2 emulator.
To use this feature, you must use the option,
options SPX_HACK
in your config.
Also, in /compat/ibcs2/dev, you must do:
lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 X0R@ -> /dev/null
lrwxr-xr-x 1 root wheel 7 Oct 15 22:20 nfsd@ -> socksys
lrwxr-xr-x 1 root wheel 9 Oct 15 22:20 socksys@ -> /dev/null
crw-rw-rw- 1 root wheel 41, 1 Oct 15 22:14 spx
Do NOT use old socksys driver as that has been removed.
This hack needs /compat/ibcs2/dev/spx to be any device that does NOT
exist/configured (so the now non-existant spx major/minor works fine).
When an open() is called, the error ENXIO is checked and then the
path is checked. If spx open detected, then a unix socket is opened
to the hardcoded path "/tmp/.X11-unix/X0".
As the Linux hacker author mentioned, the real way would be to detect
the getmsg/putmsg through /dev/X0R and /dev/spx. Until this true
solution is implemented (if ever), I think this hack is important
enough to be put into the tree, even though I don't like it dirtying
up my clean code (which is what #ifdef SPX_HACK is for).
Currently, the emulator defaults to returning "FreeBSD" as the system
name, release "3.2", and version "2.0". Some programs want to make
sure they are on a SYSV 3.2 system and check for 3.X release number.
Use the following defines to override the defaults:
IBCS2_UNAME_SYSNAME
IBCS2_UNAME_RELEASE
IBCS2_UNAME_VERSION
(should be string)
for system name, release, and version, respectively. This allows
someone to compile the emulator into the kernel so it can pretend
to be a specific system if needed.
Require the state of the configuration enable bits to be OFF assuming
that the BIOS left them that way, as it should anyway to avoid bad things
to happen.
The tests themselves are copied from the previous release, with the
exception of CONF1_ENABLE_MSK1 having the LSB set. This bit should be
read back as '0', since only DWORD addresses are legal.
I tried to solve the problem of IDE probing compatibility in this version.
When compiled without an ATAPI option, the wd driver is
fully backward compatible with 2.0.5. With ATAPI option,
the wdprobe becomes strictly weaker. That is, if wdprobe works
without ATAPI option, it will always work with it too.
Another problem was with the CD-ROM drive attached as a slave
in the IDE bus, where there is no master. All IDE CD-ROM
drives are shipped in slave configuration, and most users
just plug them in, never thinking about jumpers.
It works fine with ms-dos and ms-windows, and this
version of the driver supports it as well.
The eject op can now load disks. Just repeat it twice,
and the disk will be ejected and then loaded back.
The disc cannot be ejected if it is mounted.
Submitted by: Serge Vakulenko, <vak@cronyx.ru>
nxmmap() returned a bogus value as well as having a bogus type. Some
drivers use nxmmap() for configured devices (`nx' functions should
only be used for unconfigured devices). These drivers allowed mmapping
physical page 6, which may have interesting contents. vm has kludges
to avoid the same bug with nullop() returning page 0 and enodev()
returning page 19 (ENODEV), but didn't handle enxio() returning page 6.
vm is the wrong place to handle these bugs.
capacity of the link, even if the route's MTU indicates that we cannot
send that much in their direction. (This might actually make it possible
to test Path MTU discovery in a useful variety of cases.)
free-run and doing a subtract in microtime() rather than resetting the
counter to zero at every clock tick. In combination with the changes to
kern_clock.c, this should eliminate all the immediately obvious sources
of systematic jitter in timekeeping on Pentium machines.
turned out not to be necessary; simply watching for MTU decreases (which
we already did) automagically eliminates all the cases we were trying to
protect against.
sometime around 1.51, the check for minphys dissappeared out of
transfers for disks..
we weren't hecking that the adapter could handle a transfer of
the size we were requesting..
Peter!?
:)
this explains the rash of failures I've seen reported recently
with "too many DMA segments" on raw devices
(added one for st as well)