Commit graph

16555 commits

Author SHA1 Message Date
Roger Hardiman a8a77e3724 Add #include <sys/select.h> ready for select() support in bt848 driver 1999-08-30 09:28:47 +00:00
Poul-Henning Kamp 02e1576966 Make bdev userland access work like cdev userland access unless
the highly non-recommended option ALLOW_BDEV_ACCESS is used.

(bdev access is evil because you don't get write errors reported.)

Kill si_bsize_best before it kills Matt :-)

Use the specfs routines rather having cloned copies in devfs.
1999-08-30 07:56:23 +00:00
Poul-Henning Kamp 9cc99e3681 Make bdev userland access work like cdev userland access unless
the highly non-recommended option ALLOW_BDEV_ACCESS is used.

(bdev access is evil because you don't get write errors reported.)

Kill si_bsize_best.

Use the specfs routines rather having cloned copies in devfs.
1999-08-30 07:56:15 +00:00
Bruce Evans 4047cd0bb2 Converted the silly SAFTEY option into a new-style option by renaming it to
DIAGNOSTIC.

Fixed an English style bug in the panic messages controlled by SAFETY.
1999-08-30 07:08:04 +00:00
Peter Wemm 4e731e62c4 If using GNUC and ELF, make __IDSTRING() expand into an inline asm
statement to put the rcsid into the .comment section.  This allows
the comments (ie:version id's of compiler, headers, source, etc) to be
stripped out with the standard tools (strip/objcopy).  SVR4 has a
tool called 'mcs' (manipulate comment section) which allows you to
add/remove/compact strings.  Removing duplicate strings helps a lot
if the headers generate them.
Using __attribute__((section(".comment"))) would probably also work,
but that still leaves the RCSID occupying C name space somewhere.
1999-08-30 03:57:47 +00:00
Bruce Evans de5104ae7c "Fixed" my recent world breakage (umap_subr.c now includes opt_ddb.h).
Fixed some style bugs, especially the bogus definition of UMAPFS.
1999-08-30 03:26:45 +00:00
John Polstra a2c07ebf59 Add STAILQ_FOREACH. 1999-08-30 01:01:19 +00:00
Bill Fumerola a5a388c7ab Add $FreeBSD$ and spell Eklund properly.
Approved by:	brian (well, he approved adding $Id$)
1999-08-29 23:17:04 +00:00
David E. O'Brien 5a8c77a83c Remove extra indenting of `break' statements introducted in rev 1.89,
plus wrap some long lines from that revision.

While here, wrap some other long lines.
1999-08-29 21:59:03 +00:00
KATO Takenori 545a1c84b2 - Removed COMPAT_ATDISK from option because it is pseudo-device now.
- Fixed arguments of atcompat_dsinit() in diskslice_machdep.c.
1999-08-29 21:28:47 +00:00
Mitsuru IWASAKI c610e9fe39 ident GENERIC -> ident PCCARD
Okayed by:	hosokawa
1999-08-29 16:58:40 +00:00
Bill Paul 1ef8fbeabf Convert the 3Com XL driver to miibus. This one is a little tricky
due to the fact that there are non-MII cards supported by the same
driver and I don't have all of the cards available for testing. There's
also the 3c905B-COMBO which has MII, AUI and BNC media ports all in one
package. Supporting the COMBO is difficult because we have to add the
10base5 and 10base2 media types to the same ifmedia struct as the
MII-attached types, however there is no way to force the miibus and
child PHYs into existence before xl_attach() completes, so there is
no ifmedia struct available in xl_attach(). What we do inistead is
use the mediainit method as a callback: when a child PHY is attached,
it calls the miibus mediainit routine which selects a default media.
This routing also calls the NIC driver's mediainit method (if it
implements one) at which point we can safely add the other media
types.
1999-08-29 15:52:19 +00:00
Bill Paul 9052a8fa41 Regenerate miidevs.h. 1999-08-29 15:44:07 +00:00
Bill Paul 24a7e3d3de The ASIC on the 3c905C appears to be manufactured by Broadcom (previous
ones were made by Lucent). The Broadcom chip also appears to use an
internal PHY made by Broadcom which uses the Broadcom OUI. This is different
from previous ASICs which always returned 0 in the PHY ID registers.
To account for this, I added the necessary ID values for the Broadcom
PHY so that it can be detected and attached using the 3Com PHY driver
instead of defaulting to the generic one.
1999-08-29 15:42:04 +00:00
Roger Hardiman a165a91d78 Add Voodoo 3 identification.
pciconf on my Vodoo3 2000 also shows sub-system vendor id/model with
card=0x0030121a
1999-08-29 15:11:22 +00:00
Poul-Henning Kamp c5b072197a Remove unneeded "maj" variable.
Give up if we have already started dumping once before.

Print name of dumpdev.
1999-08-29 14:54:11 +00:00
Poul-Henning Kamp f5988870ce Remove unneeded slice element. 1999-08-29 14:52:02 +00:00
Poul-Henning Kamp 9a7f910b84 Convert to use the new "disk" layer.
A few cleanups while here.
1999-08-29 13:29:29 +00:00
Poul-Henning Kamp da9e4f5550 Add micro "disk" layer which should enable us to pull all the slice/label
stuff out of the device drivers.
1999-08-29 13:28:55 +00:00
Dag-Erling Smørgrav 27108a1511 Include the correct header for the IPSTEALTH option. 1999-08-29 12:18:39 +00:00
Nick Hibma 51b98897fa Only NetBSD needs sys/device.h. 1999-08-29 11:56:49 +00:00
Nick Hibma a7fa9611ed Only NetBSD uses sys/device.h
Error-reported-by:	phk
1999-08-29 11:49:22 +00:00
Marcel Moolenaar e459b442df Fix a braino: Linux minor device numbers are 8 bits wide and not 10. 1999-08-29 11:47:01 +00:00
Bruce Evans 1961e4302a Fixed printf format errors (don't assume that ntohl() returns u_long;
it returns u_int on i386's and in_addr_t (u_int32_t) on alphas).
1999-08-29 10:28:10 +00:00
Bruce Evans 684f9417a2 Oops, I missed a cast in rev.1.119. 1999-08-29 10:23:13 +00:00
Bruce Evans 09c1244640 Removed dysfunctional/defunct options KERNFS_DIAGNOSTIC,
UMAPFS_DIAGNOSTIC and UNION_DIAGNOSTIC.  Uncommented NULLFS_DIAGNOSTIC.
It is as bogus as the above three but since it is already a new-style
option it is easier to use it than to fix it.
1999-08-29 10:14:59 +00:00
Bruce Evans 8021ba879a Changed old-style option UNION_DIAGNOSTIC to DEBUG and fixed printf
format errors exposed by this.  It has nothing to do with diagnostics
since it does little more than control tracing of normal operation.
Actual diagnostics for the union file system are still controlled by
the DIAGNOSTIC option.
1999-08-29 10:03:35 +00:00
Bruce Evans b00b6d73dd Changed old-style options UMAPFS_DIAGNOSTIC and UMAP_DIAGNOSTIC to DEBUG
or DDB and fixed printf format errors exposed by this.  The options had
little to do with diagnostics; they mostly controlled tracing of normal
operation.
1999-08-29 09:54:17 +00:00
Bruce Evans 47966f4c8a Changed old-style option KERNFS_DIAGNOSTIC to DEBUG and fixed printf
format errors exposed by this.  It has nothing to do with diagnostics
since it does little more than control tracing of normal operation.
1999-08-29 09:38:25 +00:00
Poul-Henning Kamp f054c29093 Merge alpha and pc98 changes into i386 MBR handling code and replace all
three copies with one copy in MI land.
1999-08-29 09:12:54 +00:00
Poul-Henning Kamp 83d34e0b60 initialize si_bsize_phys from what the drive told us. 1999-08-29 09:10:05 +00:00
Poul-Henning Kamp d137accc89 Add dev_t freeing code. Controlled by sysctl debug.free_devt, default
is off.
1999-08-29 09:09:12 +00:00
Bruce Evans 3de9d6fbe4 Don't restrict our requests for contiguous memory to addresses >= 1MB.
This fixes, at least, panics in ncr_attach() on i386's with about 5MB
of memory.  The restriction was a hack to leave some low memory for ISA
DMA, but on i386's we now allocate pages from the top down, so all the
restriction did was cause our allocations to fail when there is no free
memory above 1MB.
1999-08-29 09:03:58 +00:00
Marcel Moolenaar d4c45842d7 Fix a missing '-1' in the size argument of copyout in getgroups. Spotted while
reviewing the MFC in -stable.
1999-08-29 08:52:38 +00:00
Poul-Henning Kamp 0bd2b984ce Sort the easy part of this file. It should be all sorted. 1999-08-29 08:44:18 +00:00
KATO Takenori a8c345fb03 Changed from dname into devtoname(bp->b_dev) in the function dsinit(). 1999-08-29 05:05:27 +00:00
Masahide MAEKAWA 52b18414f4 o fix typo 1999-08-29 02:05:12 +00:00
Greg Lehey 03705cdeb7 Initialize the si_bsize fields of the new dev structure. This fixes
some swapper problems analogous to those experienced with ccd.

This fix is a kludge: since we currently don't track the "sector size"
in a volume label, we guess a worst case (4 kB, as used by vnode
devices).  If the concept of sector size is here to stay, I'll make
some changes to track the "sector size" of a volume.  This will
probably be the maximum of the sector sizes of all component drives,
but things could get ugly if we start allowing non-standard sector
sizes such as 524 bytes.

Unkludged-version-submitted-by:	phk
1999-08-29 01:41:53 +00:00
Masahide MAEKAWA a0f9149b19 o synchronisation with NetBSD
Reviewed by:	Hick Hibma
Obtained from:	NetBSD
1999-08-29 01:18:32 +00:00
Nick Hibma ca66889cf7 Correct URL's and change ifdef to if defined (following rest of style in
file)
1999-08-28 20:10:46 +00:00
Nick Hibma 805bb37eb5 Remove NetBSD specific code. USB part is trivial, and the rest is not
shared anyway.
1999-08-28 20:09:34 +00:00
Poul-Henning Kamp 94db13fe98 Fix various trivial warnings from LINT 1999-08-28 19:44:07 +00:00
Poul-Henning Kamp a87b535090 Put a brief comment on a couple of #defines. 1999-08-28 19:21:36 +00:00
Poul-Henning Kamp 9626728875 remove unused variables. 1999-08-28 19:21:03 +00:00
Poul-Henning Kamp a978dc23b7 #include <sys/queue.h> 1999-08-28 19:20:07 +00:00
John Hay 01d3efc077 Get rid of the old XNS checksum code and implement it the IPX way.
PR:		13374
Submitted by:	Boris Popov <bp@butya.kz>
1999-08-28 18:21:55 +00:00
Yoshihiro Takahashi 3dec6735e5 Merge missing changes from sys/i386/conf/GENERIC. 1999-08-28 16:49:58 +00:00
Yoshihiro Takahashi cbf0618984 Fix ordering. 1999-08-28 16:20:53 +00:00
Yoshihiro Takahashi c8662eda6f - The old printer driver is renamed 'olpt'.
- Added the gdc driver.
1999-08-28 15:17:25 +00:00
KATO Takenori c41e88e949 Added MII bus support.
Reminded by:	phk
1999-08-28 15:04:27 +00:00
Larry Lile fcf11853dc It is much easier to arp if you don't truncate your arp-reply's.
[affects token-ring only]
1999-08-28 14:57:12 +00:00
Poul-Henning Kamp 10af1a2b5f We don't need to pass the diskname argument all over the diskslice/label
code, we can find the name from any convenient dev_t
1999-08-28 14:33:44 +00:00
Hellmuth Michaelis f5fe620a92 add MAINTAINER for the kernel part of i4b 1999-08-28 13:35:00 +00:00
Nick Hibma d447ab3427 Thou shall do a make before commit.
[grmbl]
Fix duplicate elements in struct in previous commit.
1999-08-28 11:52:12 +00:00
Nick Hibma d88879933b We use device_set_desc_copy, so we do not need to free the copied text
manually.
1999-08-28 11:35:36 +00:00
Nick Hibma f748f71688 Share more between FreeBSD and NetBSD 1999-08-28 11:31:21 +00:00
Nick Hibma 7e8893c9b4 Update the list of devices from NetBSD 1999-08-28 09:39:54 +00:00
Marcel Moolenaar 9e8b10d186 Add MAINTAINER and remove the unused COMPAT_LINUX and VM_STACK defines. 1999-08-28 09:04:21 +00:00
Marcel Moolenaar 86f95e6b6d Implement the OSS_GETVERSION ioctl. The version returned can be changed through
the sysctl variable `compat.linux.oss_version'.

PR: 12917
Originator: Dean Lombardo <dlombardo@excite.com>
1999-08-28 08:43:03 +00:00
Poul-Henning Kamp 9465bf4495 Initialize dev->si_bsize*, the floppy driver doesn't use dsopen(). 1999-08-28 08:10:13 +00:00
Brian Feldman 78f9020e95 Also make the "other" packets counter resettable. 1999-08-28 07:20:59 +00:00
Brian Feldman bbeaed0909 Back out the cdevsw_remove() from previous revision for further testing. 1999-08-28 07:06:11 +00:00
Brian Feldman b519d997a1 Unevilize vn(4) somewhat:
1. implement read-only ability
	2. make it play nice with cdevsw (use cdevsw_remove() uon kldunload)
1999-08-28 06:21:39 +00:00
Peter Wemm 2185977908 Regen after Id->FreeBSD 1999-08-28 02:35:56 +00:00
Peter Wemm ee15718941 $Id$ -> $FreeBSD$ (some mangled and/or hidden ones) 1999-08-28 02:21:15 +00:00
Peter Wemm 280652828b $Id$ -> $FreeBSD$ 1999-08-28 02:16:32 +00:00
Peter Wemm dacec3e8f2 Id -> FreeBSD 1999-08-28 01:15:37 +00:00
Peter Wemm c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Peter Wemm 7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Brian Feldman 4d1bb12d6c Correction: uid -> gid (comment) 1999-08-27 23:46:02 +00:00
Peter Wemm a4add9a9b1 $Id$ -> $FreeBSD$ 1999-08-27 23:45:13 +00:00
Bill Paul b3bc7a4bb0 Fix path for miibus_if.m (mii > dev/mii); 1999-08-27 21:21:53 +00:00
Bill Paul 05d6200e3f Make some cleanups related to miibus. 1999-08-27 21:18:02 +00:00
Marcel Moolenaar c6dfea0ebd Add sysctl variables for the Linuxulator. These reside under `compat.linux' as
discussed on current.

The following variables are defined (for now):

    osname (defaults to "Linux")
        Allow users to change the name of the OS as returned by uname(2),
        specially added for all those Linux Netscape users and statistics
        maniacs :-) We now have what we all wanted!

    osrelease (defaults to "2.2.5")
        Allow users to change the version of the OS as returned by uname(2).
        Since -current supports glibc2.1 now, change the default to 2.2.5
        (was 2.0.36).

    oss_version (defaults to 198144 [0x030600])
        This one will be used by the OSS_GETVERSION ioctl (PR 12917) which I
        can commit now that we have the MIB. The default version number is the
        lowest version possible with the current 'encoding'.

A note about imprisoned processes (see jail(2)):
  These variables are copy-on-write (as suggested by phk). This means that
  imprisoned processes will use the system wide value unless it is written/set
  by the process. From that moment on, a copy local to the prison will be
  used.

A note about the implementation:
  I choose to add a single pointer to struct prison, because I didn't like the
  idea of changing struct prison every time I come up with a new variable. As
  a side effect, the extra storage is only needed when a variable is set from
  within the prison. This also minimizes kernel bloat when the Linuxulator is
  not used; both compiled in or as a module.

Reviewed by: bde (first version only) and phk
1999-08-27 19:47:41 +00:00
Bill Paul d0dca9afa4 Update these Makefiles; add mlphy and tlphy to the mii module, add
miibus_if.h to tl module's dependencies.
1999-08-27 19:45:19 +00:00
Jonathan Lemon 7e42e2f811 Reference the correct gdt[] entry on SMP. Remove the `generation' flag,
and always reload the selectors for every bios call.
1999-08-27 19:39:20 +00:00
Bill Paul 46c8f7f1c2 Convert the ThunderLAN driver to miibus. This took me a while because I
had to get the ML 6692 PHY driver working correctly, which is harder than
it sounds. "Bitrate" ThunderLAN devices should still be supported (i.e
the older 10Mbps Netflex 3/P, which use the TNETE110 chip that has no
MII support). The ThunderLAN has an internal PHY which makes things a
little complicated, but these are the basic rules:

- For devices with just the ThunderLAN, the internal PHY is used to
  provide 10baseT, and 10base5/10baseT support. Autonegotiation will
  work, but only with 10baseT links. The only thing that really gets
  negotiated is whether the link is full or half duplex.

- For devices with the ThunderLAN and an external 10/100 PHY (like the
  Compaq Netelligent 100Mbps cards, or the internal Netflex 3/P with
  100Mbps upgrade daughter card), the external PHY is used for 10baseT
  and 100baseTX modes. The internal PHY is still used to support
  10base5/10base2, though you have to select them manual with ifconfig.

- For devices with the ThunderLAN and the ML6692 PHY, both the internal
  and external PHYs are used, though it will appear as though the 6692
  PHY will be used to support 10baseT and 100baseTX modes. In reality,
  the internal PHY will be used for 10baseT, but this fact will be hidden
  from the user. The 10base5/10base2 modes can also be selected manually
  as with above.
1999-08-27 18:58:27 +00:00
Bill Paul d341237291 Add miibus drivers for the ThunderLAN internal PHY and the Micro Linear
ML6692 PHY. The Micro Linear driver is my own; the ThunderLAN driver is
a port of the NetBSD driver with various hacks. The ML driver is necessary
to support the Olicom OC-2326 ThunderLAN-based NIC.

Also regenerated miidevs.h to pick up the proper 'obtained from'
revision string.
1999-08-27 18:33:36 +00:00
Brian Feldman b5fca1cb2a Add FIODTYPE ioctl for getting d_flags (type) info on a device.
Okayed by:	phk
1999-08-27 16:35:37 +00:00
Andrew Gallatin 34067f9475 Fix the child's return path from fork so that fork will return 0
in the child.  This corrects a problem where linux/alpha binaries see
the child's return value of fork as the parent's pid.  This happens because
linux/alpha binaries apparently check the return value directly, rather
than looking for a non-zero value in a4, as *BSD & OSF/1 do.

Reviewed by:dfr@nlsystems.com
1999-08-27 14:47:23 +00:00
Kazutaka YOKOTA 21f652c5b1 - Retain the previous vty and history buffers when setting up
the graphics mode.  This was the behavior prior to syscons.c
  rev 1.278, but broken in scvidctl.c rev 1.1.
1999-08-27 09:20:41 +00:00
Kazutaka YOKOTA 484fc65c06 - Set the correct value to va_line_width while in the ioctl
FBIO_SETLINEWIDTH.
1999-08-27 09:19:50 +00:00
Kazutaka YOKOTA 23ed6fc8bc - Ouch! Do not assume the VESA BIOS will preserve the upper 16 bits
of EAX and EBX.
1999-08-27 09:18:42 +00:00
Peter Wemm 08bf4f641e A few style changes (fixes hopefully) and some more tidying up. Fix (?)
the volatile cast warnings.
1999-08-27 08:32:54 +00:00
Julian Elischer 501f7f80bd Remove some vestiges of devfs direct calls. 1999-08-27 08:31:20 +00:00
Julian Elischer ada9bd8cb8 Add PHK's make_dev() into more places where DEVFS used to be
hooked in directly.

Alpha change checked by: Matthew Jacob <mjacob@feral.com>
i4b ISDN changes checked by: Udo Schweigert <ust@cert.siemens.de>
    and Hellmuth Michaelis <hm@hcs.de>
PC98 changes checked by: Takahashi Yoshihiro <nyan@FreeBSD.org>
1999-08-27 07:26:26 +00:00
Peter Wemm 4e895e3962 Don't return 0 for an unknown ioctl (!). This was breaking ppp(8).
Slight tidy up while here.
1999-08-27 06:53:34 +00:00
Jonathan Lemon 6da3d6578b Add readonly OID ``net.inet.tcp.tcbhashsize'' so it is possible to
discover the size of the TCB hashtable on a running system.
1999-08-26 19:52:17 +00:00
Dima Ruban d44e415624 Don't follow symlinks on coredumps.
Reviewed by:	dillon && security-officer
1999-08-26 17:32:48 +00:00
Poul-Henning Kamp dbafb3660f Simplify the handling of VCHR and VBLK vnodes using the new dev_t:
Make the alias list a SLIST.

        Drop the "fast recycling" optimization of vnodes (including
        the returning of a prexisting but stale vnode from checkalias).
        It doesn't buy us anything now that we don't hardlimit
        vnodes anymore.

        Rename checkalias2() and checkalias() to addalias() and
        addaliasu() - which takes dev_t and udev_t arg respectively.

        Make the revoke syscalls use vcount() instead of VALIASED.

        Remove VALIASED flag, we don't need it now and it is faster
        to traverse the much shorter lists than to maintain the
        flag.

        vfs_mountedon() can check the dev_t directly, all the vnodes
        point to the same one.

Print the devicename in specfs/vprint().

Remove a couple of stale LFS vnode flags.

Remove unimplemented/unused LK_DRAINED;
1999-08-26 14:53:31 +00:00
Poul-Henning Kamp 9c93810d2d Initialize the dev->si_bsize fields.
Submitted by:	tegge
Reviewed by:	phk
1999-08-26 14:46:10 +00:00
Doug Rabson 50de873b59 Fix DMA macros to work on alpha. 1999-08-26 08:41:41 +00:00
Doug Rabson 22147525d2 Don't schedule the next transaction if the pipe is being aborted. 1999-08-26 08:40:55 +00:00
Bill Paul cbc20d30a5 Properly re-enable the transmitter in the TX error handler. 1999-08-26 05:31:53 +00:00
Bill Paul 2f0f7ef0a6 Handle buses with multiple PHYs correctly. 1999-08-26 05:30:33 +00:00
Greg Lehey 2de219e97f Change asf function to use the new name of the list in kern_linker.c.
See revision 1.35 of sys/kern/kern_linker.c.
1999-08-26 04:01:37 +00:00
Greg Lehey 4e72079195 read_drive: Remove references to vp->v_lastr, which is going away.
Reviewed-by:	dillon
1999-08-26 03:27:21 +00:00
Greg Lehey 35b5051ab9 complete_rqe: explicitly reinitialize b.b_iodone. This shouldn't have
changed, but we've seen some weird cases of b_iodone
	      being NULL, and they don't make any sense.

Suffered-by:  Bernd Walter <ticso@cicely.de>
1999-08-26 03:26:39 +00:00
Greg Lehey ca55837990 config_plex: don't allocate a rangelock struct.
lockrange: correctly expand rangelock struct, including expanding a
	   null struct.  Previously lockrange would attempt to lock a
	   NULL pointer under these circumstances.

Reported-by:	Ian Freislich <iang@uunet.co.za>
1999-08-26 03:25:38 +00:00
Peter Wemm 399f34180a Use .p2align to ensure consistant a.out/elf alignment. I'd have used
SUPERALIGN_TEXT, but this is inline assembler and after cpp has run.
Inspired by bde's comments on linux_locore.s.
1999-08-25 23:50:03 +00:00