summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Clean up the mesgin code to make it easier to read with proceedure lablesgibbs1995-08-061-55/+49
| | | | | | that are based on what mesage is being processed instead of just numbers. Order the tests for incoming message type by level of occurance.
* Grab next major (68) for the Specialix SI/XIO driver which is due topeter1995-08-053-3/+32
| | | | come in RSN. As Jordan said "First in, first served.."
* Update the SCB controll byte bit definitions to match new SCB_DISCENB bit.gibbs1995-08-052-13/+10
| | | | | Remove "#ifdef NOT_YET"s since the features they pertain too are committed now.
* Total rewrite of the dataphase sections of the sequencer. This was donegibbs1995-08-051-237/+171
| | | | | | | | | | | | 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.
* Add back $Id$ that got nuked in rev 1.6.dg1995-08-051-1/+1
|
* Fix two race conditions.gibbs1995-08-051-9/+8
| | | | | | | | | | | | | 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.
* Use the correct flags (IO_SYNC -> B_SYNC) when deciding to do a sync ordg1995-08-041-3/+3
| | | | | | | async write in the section that changes the filesize. The bug resulted in the updates always being async. Obtained from: 4.4BSD-Lite2
* Make sure that a non-null cookie vector is returned even if there were nodfr1995-08-032-2/+18
| | | | valid entries in the block. Doing otherwise confuses the nfs server.
* Slight changes to locking around VOP_READRIR.dfr1995-08-032-4/+36
| | | | | 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.
* Add support for the va_filerev attribute required by NFSv3.dfr1995-08-028-8/+52
|
* Preserve current termios speed for TIOCSET*, if it matched withache1995-08-021-3/+7
| | | | | nearest valid. It means that gtty+stty transaction (without speed change) not breaks non-standard speeds now.
* Better approximation for TIOCGETP (gtty) for non-standard speeds.ache1995-08-021-9/+18
| | | | | | 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.
* Back out predefined termios speeds check, it can cause troublesache1995-08-021-28/+1
| | | | | | 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 :-(
* Allow any speed from 0..76800ache1995-08-024-56/+16
| | | | | | Reviewed by: Submitted by: Obtained from:
* Lock the directory vnode before VOP_READDIR in nfsrv_readdirplusdfr1995-08-022-2/+6
|
* Check for valid speed values in pty driveache1995-08-023-28/+38
| | | | | | Check for negative speed values in tty drive Back out valid speed values checking from tty drive Suggested by: bde
* Don't set TS_ZOMBIE flag for non-open ptys. ptcclose() has always donebde1995-08-021-4/+6
| | | | | | 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.
* Optimize a bit valid speed search using fact that speed table sortedache1995-08-011-1/+5
| | | | | Submitted by: Obtained from:
* Check for valid speeds in TIOCSET* and return EINVAL for incorrectache1995-08-012-8/+23
| | | | values instead of setting garbadge.
* Removed my special-case hack for VOP_LINK and fixed the problem with thedg1995-08-0117-173/+53
| | | | | | | 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.
* Sync to author's Version 1.3.jkh1995-08-011-10/+21
| | | | Submitted by: james
* Sync to reality for the Gravis Ultrasound MAX card.jkh1995-08-013-12/+30
|
* Obtained from: partly from ancient patches of mine via 1.1.5bde1995-07-312-8/+12
| | | | | | Change all short variables in `struct tty' to int. Shorts were only right on ancient systems with ints optimized for vaxness over efficiency.
* Obtained from: partly from ancient patches of mine via 1.1.5bde1995-07-312-3/+14
| | | | | Handle MDMBUF a little better. Prepare to handle 4 different kinds of output flow control.
* Reserve space for Jim Lowe's impending Matrox Meteor card driver.jkh1995-07-312-1/+23
| | | | Submitted by: james
* Obtained from: an ancient patch of mine via 1.1.5bde1995-07-311-3/+3
| | | | | | 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.
* Obtained from: an ancient patch of mine via 1.1.5bde1995-07-311-1/+2
| | | | | Clear PENDIN when input is flushed so that the handling of future input doesn't get pessimized.
* Eliminate the use of TS_TIMEOUT and ttstrt(). These are for handlingbde1995-07-311-15/+13
| | | | | tab delays etc. pcvt was using them to recover from a (rarely lost) race. Use a little more locking to avoid the race.
* Use tsleep() instead of ttysleep() to wait for carrier since a generationbde1995-07-311-4/+48
| | | | change isn't an error.
* Sleep on a better address to wait for output to drain out of thebde1995-07-313-6/+9
| | | | | | | | 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().
* Obtained from: partly from ancient patches of mine via 1.1.5bde1995-07-3111-103/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Assorted cosmetic changes:bde1995-07-312-41/+33
| | | | | | | | | | | | | | | | | | | 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.
* Improve input flow control.bde1995-07-3110-249/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Try to make the `syn' blocking code act a bit more sensibly - don'tgpalmer1995-07-311-2/+2
| | | | | | | block `syn' packets that have `ack' set. Reviewed by: Submitted by: Obtained from:
* Fix panic("ifpromisc failed") when shutting down a bpf tap when the attachedpeter1995-07-311-7/+7
| | | | | | | | 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.
* Remove a redundant `if' from tcp_reass().olah1995-07-312-8/+4
| | | | | | Correct a typo in a comment (SEND_SYN -> NEEDSYN). Reviewed by: David Greenman
* Fix the sysctl string routines to return as much of thempp1995-07-311-13/+25
| | | | | | | | | | | | 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
* Fix some incorrect comments that make reference to /dev/fd.mpp1995-07-311-4/+4
|
* Return the correct number of I/O ports as part of the probe so that thedufault1995-07-311-1/+1
| | | | conflict resolution works.
* Fix various kernfs file system problems, which can result inmpp1995-07-311-42/+61
| | | | | | | | | | | | | | umountable file systems, hung processes, or system panics: - Some operations could return without decrementing the vnode reference count. - Some operations could leave the vnode locked. - Generalize the /kern/rootdev & rrootdev files so that they are no longer special cased in kernfs_lookup(). Note: procfs, fdescfs, and most of the other miscfs/* file systems also suffer from the same type of problems and I will work on fixing them one at a time.
* Long overdue, more complete, reset code. These changes implement agibbs1995-07-311-180/+592
| | | | | | | | | BUS DEVICE RESET followed by BUS RESET failure recovery strategy including the necesary renegotiation of sync/wide transfers after recovery completes. Clean up debugging code to make it more finely selectable. Reset code debugging is enabled for now so I can get more feedback on how this code behaves in real life.
* Pause the sequencer when message only requests complete. This allows thegibbs1995-07-311-2/+8
| | | | | kernel driver to know the exact state of the sequencer after a BUS DEVICE RESET or ABORT completes so it can properly clean up the request.
* Ignore trailing slashes in pathnames that "refer to a directory",bde1995-07-314-5/+50
| | | | | | | | | | | as is required to be POSIXLY_CORRECT and "right". I interpret "referring to a directory" as being a directory or becoming a directory. E.g., the trailing slashes in mkdir("/nonesuch/"), rename("/tmp", /nonesuch/") and link("/tmp", "/root_can_like_dirs/") are ignored because the target will become a directory if the syscall succeeds. A trailing slash on a symlink causes the symlink to be followed (this is a bug if the symlink doesn't point to a directory; fix later).
* Fix a bug in my disabled version of trap_pfault()...curpcb may be NULL evendg1995-07-303-9/+9
| | | | | when curproc isn't. This condition occurs at system startup and perhaps at other times.
* Rewrote shutdown_nice() to fix the init-not-yet-started panic().dg1995-07-301-3/+3
|
* Don't swap the queue headers to implement concatenation of thebde1995-07-301-14/+23
| | | | | | | | | | | | | | | | | queues for TIOCSETA[W]. Swapping an even number of times broke the queue resource limits. This would have broken CRTSCTS flow control if the clist slush list was used up. Don'concatenate the queues for TIOCSETA[W] if one of the queues has a resource limit of 0. Concatenation would cause a panic if one of the queues is nonempty and the other is limited to length 0. This may have caused panics in PPPDISC. Wake up readers after all transitions of ICANON. When ICANON is turned off it is quite likely that characters will become available to be read. Reduce indentation near these changes.
* Split TS_ASLEEP (sleep on output [below low water])into TS_SO_OLOWAT (sleepbde1995-07-302-39/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | on output below low water) and TS_SO_OCOMPLETE (sleep on output complete). Most of the support for this has already been committed. Drivers should call ttwwakeup() to handle wakeups whenever output is below low water (and some output event causes this condition to be checked) or TS_BUSY is cleared. tty.c: Fix the livelock in ttywait() properly by sleeping on output complete, not on output below low water. Use ttwwakeup() instead of separate select and output wakeups for all wakeups of writers. Add wakeups of writers for output flushes and carrier/clocal transitions. Don't go to sleep in ttycheckoutq() if ttstart() reduces the queue to below low water. Use the timeout built into tsleep() in ttycheckoutq(). Optimize the select wakeup in ttwwakeup(). It seems reasonable to know too much about the internals of tp->t_wsel now that the knowledge is localised in tty.c.
* Add connection drop capability for persist timeouts.dg1995-07-292-2/+19
| | | | | Reviewed by: Andras Olah Obtained from: 4.4BSD-lite2 via W. Richard Stevens
* Add new ``SNAPDATE=""'' for use in snapshot building.rgrimes1995-07-291-1/+5
| | | | Reviewed by: jkh
* Initialize "name" to quiet compiler.dg1995-07-292-4/+4
|
OpenPOWER on IntegriCloud