disksort is called at non-interrupt time and can be actively traversing
the list when that happens, there is a very small window of vulnerability.
Close it by protecting disksort with splbio().
SunOS and SCO. You can then even use the pipe as a cheap fifo stack
(yuck!). A semantic change also important (but not limited) to iBCS2
compatibility.
Submitted by: swallace
to replace the very poor, original implementation of Scatter/Gather operations.
Use a bit (that was freed up with the rewrite above) in the SCB control byte
to designate commands that should allow disconnection. The kernel driver
makes this decision now instead of the sequencer since the sequencer can't
do the indexing very efficiently.
This commit drops the sequencer from 426 instructions to 390 most likely
freeing enough space to do a target mode implementation.
The first could occur because the original code would continue to reset
the SCSIID register while waiting for a selection. This could potentially
conflict with a reconnect since a successfull reconnect will also set the
SCSIID register. The fix is to use a separate wait loop after starting
a selection (as was done a few revisions ago).
The second probably never happens, but it was possible for a target to
reconnect while there was a pending SCB on the waiting list and not get
noticed. The fix was to remove a supurflous check of the scb waiting
list.
Detect in nfsrv_readdirplus when a filesystem soes not support VFS_VGET and
return NFSERR_NOTSUPP so that the client will use ordinary readdir instead.
Old variant returns 38400 for them, now it returns nearest matched
rounded down, expect speeds in range 0 > speed < 50 rounded up
to not produce hangup.
with interaction pty <-> serial driver with non-standard speed.
So, nothing protect us from garbadge in speed field, expect
checking for < 0 left in tty.c :-(
too much for non-open ptys, but there is normally no problem because the
l_modem(, 0) is a no-op for closed ptys provided the line discipline is
standard and MDMBUF isn't set.
wrong vp's ops vector being used by changing the VOP_LINK's argument order.
The special-case hack doesn't go far enough and breaks the generic
bypass routine used in some non-leaf filesystems. Pointed out by Kirk
McKusick.
Call output process whether or not there is any output. The output
process may be overloaded to handle hardware flow control and
hardware output completions.
hardware. Set the sleep-on flag for the address so there is more
than a small chance that the sleep address is actually used (this
used to work by timing out). Don't bother clearing the sleep-on
flag after a timeout here or elsewhere since leaving it set just
generates a few null calls to wakeup().
Introduce TS_CONNECTED and TS_ZOMBIE states. TS_CONNECTED is set
while a connection is established. It is set while (TS_CARR_ON or
CLOCAL is set) and TS_ZOMBIE is clear. TS_ZOMBIE is set for on to
off transitions of TS_CARR_ON that occur when CLOCAL is clear and
is cleared for off to on transitions of CLOCAL. I/o can only occur
while TS_CONNECTED is set. TS_ZOMBIE prevents further i/o.
Split the input-event sleep address TSA_CARR_ON(tp) into TSA_CARR_ON(tp)
and TSA_HUP_OR_INPUT(tp). The former address is now used only for
off to on carrier transitions and equivalent CLOCAL transitions.
The latter is used for all input events, all carrier transitions
and certain CLOCAL transitions. There are some harmless extra
wakeups for rare connection- related events. Previously there were
too many extra wakeups for non-rare input events.
Drivers now call l_modem() instead of setting TS_CARR_ON directly
to handle even the initial off to on transition of carrier. They
should always have done this. l_modem() now handles TS_CONNECTED
and TS_ZOMBIE as well as TS_CARR_ON.
gnu/isdn/iitty.c:
Set TS_CONNECTED for first open ourself to go with bogusly setting
CLOCAL.
i386/isa/syscons.c, i386/isa/pcvt/pcvt_drv.c:
We fake carrier, so don't also fake CLOCAL.
kern/tty.c:
Testing TS_CONNECTED instead of TS_CARR_ON fixes TIOCCONS forgetting to
test CLOCAL. TS_ISOPEN was tested instead, but that broke when we disabled
the clearing of TS_ISOPEN for certain transitions of CLOCAL.
Testing TS_CONNECTED fixes ttyselect() returning false success for output
to devices in state !TS_CARR_ON && !CLOCAL.
Optimize the other selwakeup() call (this is not related to the other
changes).
kern/tty_pty.c:
ptcopen() can be declared in traditional C now that dev_t isn't short.
Make more functions static.
tty.c:
Use tcflag_t (u_long) and cc_t instead of u_char and int/long.
Don't record values that are only evaluated once.
Compare ints using imin(), not min(). min() is for comparing u_ints.
Old versions of tty.c used the type-safe but multiple-evaluation-unsafe
macro MIN(). The args are apparently never negative; otherwise this
change would be non-cosmetic.
Don't repeat the loop test in ttywait().
tty.h:
Improve English in and formatting of comments.
Use input buffer watermarks of TTYHOG-512 (high) and (high)*7/8
(low) instead of TTYHOG/2 (high) and TTYHOG/5 (low) to agree with
some drivers. 512 is magic and some things depended on TTYHOG/2
>= TTYHOG-512 to work; now they depend on the 512 magic not changing
and TTYHOG-512 being significantly larger than 0. This should be
handled in ttsetwater().
Separate the decision about whether to do input flow control from
doing it. ttyblock() now just starts input flow control (hardware
and/or software) and there is a new function ttyunblock() to stop
it. The decisions are the same except for the watermark changes
and allowing for input expansion for PARMRK.
When flushing input, try harder at first to send a start character
if required, but give up if the first attempt fails.
cy.c, rc.c, sio.c:
Simplify: let ttyinput() handle input flow control if it is not
being bypassed. Use ttyblock() to start flow control otherwise.
rc.c:
Use same input flow control test as elsewhere: test in a more
efficient order and start flow control at >= highwater instead of
at > highwater.
interface is no longer IFF_UP.
The test for IFF_UP in ifpromisc is only useful while enabling IFF_PROMISC
and the higher levels of the bpf code do not allow for the possibility of
failure while shutting down. This is a trivial change.
Also, fixes PR#522.
string as possible and return ENOMEM if the entire string cannot
be returned. This brings the routines in line with how the man
page says they work, and how the calling routines are expecting
them to work. This allows the dummy uname() routine in libc to
obtain the version string, since the kernel version string is
longer than that normally returned by the uname() routine.
This is 3/4 of the fix for PR# 462.
Reviewed by: Bruce Evans