Commit Graph

2883 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +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
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
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
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
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
2f0f7ef0a6 Handle buses with multiple PHYs correctly. 1999-08-26 05:30:33 +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
Kazutaka YOKOTA
2832e35612 Correct the mode information for the VGA mode X.
- This mode uses four planes rather than one.
- "# of bytes in a scan line" = "# of pixels in the line"/2
1999-08-24 04:26:54 +00:00
Greg Lehey
4819484d0f set_sd_state: Correct the conditions for bringing up empty or
initialized subdisks.

Tidy up some comments.

Eliminate sddownstate(); it wasn't being used any more.  Return
REQUEST_DOWN instead.

Add setstate_by_force() to implement the VINUM_SETSTATE_FORCE ioctl
for diddling individual object states.  This is a repair tool which
can also be used for panicing the system.  Use with utmost care if at
all.
1999-08-24 02:29:41 +00:00
Greg Lehey
0911b330a0 Lock stripes of striped and RAID-5 plexes before writing them. This
avoids a race condition where multiple RAID-5 subdisks are being
revived at the same time.  The locks should also prevent conflicts
with user requests on concatenated and striped plexes, but this needs
more work.

Tidy up some comments.
1999-08-24 02:28:37 +00:00
Greg Lehey
7b0c9dde22 Add keywords setstate, checkparity, rebuildparity. 1999-08-24 02:27:45 +00:00
Greg Lehey
4fe498363c Add VINUM_SETSTATE_FORCE ioctl for diddling individual object states.
This is a repair tool which can also be used for panicing the system.
Use with utmost care if at all.
1999-08-24 02:26:15 +00:00
Greg Lehey
21c3b10bbc format_config: print preferred plex correctly. 1999-08-24 02:24:47 +00:00
Greg Lehey
c4bbdf0e5a Change parameters of unlockrange to allow calling from revive_block,
which doesn't use request groups.
1999-08-24 02:23:21 +00:00
Greg Lehey
2a11f45e35 Add declaration for vinum_setstate_by_force. 1999-08-24 02:21:46 +00:00
Greg Lehey
0c5c538d29 give_sd_to_drive: If we don't have space, deallocate the subdisk.
Previously we could end up with a valid subdisk
                  entry pointing to offset -1 on the drive.
1999-08-24 02:20:30 +00:00
Greg Lehey
8d9ef32fdd vinumclose: close raw plexes and subdisks. 1999-08-24 02:18:55 +00:00
Greg Lehey
fe89164039 Add support for logging subdisk I/O.
Change parameters of unlockrange to allow calling from revive_block,
which doesn't use request groups.
1999-08-24 02:17:42 +00:00
Bruce Evans
d009ccfaf5 Cast pointers to uintptr_t instead of casting them to u_long, and/or vice
versa.  Cosmetic.
1999-08-24 00:56:50 +00:00
Nick Hibma
0b77022752 Reset the UHCI controller when the device comes back from suspend.
This should be replaced by proper support for suspend one day (global
suspend).

Submitted-by:   Christopher Masto <chris@netmonger.net>
1999-08-23 21:00:08 +00:00
Poul-Henning Kamp
9dcbe2404a Convert DEVFS hooks in (most) drivers to make_dev().
Diskslice/label code not yet handled.

Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers)

Add the correct hook for devfs to kern_conf.c

The net result of this excercise is that a lot less files depends on DEVFS,
and devtoname() gets more sensible output in many cases.

A few drivers had minor additional cleanups performed relating to cdevsw
registration.

A few drivers don't register a cdevsw{} anymore, but only use make_dev().
1999-08-23 20:59:21 +00:00
Bruce Evans
d918320517 Use devtoname() to print dev_t's instead of casting them to long or u_long
for misprinting in %lx format.
1999-08-23 20:35:21 +00:00
KATO Takenori
614926e47a - Make binary size smaller.
- Fix typo in TDK/LANX stuff.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
1999-08-23 13:54:35 +00:00
Peter Wemm
0c3c5956d1 Disable some apparently stray debug printfs:
ahc0: <Adaptec 274X SCSI host adapter> at 0x1c00-0x1cff, irq 11 (edge)
ahc0: on eisa0 slot 1
ahc0: aic7770 >= Rev E, SBLKCTL = 0x8
SSTAT0 = 0x0
SFUNCT = 0x0
Twin Channel, A SCSI Id=7, B SCSI Id=7, primary A, 4/255 SCBs

Not objected to by:	gibbs
1999-08-23 12:08:45 +00:00