Commit Graph

3102 Commits

Author SHA1 Message Date
bde
562a666ce0 Test the correct nonblocking flag in ttylclose(). IO_NDELAY is only valid
in read() and write().  FNONBLOCK is valid in ioctl() and close().

The bug caused hung ptys when a process talked to itself using nonblocking
i/o and exited while the slave pty had output to flush.  ttywait() was
called and hung.  Signals didn't work because the process was exiting.
`comcontrol /dev/ttyp0 drainwait 1' worked to terminate the wait.  This
shows that comcontrol is not limited to hardware control.  It has no i386
or driver dependencies and doesn't belong in src/sbin/i386.

Bruce
1995-05-07 06:32:28 +00:00
dyson
f90d96a223 Fixed a calculation that would once-in-a-while cause the swap_pager
to emit spurious page outside of object type messages.  It is not
a fatal condition anyway, so the message will be omitted for
release.  Also, the code that "clips" the allocation size, associated
with the above problem, was fixed.
1995-05-07 03:48:54 +00:00
joerg
09a74d468d Restructured the floppy tape probe.
The ``flags 1'' in the fdc line is now only needed for owners of an
Insight tape (perhaps there aren't any?  Mine is disfunctional).  All
other probes are safe wrt. to the motor-control line of floppy disk
drives.  Document the flag in LINT finally.
1995-05-06 19:34:28 +00:00
dg
00d59a71a5 Fixed mbuf leak and panic that occurred when packets got too memory
fragmented.
Added support for Cogent em100 boards.
Fixed bug that caused BPF to toggle the card to UTP.
Various other improvements.

Submitted by:	Matt Thomas and David Greenman
1995-05-05 20:09:51 +00:00
ache
d9ea51f5f0 Add IPTOS_MINCOST according to RFC 1349
Change IPTOS_PREC_ROUTINE to 0 (was conflict with IPTOS_LOWDELAY) according
to RFC 791 (unchanged since it) and BSDI 2.0 style
Submitted by: Igor Sviridov <siac@ua.net>
1995-05-05 14:36:38 +00:00
dg
fa72d1206b Fix spelling error. Commented out ISO and ISO related things until I
either fix it or we decide to remove it. It requires implementing PCB
hashing to get it to compile and likely a lot more to get it to work..
1995-05-05 07:47:44 +00:00
dg
8af384fe4a Check for 0 before dividing by it. Patch from Paul Traina, modified
slightly by me.
1995-05-05 06:15:11 +00:00
dg
cae3f6f48d Kludged around a problem with "cat /proc/0/regs" causing a panic by
initializing proc0's frame base, too, using cpu_set_init_frame(). It's
a kludge because that macro is intended to be used only for init, but
does what we want nonetheless.
1995-05-04 08:21:24 +00:00
dg
4c16d7d0d2 Kill bogus duplicated code that resulted in an editing screwup of mine
that happend about 4 months ago.
1995-05-04 07:56:23 +00:00
dg
b003b5548b Correct the definition for the (unused) cpu_setstack(). 1995-05-04 07:50:06 +00:00
dg
afc1e20345 bzero the malloced pci_devconf structure. This should fix the problem with
several of freefall's recent crashes.
1995-05-04 06:57:11 +00:00
dufault
588beae4b2 Change defintion of unit to minor(dev). Sorry for not
having this in my local build.  Thanks to gpalmer.
1995-05-03 23:53:32 +00:00
gpalmer
494c18afd2 Try to make this work again. Peter's last changes left it like :
loading kernel
worm.o: Undefined symbol `_STUNIT' referenced from text segment

I copied the STUNIT definition from the old scsiconf.c into this file to
work around this problem.
1995-05-03 23:38:20 +00:00
julian
c5a430dd89 change to reflect reality.
(yes I know I should have done one commit rod....)
1995-05-03 23:10:35 +00:00
julian
9c211af21b remove debugging printouts unless DEVFS_DEBUG is set. 1995-05-03 23:06:31 +00:00
julian
bf92084d76 Submitted by: phk
if the 'time on a node is 0,..
tell the world it is the same as 'boottime'.
This is becasue 'time' is not set up when we create the nodes,
so we can't set them then.
1995-05-03 23:04:26 +00:00
phk
ee1a79f49a Fixed a hard-coded slot number which crept in. 1995-05-03 22:58:07 +00:00
dufault
9d5087634a Moved unit definitions out of scsiconf.h;
Added CONTROL device that only does user-ioctl and nothing else;
Added protection so user-ioctl requires write access;
Clean up scsiconf.h a little. It needs more work.
1995-05-03 18:09:20 +00:00
dg
b8a73effc2 Changed in_pcblookuphash() to not automatically call in_pcblookup() if
the lookup fails. Updated callers to deal with this. Call in_pcblookuphash
instead of in_pcblookup() in in_pcbconnect; this improves performance of
UDP output by about 17% in the standard case.
1995-05-03 07:16:53 +00:00
phk
99b2687d6c Forgot this part of the if_ze power off patch. 1995-05-03 03:04:02 +00:00
phk
c6651ce291 It looks like I broke significant amounts of the commercial software running
on FreeBSD (ie: netscape), so we revert a little bit.  "2.0-" is added back.
1995-05-02 22:20:03 +00:00
dufault
d75bb14f2f Reduce latency by checking FIFO for samples in start
Remove flags by testing register shadow

Handle apparent pending interrupt after interrupts disabled.
1995-05-02 17:29:28 +00:00
ache
8e661e2166 Fix CHOWN_RESTRICTED and NO_TRUNC to return correct values per POSIX 1995-05-02 17:14:38 +00:00
ache
1edbc5cc86 Back out incorrect jkh's fix and apply correct one
(POSIX_SAVED_IDS,POSIX_JOB_CONTROL)
1995-05-02 13:14:59 +00:00
jkh
aa296f63d5 The handling of _SC_SAVED_IDS was wrong; _POSIX_SAVED_IDS has no value
to assign this way!
1995-05-02 12:32:30 +00:00
dg
bdaf4b444d Removed unused variable caused by last commit. 1995-05-02 09:06:04 +00:00
dg
381c266547 Fix for sync() to close a potential panic with accessing a mount struct
that had been freed.

Submitted by:	John Dyson
1995-05-02 08:44:31 +00:00
dg
1678b3aebe Changed object hash list to be a list rather than a tailq. This saves
space for the hash list buckets and is a little faster. The features
of tailq aren't needed. Increased the size of the object hash table
to improve performance. In the future, this will be changed so that
the table is sized dynamically.
1995-05-02 05:57:11 +00:00
dg
a9fbfe29ca Added prototype for memcpy(). Changed size argument of "b" functions to
size_t.
1995-05-02 05:35:07 +00:00
dg
36960fe1d2 Added a memcpy() routine. 1995-05-02 05:20:26 +00:00
phk
33a7eda710 A missing 'and', probably my fault.
Submitted by:	Ed Hudson <elh@p5.spnet.com>
1995-05-02 04:40:06 +00:00
phk
93bec984db Do the obvious thing: when the interface is downed, power off the card.
When up'ed again: reapply power.  This means that you can leave your card
in, you don't need to reboot to avoid the power drain.
1995-05-02 04:03:07 +00:00
dyson
dce343626d Fixed a problem that can cause left-over pv_entries and as
as side-effect, removed some legacy code that was necessary
when we called vm_fault inside of vm_fault_quick instead of using
the kernel/user space byte move routines.
1995-05-01 23:32:30 +00:00
dyson
7972592fe7 Limit filesize to the amount that the VM system can currently handle
(2GB).  If this limit is not imposed, then filesystem corruption will
ensue when files larger than 2GB are created.  This is temporary,
and the underlying limitation will be removed later.
1995-05-01 23:20:24 +00:00
gibbs
4844e93310 Aaron Daily of Adaptec has informed me that some form of paged SCB
algorithm is used on aic7770 Rev E or higher chips to improve perfomance.
This required a hardware change but we don't know exactly what (most
likely some special register to do fast SCB indexing into host memory),
and we are not at all sure that there are more than 4 SCBs on these
chips.  This probe will still classify the revision of the aic7xxx, but
we now default to 4 SCBs (at least until we know more of what was done).

This also fixes a bug in the timeout routine where we cleared a flag
too soon making it imposible to enter one section of the routine.

Submitted by: Timeout bug - Dan Eischen <deischen@iworks.InterWorks.org>
1995-05-01 18:43:14 +00:00
gibbs
b5e924a383 Set the return value (outb'd to the sequencer) for non zero status
interrupts to zero to start with.  This is the value we return in
most cases.  The sense code then outbs the apropriate value to cause
sense retrieval.  The return value was uninitialized before this
change (something that was an okay thing with the old sequencer code,
but not with the semantics of the new).

This problem caused us to always retrieve sense upon recieving a non
zero status byte.  This is exactly what was happening for the "target
busy" status returned by exabyte tape drives when they rewind or
power on with a tape installed.  The request sense proved fatal.
This should fix the tape problems.
1995-05-01 09:49:45 +00:00
phk
7cb2df48bc When past cyl 1024 it's ok if CHS is (0xff,0xff,0xff).
It's actually recommended it seems...
1995-05-01 00:45:33 +00:00
julian
c36f9f2e7e This is a purely cosmetic change
but it outlines what I'm GOING to do to this file.
It's sort of an unignorable notification of coming changes..

This is a bit rude I understand.. but I can't afford to haqve the
diskslice code  drifting off too much further from a workable system
and I think I need to jump in now to make it obvious what has to be done
before it's too late.

appologies to bruce in advance.
1995-05-01 00:07:17 +00:00
julian
44dd26d43a making a reservation for more bits before people start using them
in the minor number, (this stuff HAS to go!)
The change I want is:
/*
       3                   2                   1                   0
     1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
    _________________________________________________________________
    | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
    -----------------------------------------------------------------
    |      TYPE           | SLICE   |  MAJOR?       |  UNIT   |PART | <-now
    -----------------------------------------------------------------
    |      TYPE     |PART2| SLICE   |  MAJOR?       |  UNIT   |PART | <-soon
    -----------------------------------------------------------------

        I want 3 more part bits (taken from 'TYPE' (useless as it is) (JRE)
*/
1995-04-30 23:48:27 +00:00
bde
04e7b380b7 Change dsioctl() interface to allow DIOCSYNCSLICEINFO to update the caller's
slice pointer and to print the device name in error messages.

Finishing implementing DIOCSYNCSLICEINFO (except for locking).
1995-04-30 15:16:02 +00:00
bde
8467ec16ea Change dsioctl() interface to allow DIOCSYNCSLICEINFO to update the caller's
slice pointer and to print the device name in error messages.
1995-04-30 15:14:34 +00:00
bde
8427285121 Define CDTR_IFLOW and CDSR_OFLOW which are now required for compiling
bin/stty.  Define alias CCAR_OFLOW for MDMBUF.

Declare speeds as having type speed_t instead of long.  speed_t is
long, which is wrong (POSIX specifies it to be unsigned integral),
but fixing it might introduce more serious bugs.
1995-04-30 14:56:30 +00:00
ache
e3f0259d91 Fix handling of POSIX_JOB_CONTROL and POSIX_SAVED_IDS,
pointed out by Bruce.
1995-04-30 11:30:12 +00:00
dg
0050e4a000 Added UIO_NOCOPY case to ureadc() to quiet gcc. 1995-04-30 05:11:46 +00:00
dg
462e0d4d02 Check for curproc != NULL before dereferencing it. 1995-04-30 05:09:13 +00:00
joerg
7fe1f94498 Finally implement the kernel hook for the "mt eom" command. (The
user-level part has already been commited.)

Note that i've lost the "official" code for this; it went into the
system after 1.1.5.1.  The commited code is my own version, but it has
proven to work for me for more than a year now.
1995-04-29 21:30:29 +00:00
dufault
3710598186 Submitted by: ache
Fix extra newline during SCSI_VERBOSE.
1995-04-29 17:52:44 +00:00
bde
dd62103364 Fix misplaced idempotency #endif.
Fix tabs and spaces in the wrong places.
1995-04-29 15:24:00 +00:00
ache
ef44f537d3 Enable _POSIX_SAVED_IDS and fix comment to describe current situation 1995-04-29 14:20:35 +00:00
ache
e9b0cedd67 set[ug]id(): call suser() only when neccesarry
Submitted by: bde
1995-04-29 11:46:15 +00:00