Commit Graph

16331 Commits

Author SHA1 Message Date
Marcel Moolenaar
3bde119b1e Fix LINUX_TIOC{S|G}SERIAL implementation. Both do not copy data in or out
of kernel space. Remove the ioctl supporting functions, and move the actual
code to the switch-statement. Now everybody can clearly see that the
implementation is really poor.

Also fix a typo in LINUX_TIOCGETD. The underlying function was given command
TIOCSETD instead op TIOCGETD...
1999-08-14 13:26:44 +00:00
Nick Hibma
dd473d08e0 Minor spelling glitch 1999-08-14 13:20:04 +00:00
Poul-Henning Kamp
49ff4debd3 Spring cleaning around strategy and disklabels/slices:
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout.
please see comment in sys/conf.h about the flag argument.

Remove strategy argument from all the diskslice/label/bad144
implementations, it should be found from the dev_t.

Remove bogus and unused strategy1 routines.

Remove open/close arguments from dssize().  Pick them up from dev_t.

Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
1999-08-14 11:40:51 +00:00
Mark Newton
5462f43fb0 Avoid possible panic by checking for EFAULT from copyinstr() during
pathname translation.

Submitted by:	green
1999-08-14 10:52:33 +00:00
Marcel Moolenaar
86cfb28d8d Fix the LINUX_TCSET{A|AW|AF} and LINUX_TCSET{S|SW|SF} ioctls. These all suffer
from the same bug in that the argument is not first copied from user space
before it is used. This is part 2 (of 2) of the termios fixes.
1999-08-14 10:30:38 +00:00
Marcel Moolenaar
432d528c8d Fix a couple of termio/termios conversion bugs/typos/dupos/brainos and other
changes. This is part 1 of the complete termios ioctl fixes.

o  change type of c_{i|o|c|l}flag in struct termios from unsigned long to
   unsigned int. The type now matches the Linux definitions.
o  replaced constants by the corresponding defines in sptab[] for clarity.
   Since there's no define for 135 baud, its mapping has been dropped.

function bsd_to_linux_termios:
o  Fix typo IXON -> IXANY.
o  Remove bogus assignment to c_cc[LINUX_VSWTC].

function linux_to_bsd_termios:
o  Fix dupo LINUX_IXON -> LINUX_IXANY.
o  Add LINUX_CREAD mapping.
o  Fix typo IEXTEN -> LINUX_IEXTEN.

function linux_to_bsd_termio:
o  Small optimization: Don't preset the complete c_cc array when we next
   assign to the first LINUX_NCC entries.
1999-08-14 10:05:50 +00:00
Greg Lehey
af78609425 Tidy up comments.
Add definitions for VINUM_BLOCK_PLEX and VINUM_CHAR_PLEX.

struct plex: add lock-related variables.

struct rangelock: add variables.
1999-08-14 06:31:37 +00:00
Greg Lehey
c515a27bbd Clean up comments.
Don't return "can't do it" when the user requests a state change to
the current state.  This previously caused silly messages like "Can't
start <foo>: invalid argument", when in fact <foo> was already
started.

set_plex_state: don't set state for non-existent plexes.

update_plex_status: as long as we have initializing subdisks, we're
		    initializing.
1999-08-14 06:30:56 +00:00
Greg Lehey
b8962e0ff8 Clean up some comments.
Move the declaration of freerq() to request.h.

logrq: add support for lock events.

vinumstart: solve a problem where removing a plex from an active
	    volume could cause attempts to access non-existent plexes.

launch_requests: don't set a request group active until we're sure we
		 can launch it.  This caused some hangs under unusual
		 circumstances.

bre: don't set XFR_BAD_SUBDISK if we're not going to use it.

build_read_request: correct recovery, which caused some hangs under
		    (other) unusual circumstances.

build_rq_buffer: don't set bp->b_dev if we don't have a dev.

sdio: clean up, remove obsolete code.

deallocrqg: unlock any locks the rqg may have.
1999-08-14 06:30:15 +00:00
Greg Lehey
a87d57a3e8 Tidy up some comments.
bre5:
  Shorten some lines.

  Desired-by:  bde

  If we're reading from a short plex, return EOF indication.

  Always lock the stripe before starting a transfer.  Hopefully the
  current version will solve some data integrity problems that have
  been reported with degraded RAID-5 plexes.

  Reported-by:	Bernd Walter <ticso@cicely.de>
		Remy Nonnenmacher <remy@synx.com>
1999-08-14 06:29:25 +00:00
Greg Lehey
e5738c9f66 Add keypairs replace and readpol. These got forgotten in a previous
commit, but since they don't work yet, nobody noticed.
1999-08-14 06:28:48 +00:00
Greg Lehey
998115ba43 rewrite lockrange and unlockrange. Hopefully the current version will
solve some data integrity problems that have been reported with
degraded RAID-5 plexes.

Reported-by:	Bernd Walter <ticso@cicely.de>
		Remy Nonnenmacher <remy@synx.com>
1999-08-14 06:28:21 +00:00
Greg Lehey
56a39b0546 Add hotspare keyword. 1999-08-14 06:27:52 +00:00
Greg Lehey
55eecd1064 vinumioctl: add ioctls for raw subdisks and plexes. Remove code for
drives (we refuse to touch drives, that's the disk driver's business).
1999-08-14 06:27:25 +00:00
Greg Lehey
4fd49b9f73 Remove some XXX comments (they're not really gone, just invisible).
Tidy other comments.

open_drive: don't call set_drive_state if we decide to take it down.
This could help avoid some race conditions with the daemon.

init_drive: don't set the drive down, we'll let close_locked_drive do
that.

close_locked_drive: set drive state to down without calling
set_drive_state.  This could help avoid some race conditions with the
daemon.

driveio: remove the function, it wasn't being used.

get_volume_label: remove volume dependencies so that we can return a
label for plexes and subdisks as well.  What a kludge.
1999-08-14 06:26:32 +00:00
Alan Cox
514bfcc440 Don't create a "struct vpgqueues" for PQ_NONE. 1999-08-14 06:25:54 +00:00
Greg Lehey
6dd671ea60 Remove some XXX comments (they're not really gone, just invisible).
Remove declarations for freerq and free_rqg.

Remove DEBUG_RESID code.

freerq: check whether the request is holding a lock, free if so.

free_rqg: remove.  It wasn't being used any more.

Change the Debugger calls to panics.
1999-08-14 06:25:52 +00:00
Greg Lehey
5425c19ce4 Change definitions for get_volume_label, lockrange.
Move definition for unlockrange to request.h (it now contains
request-related parameters).

Add sddownstate.
1999-08-14 06:25:14 +00:00
Greg Lehey
b7904c2bf9 Add code which someday will help support hot spares.
checkdiskconfig(): remove.  It didn't make any sense to complain about
kernel keywords in user config files; it just made it more difficult
to convert.  Now we ignore kernel keywords if we're not in kernel
mode.

get_empty_sd: initialize sectors.

free_drive: don't close if we don't have a vp.  Maybe this will help
fix the problem that peter had, but I wouldn't count on it.

config_plex: If the plex is RAID-5, give it a rangelock structure.

start_config: Reset current drive, plex and volume so that a new
'create' command doesn't get long-dead defaults.
1999-08-14 06:24:34 +00:00
Greg Lehey
466c1060d9 vinumopen: add code for opening raw plexes. Volume-related plex
devices will probably die a death soon (yes, DES, that's correct
usage).
1999-08-14 06:22:15 +00:00
Greg Lehey
98256dfef8 Clarify some comments.
struct rqelement, enum rqinfo_type, struct rqinfo, union rqinfou: add
lock requests.

Add declarations for freerq and unlockrange.  Since they include
request structures, they can't go in vinumext.h
1999-08-14 06:21:45 +00:00
Bill Paul
b7f6c65f7c Grrrr. Fix a really lame bug that I tripped over while testing my miibus
stuff: unregister_methods() is horribly broken. The idea, if I'm not mistaken,
is that the refcount on a method is decremented, and only when it reaches
zero is the method freed. However desc->method is set to NULL unconditionally
regardless of the refcount, which means the method pointer is trashed the
first time the method is deallocated. The obvious detrimental effect is
that memory is leaked. The not so obvious effect is that when you call
unregister_method() the second time on the same method, you get a NULL
pointer dereference and a panic.

Now I can successfully unload network device drivers and the miibus module
without crashing the system.

*sigh*
1999-08-14 05:11:01 +00:00
Greg Lehey
efabbb14f9 Bring up to date to work with -CURRENT. 1999-08-14 04:56:14 +00:00
Poul-Henning Kamp
9dd668458b Add a notice saying that FreeBSD no longer tracks the PPS-API WG's drafts. 1999-08-13 20:56:35 +00:00
Alan Cox
f7fc307ade vm_map_madvise:
A complete rewrite by dillon and myself to separate
	the implementation of behaviors that effect the vm_map_entry
	from those that effect the vm_object.

	A result of this change is that madvise(..., MADV_FREE);
	is much cheaper.
1999-08-13 17:45:34 +00:00
Poul-Henning Kamp
2820b2e762 Add support for device drivers which want to track all open/close
operations.  This allows a device driver better insight into
what is going on that the current:

        proc1:  open /dev/foo R/O
                        devsw->open( R/O, proc1 )
        proc2:  open /dev/foo R/W
                        devsw->open( R/W, proc2 )
        proc2:  close
                        /* nothing, but device is
                           really only R/O open */
        proc1:  close
                        devsw->close( R/O, proc1 )
1999-08-13 16:29:27 +00:00
Dmitrij Tejblum
e9e879c34d Fix a warning on the alpha. 1999-08-13 16:17:54 +00:00
Dmitrij Tejblum
deebad912c Fix warnings. (Initializer of promcons did miss an element in the start.) 1999-08-13 16:02:32 +00:00
Marcel Moolenaar
7636612d50 Implementation of the CDROMSUBCHNL ioctl. 1999-08-13 14:44:13 +00:00
Poul-Henning Kamp
b3d7d91f32 Don't examine vp->v_tag (see comment in vnode.h) 1999-08-13 13:05:08 +00:00
Poul-Henning Kamp
0232a25188 oops: Add missing include. 1999-08-13 11:22:48 +00:00
Poul-Henning Kamp
3a965c0db0 Move the special-casing of stat(2)->st_blksize for device files
from UFS to the generic level.  For chr/blk devices we don't care
about the blocksize of the filesystem, we want what the device
asked for.
1999-08-13 10:56:07 +00:00
Poul-Henning Kamp
608bb3ffdf Remove spec_getattr(), which as far as I can tell can never be called from the current code-paths, and if it were, would panic on any unmounted bdev. 1999-08-13 10:53:58 +00:00
Poul-Henning Kamp
7248b5ce36 Register our dev_t with make_dev 1999-08-13 10:52:22 +00:00
Poul-Henning Kamp
7dc5cd047f The bdevsw() and cdevsw() are now identical, so kill the former. 1999-08-13 10:29:38 +00:00
Poul-Henning Kamp
4d4f932326 s/v_specinfo/v_rdev/ 1999-08-13 10:10:12 +00:00
Marcel Moolenaar
0839a7e83d In doing lock type conversion (struct flock), make sure that carbage in results
in deterministic behaviour. In this case known garbage out.
The fix is different than suggested in the PR.

PR: 12749
Originator: Boris Nikolaus <boris@cs.tu-berlin.de>
1999-08-13 09:27:54 +00:00
KATO Takenori
a544017cd3 Merge from sys/i386/conf/majors.i386 revision 1.82. 1999-08-13 04:59:47 +00:00
KATO Takenori
fd8d953545 Merge from sys/boot/i386/libi386/bootinfo.c revision 1.21. 1999-08-13 02:05:07 +00:00
Alan Cox
1aefb1d957 Make the default page coloring parameters match a (non-Xeon) Pentium II/III.
This setting is also acceptable for Celerons and Pentium Pros
with less than 1MB L2 caches.

Note: PQ_L2_SIZE is a misnomer.  The correct number of colors is
a function of the cache's degree of associativity as well as its size.

Submitted by:	bde and alc
1999-08-12 21:16:53 +00:00
Alfred Perlstein
f4af31cb1c Replace a redundant vfs_object_create() call (already done in vn_open)
with a KASSERT.

Reviewed by: Eivind, Alan Cox
1999-08-12 20:38:32 +00:00
Marcel Moolenaar
00d3c51669 Use a wrapper for the link syscall that does name translations.
PR: 12749
Submitted by: Boris Nikolaus <boris@cs.tu-berlin.de>
1999-08-12 19:53:33 +00:00
Nick Hibma
e0f5b7a3be Protect the file interface against disconnects. 1999-08-12 18:55:41 +00:00
Dmitrij Tejblum
e868365294 nfs_getcacheblk() can return 0 if the mount is interruptible. It need to be
checked by the caller.

Broken in: rev. 1.70 (1999/05/02)
1999-08-12 18:04:39 +00:00
Alan Cox
193b935887 vm_object_madvise:
Update the comments to match the implementation.

Submitted by:	dillon
1999-08-12 08:22:57 +00:00
Alan Cox
58b4e6cc84 vm_object_madvise:
Support MADV_DONTNEED and MADV_WILLNEED on object types
	besides OBJT_DEFAULT and OBJT_SWAP.

Submitted by:	dillon
1999-08-12 06:33:56 +00:00
Peter Wemm
e426af039f Make subr_bus.c actually compile with -DBUS_DEBUG 1999-08-11 22:55:39 +00:00
Andrew Gallatin
563c65de90 Now that all chipsets support S/G DMA (which is required for ISA devices)
we can enable the floppy disk
1999-08-11 22:33:57 +00:00
Andrew Gallatin
7f146cdf3d Enable S/G IO. Based on Doug's changes to cia.c 1999-08-11 22:31:01 +00:00
Nik Clayton
2395507999 Add CPT_NOA, LIBCOMPAT, NODEF, NOARGS, NOPROTO, and NOIMPL to the commented
list of available types.

PR:             docs/13007
Submitted by:   Assar Westerlund <assar@sics.se>
1999-08-11 22:13:46 +00:00
Peter Wemm
3af0907ba4 Zap some stray references to DRIVER_TYPE_foo in the BUS_DEBUG case, as
discovered by Bill Paul.
1999-08-11 22:05:17 +00:00
Warner Losh
fdf4e8b30c Stop profiling on exec.
Obtained from: NetBSD
1999-08-11 20:35:38 +00:00
Alan Cox
7308467da9 _pmap_allocpte:
If the pte page isn't PQ_NONE, panic rather than silently
	covering up the problem.
1999-08-11 19:19:04 +00:00
Luigi Rizzo
772759420f Implement probabilistic rule match in ipfw. Each rule can be associated
with a match probability to achieve non-deterministic behaviour of
the firewall. This can be extremely useful for testing purposes
such as simulating random packet drop without having to use dummynet
(which already does the same thing), and simulating multipath effects
and the associated out-of-order delivery (this time in conjunction
with dummynet).

The overhead on normal rules is just one comparison with 0.

Since it would have been trivial to implement this by just adding
a field to the ip_fw structure, I decided to do it in a
backward-compatible way (i.e. struct ip_fw is unchanged, and as a
consequence you don't need to recompile ipfw if you don't want to
use this feature), since this was also useful for -STABLE.

When, at some point, someone decides to change struct ip_fw, please
add a length field and a version number at the beginning, so userland
apps can keep working even if they are out of sync with the kernel.
1999-08-11 15:34:47 +00:00
Luigi Rizzo
706aa7f870 Add spl() protection to remove that the timer is invoked multiple
times resulting in higher bandwidth and lower delays.
Reported-by: Jamshid Madhavi
1999-08-11 14:37:58 +00:00
Alfred Perlstein
59d5fe5a90 When doing a dump, if ENODEV is returned explain what happened to the user,
"the device doesn't support a dump routine"

Only print "dump succeeded" when 0 is returned, instead of when an unexpected
error number is returned, print that error number.

Reviewed by: Eivind
1999-08-11 14:02:20 +00:00
Marcel Moolenaar
175db64b3e Do not map {s|g}etrlimit onto FreeBSD syscalls. The arguments don't match.
The linux syscalls translate the arguments first before invoking the
FreeBSD native syscalls.

PR: kern/9591
Originator: John Plevyak <jplevyak@inktomi.com>
1999-08-11 13:34:31 +00:00
Marcel Moolenaar
10ef1b2aae Do not map {s|g}etrlimit onto the FreeBSD syscalls. The arguments do not
match.

PR: kern/9591
Originator: John Plevyak <jplevyak@inktomi.com>
1999-08-11 13:29:48 +00:00
Jordan K. Hubbard
8b67cbda75 Reserve bdev/cdev entries for i2o driver.
Requested by:	Simon Shapiro
1999-08-11 05:28:06 +00:00
Alan Cox
6c91c1dc3f contigmalloc1:
If a page is found in the wrong queue, panic instead
	of silently ignoring the problem.
1999-08-11 05:12:00 +00:00
Warner Losh
95c20645bf mfs: DOC2K label type for legacy labels 1999-08-11 03:02:05 +00:00
Peter Wemm
ed6d0b65f0 Add a contigfree() as a corollary to contigmalloc() as it's not clear
which free routine to use and people are tempted to use free() (which
doesn't work)
1999-08-10 22:21:13 +00:00
Søren Schmidt
f63c7e582a Support DMA on ATAPI devices (finally).
This makes my system use only ~5% CPU on reading 4.5Mbyte/sec
from a CDROM, which before was limitted to 1.8Mbyte/sec due
to 100% CPU load..
1999-08-10 21:59:58 +00:00
Bill Paul
ee67e42e43 Small tweak: remember to free the tx ring data (which is malloc()ed) if
we have to bail out of vr_attach().
1999-08-10 21:12:11 +00:00
Bill Paul
8674aa45c7 Convert the Winbond driver to newbus and have it compiled as a module. 1999-08-10 21:09:12 +00:00
Bill Paul
08339b4fa4 Convert the VIA Rhine driver to newbus and set it up to be compiled as
a module. Also modified the code to work on FreeBSD/alpha and added
device vr0 to the alpha GENERIC config.

While I was in the neighborhood, I noticed that I was still using
#define NFPX 1 in all of the Makefiles that I'd copied from the fxp
module. I don't really use #define Nfoo X so it didn't matter, but
I decided to customize this correctly anyway.
1999-08-10 17:15:20 +00:00
Andrew Gallatin
cf54c5ff42 - detect the number of pchips actually present; don't just assume 2
- support S/G DMA for ISA devices
1999-08-10 13:54:50 +00:00
Andrew Gallatin
d9be205559 Support S/G DMA so that ISA devices (like the floppy disk) work.
Based on Doug's changes to cia.c

tested by: Matthew Jacob <mjacob@feral.com>
1999-08-10 13:30:25 +00:00
KATO Takenori
3e2f6b448c Cosmetic changes in PC98 functions:
- Removed spaces after `(' and preceding `)'.
  - Added missing spaces after commas.
  - Fixed indentations.
1999-08-10 13:24:18 +00:00
KATO Takenori
b400b886d8 Fixed a compiler warning by conversion from pointer to integer. 1999-08-10 12:55:06 +00:00
Dag-Erling Smørgrav
18d3153ead Add net.inet.icmp.log_redirect and net.inet.icmp.drop_redirect, for
respectively logging and dropping ICMP REDIRECT packets.

Note that there is no rate limiting on the log messages, so log_redirect
should be used with caution (preferrably only for debugging purposes).
1999-08-10 09:45:33 +00:00
Dag-Erling Smørgrav
875f316170 Re-order list. 1999-08-10 09:42:32 +00:00
Peter Wemm
accc665bbe Hopefully fix the previous commit, it caused *all* bridges to be detected
as PCI->HOST bridges on my (440BX) box.

My change is to remove the test at the beginning entirely, letting the
switch on the device ID happen first.  If the device ID is unknown, then
(in the default case) check for the generic PCIS_BRIDGE_HOST tag.  This
should allow wierd cases (eg: wpaul's IMS VL bridge) to work by using the
id override.  This strategy is more in line with the other PCI match
methods we use elsewhere,

I only have a limited testbed, but having my USB etc devices detected as
PCI->HOST bridges doesn't look good.
1999-08-10 09:22:21 +00:00
KATO Takenori
4562af8f9b - Removed unused variable.
- Fixed missing argument of printf.
- Fixed printf format.
- Added parentheses suggested by the compiler.
1999-08-10 09:13:48 +00:00
KATO Takenori
b607544c9f Sync with sys/i386/conf/userconfig.c revision 1.152. 1999-08-10 08:35:57 +00:00
Warner Losh
d64292d252 Use the latest version of these files from OpenBSD.
1) Safty change from casper dik was added to OpenBSD's sources since I
   grabbed them. milltert@openbsd.org
2) Split up strlcpy to improve efficiency of the common case.
   milltert@openbsd.org
3) Cleanup of cross references for man page.  {alex,aaron}@openbsd.org

Pointed out by: deraadt@openbsd.org
1999-08-10 05:58:58 +00:00
Warner Losh
a41df9e30e Import strl{cat,cpy} from OpenBSD.
Obtained from: OpenBSD
1999-08-10 05:21:31 +00:00
Alan Cox
5abfdd1eef vm_map_madvise:
Now that behaviors are stored in the vm_map_entry rather than
	the vm_object, it's no longer necessary to instantiate a vm_object
	just to hold the behavior.

Reviewed by:	dillon
1999-08-10 04:50:20 +00:00
Alan Cox
7f8d227938 pmap_remove_pages:
Add KASSERT to detect out of range access to the pv_table and
	report the errant pte before it's overwritten.
1999-08-10 04:10:57 +00:00
Matthew N. Dodd
2825e76714 Add support for the Am79C978. (AMD PCHome/PCI Ethernet adapter)
See: http://www.amd.com/products/npd/overview/homenetworking/intro.html

PR: kern/12275
Submitted by: Robert Watson <robert@cyrus.watson.org>
1999-08-10 01:03:51 +00:00
Bill Paul
d9d628b000 Fix nexus_pcib_is_host_bridge() so that it detects my 486's PCI bus
correctly. It has the following code:

        if (class != PCIC_BRIDGE || subclass != PCIS_BRIDGE_HOST)
                return NULL;

My 486 has an Integrated Micro Solutions PCI bridge which identifies
itself as subclass PCIS_BRIDGE_OTHER, not PCIS_BRIDGE_HOST. Consequently,
it gets ignored. In my opinion, the correct test should be:

        if ((class != PCIC_BRIDGE) && (subclass != PCIS_BRIDGE_HOST))
                return NULL;

That way the test still succeeds because the chip's class is PCIC_BRIDGE.
Clearly it's not reasonable to expect all host to PCI bridges to always
have a subclass of PCIS_BRIDGE_HOST since I've got one that doesn't.
This way the sanity test should remain relatively sane while still allowing
some oddball yet correct hardware to work. If somebody has a better way
to do it, go ahead and tweak the test, but be aware that
class == PCIC_BRIDGE and subclass == PCIS_BRIDGE_OTHER is a valid case.

While I was here, I also added an explicit ID string for the IMS chipset.
I also dealt with a minor style nit: it's bad karma not to have a default
case for your switch statements, but the one in this routine doesn't have
one. The default string of "Host to PCI bridge" is now assigned in a
default case of the switch statement instead of initializing "s" with the
string before the switch and then not having any default case.
1999-08-09 21:12:18 +00:00
Matthew N. Dodd
41ff460e00 chip0: <PCI to 0x80 bridge (vendor=10e0 device=8849)> at device 0.0 on pci0
Isn't really that useful.

chip0: <PCI to Other bridge (vendor=10e0 device=8849)> at device 0.0 on pci0

is more in keeping with the spirit of the rest of the code.

Previous behavior with regard to truely unknown bridges unchanged.

"<Anti-Bill> Tell you what: you have commit privs now. You do it."
1999-08-09 21:11:44 +00:00
John Polstra
a4f59f8289 Include <sys/queue.h> since this header now depends on it. 1999-08-09 18:45:20 +00:00
Peter Wemm
a063132590 A little more tidying up. 1999-08-09 14:43:39 +00:00
Peter Wemm
b2368001b4 Expand a heap of macros that obscure readability and are no longer needed
here, and do a bit of general tidy up.
1999-08-09 14:15:46 +00:00
Mike Pritchard
51979813dd Remove a reference to config(8) when IRQ 2 is remapped to IRQ 9.
Config(8) contains no documentation about this.

Fix the help for the PnP irq and drq commands.  This one caused
me a bit of head scratching the other night while trying to get
a problematic PnP device configured properly.
1999-08-09 13:52:12 +00:00
Peter Wemm
ac6b4b7c14 More pre-lite2 support zapped and some more tidy-up. 1999-08-09 13:24:55 +00:00
Peter Wemm
48cadfb15e Unifdef -D__FreeBSD__ - and remove pre-lite2 support. 1999-08-09 13:15:53 +00:00
Peter Wemm
d1292ac4bc Unifdef -U__NetBSD__ 1999-08-09 13:07:37 +00:00
Yoshihiro Takahashi
91ec7ad5f7 Fixed checking a type of the interface.
Submitted by:   Tomohiko Kurahashi <kura@tim.hi-ho.ne.jp>
1999-08-09 13:03:35 +00:00
Peter Wemm
28acbab4e0 Unifdef -U__bsdi__ 1999-08-09 13:01:58 +00:00
Peter Wemm
fff7a5bef5 s/Id/FreeBSD/ 1999-08-09 12:52:49 +00:00
Peter Wemm
b46f22127f Strip __FreeBSD_version >= 300000 conditionals. 1999-08-09 12:50:12 +00:00
Peter Wemm
3d3bfc5db5 Merge changes from NetBSD rev 1.82 -> 1.86 via vendor branch.
Among the changes:  1.84: support compex 4-port cards.
1999-08-09 12:29:29 +00:00
Poul-Henning Kamp
f1fe3bf115 make alpha compile again. 1999-08-09 11:02:45 +00:00
Poul-Henning Kamp
ce9edcf5b5 Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
1999-08-09 10:35:05 +00:00
Jordan K. Hubbard
1cd5e91532 This uses an SLIST_ENTRY and breaks the build without sys/queue.h. Commit
this until bde and friends finish arguing over what to do instead. :)
1999-08-09 06:50:07 +00:00
Poul-Henning Kamp
1a03ce6c63 Remove compile time limit on number of devices. 1999-08-08 22:25:46 +00:00
Poul-Henning Kamp
fca3f34ff8 Passing the unit number to an interrupt routing is kind of narrowminded,
add a way to get the entire struct ppb_device back.
1999-08-08 22:25:21 +00:00
Poul-Henning Kamp
fa81b03de6 Remove compiled in limit on number of devices. 1999-08-08 22:01:50 +00:00
Poul-Henning Kamp
57ad459b75 register tty devices so they will look right in pstat. 1999-08-08 21:35:17 +00:00
Poul-Henning Kamp
4cb4c215e5 Allocate and register struct tty on the fly. 1999-08-08 20:25:14 +00:00
Poul-Henning Kamp
7517504c24 Enable ttymalloc(). 1999-08-08 20:24:58 +00:00
Peter Wemm
61ec30585f s/TULUP/TULIP/ - from vendor branch. 1999-08-08 19:56:06 +00:00
Poul-Henning Kamp
08add33166 Add new sysctl "kern.ttys" which return all the struct tty's which have
been registered with ttyregister().

register ptys with ttyregister().
1999-08-08 19:47:32 +00:00
Poul-Henning Kamp
ef40c56108 Make the pty driver as close to a cloning device as we can get for now,
we create the pty on the fly when it is first opened.

If you run out of ptys now, just MAKEDEV some more.

This also demonstrate the use of dev_t->si_tty_tty and dev_t->si_drv1
in a device driver.
1999-08-08 19:28:59 +00:00
Poul-Henning Kamp
0ef1c82630 Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,
a few lines into <sys/vnode.h>.

Add a few fields to struct specinfo, paving the way for the fun part.
1999-08-08 18:43:05 +00:00
Poul-Henning Kamp
65cbe74cc0 Avoid symbol clash in LINT. 1999-08-08 18:17:40 +00:00
Chris Costello
5f3136d4ea Fix a reference to st' by replacing it with sa'. 1999-08-08 16:27:17 +00:00
Bruce Evans
890c628e79 Fixed all printf format errors reported by gcc -Wformat on i386's:
- %q -> %ll.

Fixed nearby errors not reported by gcc -Wformat on i386's:
- don't assume that the promotion of [u_]int64_t is [u_]quad_t.
- don't use signed formats for unsigned args.
1999-08-08 14:11:03 +00:00
Bruce Evans
dd26feb90b Fixed printf format errors (%qu -> %llu; the arg was already unsigned long
long to hide problems on alphas).
1999-08-08 13:43:51 +00:00
Bruce Evans
f09d6e3daa Fixed all printf format errors reported by gcc -Wformat on i386's:
- %q -> %ll; don't assume that the promotion of off_t is quad_t; only
  assume that off_t's are representable as long longs.
- printing of dev_t's was completely broken.

Fixed nearby printf format errors not reported by gcc -Wformat on i386's:
- printing of ino_t's and pointers was sloppy.
1999-08-08 13:22:05 +00:00
Marcel Moolenaar
6a6ea79ac8 Fix page fault in linux_uselib syscall.
PR: 12910
Submitted by: Peter Holm <peter@holm.cc>
1999-08-08 11:26:46 +00:00
KATO Takenori
e0ecb87a2b Sync with sys/i386/conf/options.i386 revision 1.119. 1999-08-08 11:13:47 +00:00
KATO Takenori
96a5f069f9 Sync with sys/i386/conf/majors.i386 revision 1.81. 1999-08-08 11:12:51 +00:00
KATO Takenori
ffd6f0c6a7 Sync with sys/i386/conf/files.i386 revision 1.257. 1999-08-08 11:12:00 +00:00
KATO Takenori
353299befe Enable bpf by default. 1999-08-08 11:09:28 +00:00
KATO Takenori
9f20674d4c Fix a panic caused by freeing unallocated structure.
Submitted by:	Tomohiko Kurahashi <kura@tim.hi-ho.ne.jp>
1999-08-08 10:06:27 +00:00
Greg Lehey
74f13f199c Add vinumraid5.c to the files for Vinum. This allows (deprecated)
kernel builds with Vinum.

Linted-by:	phk
1999-08-08 08:29:58 +00:00
Jordan K. Hubbard
b3a415b1b6 The following simplifies newvers.sh somewhat and makes what(1) work with
kernels again, now that we're using EGCS/GCC 2.9+. This "here"
file is compatible with the Bourne shell and the Korn shell (incl. pdksh
and KSH93 from AT&T, which I do have), so it doesn't make newvers.sh
unportable, but makes it easier to modify in the future/read now.

Submitted by:		green
1999-08-08 07:51:16 +00:00
Greg Lehey
32c0c324d5 cdevsw_remove: place correct value in bmaj2cmaj. This had caused
warnings of the following nature on reloading a kld:

  WARNING: "vinum" is usurping "console"'s bmaj

This only applies to cases where "console" is mentioned.

Broken-by:	  grog
1999-08-08 00:34:00 +00:00
Brian Feldman
301ca4ffe6 Make long longs ("%ll" format) work.
Reviewed by:	msmith
1999-08-07 20:13:32 +00:00
Bruce Evans
e15fab6177 Fixed a bogus include pathname which broke compiling in an obj directory. 1999-08-07 13:11:12 +00:00
Bruce Evans
a837386e81 Fixed syntax errors. Code should be tested before committing it, or at
least before enabling it in LINT and merging it into RELENG_3.
1999-08-07 13:09:30 +00:00
Peter Wemm
307fae6b6c Re-delete the (meaningless) device-driver tokens that came back in 1.256
after having been removed in 1.253 and turned into a warning.

Noticed by: bde
1999-08-07 12:19:41 +00:00
Greg Lehey
d50c8ea07f Add vinumraid5.c to list of sources. 1999-08-07 08:35:54 +00:00
Greg Lehey
1943d3438c Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>
1999-08-07 08:22:49 +00:00
Greg Lehey
5b19bbcb6f Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>

Define VINUM_BLOCK_SD and VINUM_CHAR_SD macros to create raw subdisk
device numbers.

Add VF_HOTSPARE flag.
1999-08-07 08:15:25 +00:00
Greg Lehey
bbc227eaa9 Update a comment. 1999-08-07 08:14:44 +00:00
Greg Lehey
1c49cd396f Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>

update_plex_state:
  If any subdisk in the plex is initializing, set the plex to
  initializing state.  This gets rid of the ugly corrupt/degraded/up
  transitions which previously occurred.

  Desired-by: Steve Taylor <staylor@cybernet.com>

sddownstate:
  Add new function, used by checksdstate.

checksdstate:
  Let sddownstate decide what status to return.
1999-08-07 08:14:01 +00:00
Greg Lehey
780f9fa3e3 Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>

logrq: save device major and minor numbers to compensate for lost
  dev_t.

launch_requests: Don't issue requests which are marked
  XFR_BAD_SUBDISK.  This may make things easier in bre().

bre:
  Rearrange.
  - Change some comments
  - Recognize holes in plex structure.  Formerly this could lead to
    incorrect write to the plex.  Return REQUEST_DEGRADED on a read
    request, but carry on to the bitter end on a write request, and
    mark the requests for the inaccessible subdisks with
    XFR_BAD_SUBDISK.
  - return REQUEST_EOF if the requested transfer goes beyond the end
    of the plex.  This is not an error, since other plexes may go
    further into the volume address space.

build_read_request:
  Handle REQUEST_DEGRADED returned from bre().

sdio:
  Lock buffer before issuing the requests.
1999-08-07 08:13:23 +00:00
Greg Lehey
b853969e09 Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>
1999-08-07 08:11:22 +00:00
Greg Lehey
f9c8e4cda3 Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>

detchobject:  Don't update the object configuration.

replaceobject: Add preliminary code.  This is not yet complete.

vinumw.h vinumparser.c:

Add keyword 'hotspare'.
1999-08-07 08:09:36 +00:00
Greg Lehey
dbac8959f7 Add definition of new ioctl (READPOL) for setting the read policy of a
plex.  The code is not yet complete.
1999-08-07 08:08:18 +00:00
Greg Lehey
78436bf362 Remove code to accept partitions of type 'unused'. From now on, Vinum
will only accept partitions of type 'vinum'.

format_config: Use the new %q format option in kvprintf, thus getting
  rid of some of the filthiest code I've written in a long time.  Also
  remove the lltoa() function.

With-great-thanks-to:	peter

format_config: Accept the fact that a subdisk might not be attached to
  a plex, and save the config correctly.

vinum_scandisk: Scan all slices on a drive with a Microsoft partition
  table.  Only look at the compatibility slice if nothing was found in
  the Microsoft slices.

  This change removes a frequently employed method of shooting
  yourself in the foot: people would decide that the Vinum drives
  belonged on their own slice, and they wouldn't be able to start the
  subsystem after a reboot.  Documentation updates to follow.
1999-08-07 08:07:05 +00:00
Greg Lehey
ffb0a6283d Close a memory leak. 1999-08-07 08:06:05 +00:00
Greg Lehey
b583bb9698 vinumopen: add code to open raw subdisks. This is now used to
initialize subdisks.  Probably the plex-related subdisk type will die
a death.

vinumconfig.c:

Accept (and ignore) kernel state information in userland config
files.  This saves a lot of error recovery and also makes it possible
to use the output of printconfig to create new configuration.

Remove checkdiskconfig().  It wasn't needed any more.

Start adding support for hot spare drives.  You can't put anything on
them (yet).

Change message formats from %lld to %qd.

get_empty_sd: Initialize size to -1.  Previously this was done in
config_subdisk, which is the wrong place.

start_config: set current drive, plex and volume to -1, thus stopping
  update configurations from taking their defaults from old configs.
1999-08-07 08:05:46 +00:00
Greg Lehey
9640a3a8f8 Rework many comments.
requeststatus:
  add REQUEST_DEGRADED status

struct rqinfo:
  add members devmajor and devminor to compensate for lost dev_t.
1999-08-07 08:05:19 +00:00
Brian Feldman
942fd180df We don't end up checking for a return value of EFAULT from the copyinstr()
in the pathname translation procedure. This proves fatal, and can be
easily fixed. This or a similar change needs to be committed to svr4_util.h
and ibcs2_util.h. I will update ibcs2_util.h, if noone else thinks of a
better way to do this, in the same manner. I will leave svr4 to the
respective maintainer.

This closes the problem of the only crash I've been able to produce as
a user recently, except for (currently not-in-the-source tree) fd
table sharing fixes. Thanks goes to pho for his stress-testers.
1999-08-07 05:33:35 +00:00
Jordan K. Hubbard
0a729622af Enable bpf by default. There was no significant dissention to my proposal
of 2 weeks ago that this be done, and anyone who wishes to make bpf more
selective according to securelevel or compile-time options is more
than free to do so.
1999-08-07 01:42:08 +00:00
Poul-Henning Kamp
e26c9de235 Forgot the "bsd" slice, now setrootbyname() understands "wd0s1a". 1999-08-06 20:29:46 +00:00
Søren Schmidt
2203dc0030 Add limitted support for the Promise Ultra/66 controller. Its
only supported upto UDMA33 like the old Promise, but it works
now. More when I have specs ....
1999-08-06 17:39:38 +00:00
Poul-Henning Kamp
f767942c7c Better way to circumvent the boot problem on older versions.
Submitted by:	Larry Baird <lab@gta.com>
1999-08-06 17:06:49 +00:00
Brian Somers
a18e16060e Back out redundant check, and remove the MAXMTU comparison as it's
outside of the (bogus) tuninfo mtu range.
Pointed out by: bde
1999-08-06 16:52:04 +00:00
Brian Somers
5abb82ea11 Back out redundant checks
Pointed out by: bde
1999-08-06 16:46:29 +00:00
Poul-Henning Kamp
d4ebee28d2 Add driver support for M-systems DiskOnChip Products.
Sponsored by:	M-systems Inc.	http://www.m-sys.com
1999-08-06 15:59:07 +00:00
Hellmuth Michaelis
0df6adec74 updating isdn4bsd to beta version 0.83 1999-08-06 14:05:10 +00:00
Brian Somers
aab3beeede Define IF_MAXMTU and IF_MINMTU and don't allow MTUs with
out-of-range values.

``comparison is always 0'' warnings are silly !

Ok'd by:	wollman, dg
Advised by:	bde
1999-08-06 13:53:03 +00:00
John Polstra
0226f1b80d Sync with alc's revision 1.125 of i386/i386/vm_machdep.c. This
fixes the kernel build breakage.
1999-08-05 23:38:13 +00:00
Jordan K. Hubbard
7055d4f553 commit these files after updating syscalls.master. 1999-08-05 08:27:08 +00:00
Jordan K. Hubbard
909bbf3c49 Re-commit these files after updating syscalls.master (in the proper order
this time).

Pointed out by:		bde
1999-08-05 08:26:27 +00:00
Jordan K. Hubbard
45f26d4120 Move syscall 180 back to where it was before and fix the
incorrect comment which led me to move it in the first place.
1999-08-05 08:18:45 +00:00
KATO Takenori
538c6e3378 - Don't assume that SCSI ID numbers of HDD units are contiguous. That
is, don't assume that SCSI ID corresponds to a unit number of da
  device.  Unit number of da device is provided by 2nd stage loader
  and 3rd stage loader now use it.
- Fix drive letter to display.

Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-08-05 03:19:37 +00:00
KATO Takenori
13e87d2d60 Provides discontinuous unit number support to make external FDD
bootable on 1 FDD PC98 machines.  (When an external FDD unit is
installed, unit numbers become discontinuous.)

Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-08-05 03:12:20 +00:00
Jordan K. Hubbard
2e24bd94b1 More committage for the arla pioctl syscall.
Reminded by:	green
1999-08-05 00:44:11 +00:00
Mike Smith
6d5e741cb8 Fix typo which would have caused MTRR support on non-SMP systems to
behave in an utterly random fashion.

Submitted by:	gibbs
1999-08-04 20:24:49 +00:00
Jordan K. Hubbard
b24eb2795d Reserve a syscall for the arla folks. I'm assuming that since syscalls.c
and init_sysent.c are checked into CVS, I should also commit the regenerated
copies even though they're built by syscalls.master.  Correct?  Bruce? :)
1999-08-04 20:04:25 +00:00
Jordan K. Hubbard
a116586012 The ARLA folks don't need a bdev after all - remove it. 1999-08-04 19:55:37 +00:00
Nik Clayton
bf9c09f910 "Linux emulator" -> "Linux image activator"
PR:             docs/12882
Submitted by:   des
1999-08-04 18:58:37 +00:00
Brian Feldman
e32c66c539 Fix fd race conditions (during shared fd table usage.) Badfileops is
now used in f_ops in place of NULL, and modifications to the files
are more carefully ordered. f_ops should also be set to &badfileops
upon "close" of a file.

This does not fix other problems mentioned in this PR than the first
one.

PR:		11629
Reviewed by:	peter
1999-08-04 18:53:50 +00:00
Brian Feldman
42fd81e3c9 Add various network cards that have been new-busified and made into KLDs
(thanks Bill!)

Remove lkm.
1999-08-04 17:44:07 +00:00
Brian Feldman
e4484d02ad Correction: "ans" -> "and." 1999-08-04 17:29:33 +00:00
Peter Wemm
56ba093ddb Don't over-allocate and over-copy shorter NFSv2 filehandles and then
correct the pointers afterwards.

It's kinda bogus that we generate a 24 (?) byte filehandle (2 x int32
fsid and 16 byte VFS fhandle) and pad it out to 64 bytes for NFSv3 with
garbage.  The whole point of NFSv3's variable filehandle length was
to allow for shorter handles, both in memory and over the wire.  I plan
on taking a shot at fixing this shortly.
1999-08-04 14:41:39 +00:00
Peter Wemm
cac6a04400 Don't probe if pci_cfgopen() fails to find pci hardware, like we used to
to.  This might have caused interesting things on non-PCI hardware if
PCI was compiled in.
1999-08-04 13:38:24 +00:00
Warner Losh
711103c1cc o Typo in prior version kept it from compiling (blush).
Noticed by: Nobody!

o Add comment about why we restrict chflags to root for devices.
o nit noticed by bde wrt return values.
1999-08-04 04:52:18 +00:00
Warner Losh
e82ef978fe brucify:
o use suser_xxx rather than suser to support JAIL code.
	o KNF comment convention
	o use vp->type rather than vaddr.type and eliminate call to
	  VOP_GETATTR.  Bruce says that vp->type is valid at this
	  point.

Submitted by: bde.

Not fixed:
	o return (value)
	o Comment needs to be longer and more explicit.  It will be after
	  the advisory.
1999-08-03 17:07:04 +00:00
Bill Paul
5a58e7fbc6 Minor tweak for last commit: insert extra delay between issuing master
reset and RX/TX resets.
1999-08-02 21:57:57 +00:00
Warner Losh
f76f09c129 Only allow root to set file flags on devices. 1999-08-02 21:34:46 +00:00
Bill Paul
9a65a1c94d Perform an RX reset and TX reset in xl_reset() along with the master
reset command.

I observed some anomalous behavior while testing a 3c905C with a
Dell PowerEdge 4300/500 dual PIII 500Mhz system. The NIC would seem
to work correctly most of the time but would sometimes fail to receive
certain packets, in particular NFS create requests. I could mount
an NFS filesystem from the PowerEdge and do an ls on it, but trying
to do a "touch foo" would hang. Monitoring traffic from another host
revealed that the client was properly sending an NFS create request
but the server was not receiving it. It *did* receive it when I
ran the same test with an Intel fxp card.

I don't understand the exact mechanics of this strange behavior, but
resetting the receiver and transmitter seems to get rid of it. I used
to perform an RX and TX reset in xl_init(), but stopped doing it there
because on 3c905B and later cards this causes the autoneg session to
restart, which would lead to the NIC waiting a long time before exchanging
traffic after being brought up the first time. Apparently the receiver
and transmitter resets should be performed at least once when initializing
the card.

Hopefully this will cure problems that people have been having with the
3c905C -- this was the only strange behavior that I have observed with
the 3c905C so far which does not appear with the 3c905B or 3c905.
1999-08-02 21:06:16 +00:00
Robert V. Baron
962e236ec0 The dev returned here is what is found in the st_dev field.
This should not be further translated ... hence the 0.
1999-08-02 20:55:11 +00:00
Matthew N. Dodd
dfc196bf2a I'm not sure how this wasn't in the last commit but anyhow...
'int irq' -> 'struct irq_node *irq'
1999-08-02 20:01:40 +00:00
Doug Rabson
0c78641668 Make this build if there is an obj directory. 1999-08-02 19:16:42 +00:00
Mike Smith
091edd6845 Don't trust the segment limits that the BIOS reports; instead give it
as much space as possible to avoid lossage due to sloppy BIOS
programming.
1999-08-02 18:46:34 +00:00
Stefan Eßer
bd5844977d Add missing "path mnemonics" as given in Table 4-3 of rev. 1.2 of the
ARC Specification.
1999-08-02 18:26:28 +00:00
Matthew N. Dodd
0d6ab4a16a Move the specification of EDGE/LEVEL triggered interrupts to
eisa_add_intr() which now takes an additional arguement (one of
EISA_TRIGGER_LEVEL or EISA_TRIGGER_EDGE).

The flag RR_SHAREABLE has no effect when passed to
bus_alloc_resource(dev, SYS_RES_IRQ, ...) in an EISA device context as
the eisa_alloc_resource() call (bus_alloc_resource method) now deals
with this flag directly, depending on the device ivars.

This change does nothing more than move all the 'shared = inb(foo + iobsse)'
nonesense to the device probe methods rather than the device attach.

Also, print out 'edge' or 'level' in the IRQ announcement message.

Reviewed by: dfr
1999-08-01 22:57:09 +00:00
Warner Losh
0226bd1a3e o Add additional printfs for error cases when we can't attach the device.
o Add field to dev_desc for the size of the io port range.  This isn't
  used yet in the committed sources, but will make the transition easier
  in the future.

If you build this into your kernel, you will need to rebuild pccardd.
1999-08-01 18:12:51 +00:00
Brian Feldman
0b6c1a832d Make ipfw's logging more dynamic. Now, log will use the default limit
_or_ you may specify "log logamount number" to set logging specifically
the rule.
   In addition, "ipfw resetlog" has been added, which will reset the
logging counters on any/all rule(s). ipfw resetlog does not affect
the packet/byte counters (as ipfw reset does), and is the only "set"
command that can be run at securelevel >= 3.
   This should address complaints about not being able to set logging
amounts, not being able to restart logging at a high securelevel,
and not being able to just reset logging without resetting all of the
counters in a rule.
1999-08-01 16:57:24 +00:00
KATO Takenori
273aa34415 Sync with sys/i386/conf/majors.i386 revision 1.80. 1999-08-01 16:03:31 +00:00
Mark Newton
8e70e7d663 Cleanup - diked out a heap of old KLM stuff that isn't needed anymore. 1999-08-01 12:51:06 +00:00
Alan Cox
7f866e4b29 Move the memory access behavior information provided by madvise
from the vm_object to the vm_map.

Submitted by:	dillon
1999-08-01 06:05:09 +00:00
Alan Cox
eaf183a844 pmap_object_init_pt:
Verify that object != NULL.
1999-07-31 23:02:57 +00:00
Tim Vanderhoek
e902c1bb07 Add variable INSTALLFLAGS_EDIT used to remove arbitrary INSTALLFLAGS.
Specifically intended for removing -fschg ("INSTALLFLAGS_EDIT=:S/schg/uchg/")
this makes the NOFSCHG flag redundant.  NOFSCHG will still be honoured by
bsd.lib.mk but is valid for buildworld only.  NOFSCHG is still implemented in
the old way (ie. _not_ ".if NOFSCHG then { INSTALLFLAGS_EDIT+=:S/schg/,/ }"
to emphasize the fact that NOFSCHG is only supported in a limited
fashion and for buildworld.

The interface and implementation are such that future use of flags such
as sappnd can also be easily removed or altered (perhaps to uappnd).

This commit brought to you by the letters B, D, and E, and the numbers six,
one, thirteen, and three.
1999-07-31 20:27:33 +00:00
Alan Cox
5d2aec8927 Change the type of vpgqueues::lcnt from "int *" to "int". The indirection
served no purpose.
1999-07-31 18:31:00 +00:00
Jordan K. Hubbard
c2da60f083 Reserve majors for arla. 1999-07-31 09:32:28 +00:00
Alan Cox
755292ace1 vm_page_queue_init:
Remove the initialization of PQ_NONE's cnt and lcnt.  They aren't
	used.

vm_page_insert:
	Remove an unnecessary dereference.

vm_page_wire:
	Remove the one and only (and thus pointless) reference
	to PQ_NONE's lcnt.
1999-07-31 04:19:49 +00:00
Alan Cox
086d0ae1dc Add parentheses for clarity.
Submitted by:	dillon
1999-07-31 04:10:31 +00:00
Mike Smith
98f8aa275b As described by the submitter:
I did some tcpdumping the other day and noticed that GETATTR calls
  were frequently followed by an ACCESS call to the same file. The
  attached patch changes nfs_getattr to fill the access cache as a side
  effect. This is accomplished by calling ACCESS rather than
  GETATTR. This implies a modest overhead of 4 bytes in the request and
  8 bytes in the response compared to doing a vanilla GETATTR.
...
  [The patch comprises two parts] The first
  is the "real" patch, the second counts misses and hits rather than
  fills and hits. The difference is subtle but important because both
  nfs_getattr and nfs_access now fill the cache. It also changes the
  default value of nfsaccess_cache_timeout to better match the attribute
  cache. IMHO, file timestamps change much more frequently than
  protection bits.

Submitted by:	Bjoern Groenvall <bg@sics.se>
Reviewed by:	dillon (partially)
1999-07-31 01:51:58 +00:00
Matthew N. Dodd
96a0f2956f Don't use at_shutdown() now that we have new_bus which lets us
specify a DEVICE_SHUTDOWN method instead.

Reviewed by: me, since nobody else seems to run this hardware in -CURRENT
1999-07-31 00:43:48 +00:00
Mike Smith
600d8382d9 Reenable the APMIO_BIOS ioctl and translate arguments into the new format
(which is more like the old than I thought).

Requested-by:	imp
1999-07-30 19:35:03 +00:00
Matthew N. Dodd
24116fdd0a Restore the pre-new_bus behavior of printing out the reserved resources
during device announcement. (irq, ioport, maddr)

Reviewed by: dfr, peter
1999-07-30 13:54:00 +00:00
Mark Newton
275d27d822 Previous commit also removed some 'const' qualifiers on args for
svr4_sys_sendto() which probably shouldn't have been 'const'.
1999-07-30 13:44:43 +00:00
Mark Newton
c8f2ce34ac Previous commit also finished cleaning up some dev_t -> udev_t transformations
related to the commit for rev 1.3 of svr4_stat.c.
svr4_sysvec.c also received a copyright message (which is why it grew by
28 lines).
1999-07-30 13:42:56 +00:00
Mark Newton
f46f4cccb8 Fix svr4_sys_poll(); SysV STREAMS produce return values from poll() which
BSD sockets don't.  Guess at a correct emulation for those values (it seems
to work for telnet, ftp and friends)
1999-07-30 13:12:26 +00:00
Mark Newton
1cd528f787 Initial checkin 1999-07-30 12:50:48 +00:00
Mark Newton
8f228dcab0 Add $Id$ tags.
Clean-up some unused (or to-be-used) variables in svr4_getcontext()
1999-07-30 12:47:17 +00:00
Mark Newton
60037843ce Clarify use of the 'streams' pseudo-device (i.e.: static or kld).
Trust me, this stuff will be in a real manpage before 4.0 ships :-)
1999-07-30 12:46:16 +00:00
Mark Newton
587297dc40 Add $Id$ tags 1999-07-30 12:45:21 +00:00
Mark Newton
4c6689598b Hmm - How did *that* get in there? 1999-07-30 12:44:49 +00:00
Mark Newton
6ef6864f94 Fix panic caused when *stat64() family of syscalls try to fill-in
their svr4_stat64 structures with old dev_t values instead of udev_t's.
Panic was caused when major() and minor() were called with args which
weren't pointers.  The panic was probably introduced in rev 1.51 of
kern_conf.c
1999-07-30 12:43:30 +00:00
Mark Newton
04f84b3402 Eliminate 'WARNING: "streams" is usurping "streams"'s cdevsw[]' messages
at boot
1999-07-30 12:39:49 +00:00