Commit Graph

83 Commits

Author SHA1 Message Date
Yoshihiro Takahashi
5f82b5ac07 Merge from sys/isa/fd.c revision from 1.171 to 1.176 and sys/isa/fdreg.h
revision 1.13.

Forgotten by:	kato
2000-01-09 10:01:21 +00:00
KATO Takenori
4332f82d59 Merge from sys/isa/fd.c rev 1.170. 1999-12-07 09:32:59 +00:00
Matthew N. Dodd
fe0d408987 Remove the 'ivars' arguement to device_add_child() and
device_add_child_ordered().  'ivars' may now be set using the
device_set_ivars() function.

This makes it easier for us to change how arbitrary data structures are
associated with a device_t.  Eventually we won't be modifying device_t
to add additional pointers for ivars, softc data etc.

Despite my best efforts I've probably forgotten something so let me know
if this breaks anything.  I've been running with this change for months
and its been quite involved actually isolating all the changes from
the rest of the local changes in my tree.

Reviewed by:	peter, dfr
1999-12-03 08:41:24 +00:00
Yoshihiro Takahashi
e5f8b3d483 Sync with sys/isa/fd.c revision 1.168. 1999-11-18 11:34:26 +00:00
Yoshihiro Takahashi
16fb95e5e4 Sync with sys/isa/fd.c revision 1.167. 1999-11-11 12:15:15 +00:00
Peter Wemm
58c284aca4 Use cdevsw_add() until the rest of the devices are created with make_dev()
and change from DEV_DRIVER_MODULE() to DRIVER_MODULE().
1999-11-08 07:46:28 +00:00
Yoshihiro Takahashi
1a847d4dac Merge from sys/isa/fd.c revision 1.146, 1.153, 1.154 and 1.159. 1999-09-27 03:32:31 +00:00
Poul-Henning Kamp
d6a0e38a1b Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
Yoshihiro Takahashi
a1e145f227 - Supported 1.23MB FD again.
- Supported all formats that IBM-PC's driver (isa/fd.c) supports.
- Changed the device minor numbers. They sync in IBM-PC's driver.
1999-09-23 14:21:14 +00:00
Poul-Henning Kamp
11a0be87e3 Two more devstat_end_transaction() -> devstat_end_transaction_buf(). 1999-09-19 12:43:34 +00:00
Poul-Henning Kamp
2186cd9e8d Use devstat_end_transaction_buf() rather than Use devstat_end_transaction() 1999-09-18 21:30:27 +00:00
Bruce Evans
887ba12fc5 Removed diskerr()'s unused d_name arg and updated callers. This fixes
warnings caused by the arg having the wrong type (not const enough).
The arg was also wrong (a full name instead of a short one) for calls
from from subr_diskmbr.c and pc98/diskslice_machdep.c.
1999-09-13 12:59:41 +00:00
KATO Takenori
62fdcb4fc6 Change isa_get/set_flags() to device_get/set_flags().
Submitted by:	dfr
1999-09-07 11:17:09 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +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
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
Matthew N. Dodd
15317dd875 Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD
	  method produce the entire device announcement message or
	  it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

	- Devices are 'on' a bus, not 'at' it.
	- If a custom BUS_PRINT_CHILD method does the same thing
	  as bus_generic_print_child(), use bus_generic_print_child()
	- Use device_get_nameunit() instead of both
	  device_get_name() and device_get_unit()
	- All BUS_PRINT_CHILD methods return the number of
	  characters output.

Reviewed by: dfr, peter
1999-07-29 01:03:04 +00:00
Poul-Henning Kamp
03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
KATO Takenori
3dcce5117d Typo: BUF_INITLOCK -> BUF_LOCKINIT and BUF_FREELOCK -> BUF_LOCKFREE. 1999-06-28 14:01:03 +00:00
Kirk McKusick
67812eacd7 Convert buffer locking from using the B_BUSY and B_WANTED flags to using
lockmgr locks. This commit should be functionally equivalent to the old
semantics. That is, all buffer locking is done with LK_EXCLUSIVE
requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will
be done in future commits.
1999-06-26 02:47:16 +00:00
KATO Takenori
a3bcef65cd Fixed locations of include files. 1999-06-01 13:14:35 +00:00
Poul-Henning Kamp
4e2f199e0c This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".

        Initialize the d_maj and d_bmaj fields.

        The d_reset field was not removed, although it is never used.

I used a program to do most of this, so all the files now use the
same consistent format.  Please keep it that way.

Vinum and i4b not modified, patches emailed to respective authors.
1999-05-30 16:53:49 +00:00
KATO Takenori
6048ba838c Sync with sys/i386/isa/fd.c revision 1.143. 1999-05-11 08:37:16 +00:00
KATO Takenori
75442335ac Sync with sys/i386/isa/fd.c revision 1.142. 1999-05-09 04:34:28 +00:00
Poul-Henning Kamp
46eede0058 Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw.  bdevsw() is now an (inline)
        function.

        Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention
        to the order of the cmaj/bmaj arguments!)

        Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE
        (ditto!)

(Next step will be to convert all bdev dev_t's to cdev dev_t's
before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
1999-05-07 10:11:40 +00:00
Poul-Henning Kamp
c48d17750f Introduce two functions: physread() and physwrite() and use these directly
in *devsw[] rather than the 46 local copies of the same functions.

(grog will do the same for vinum when he has time)
1999-05-07 07:03:47 +00:00
Poul-Henning Kamp
b0eeea2042 remove b_proc from struct buf, it's (now) unused.
Reviewed by:	dillon, bde
1999-05-06 20:00:34 +00:00
KATO Takenori
ef560ddafd Sync with sys/i386/isa/fd.c revision 1.137. 1999-05-05 03:43:00 +00:00
Poul-Henning Kamp
f711d546d2 Suser() simplification:
1:
  s/suser/suser_xxx/

2:
  Add new function: suser(struct proc *), prototyped in <sys/proc.h>.

3:
  s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/

The remaining suser_xxx() calls will be scrutinized and dealt with
later.

There may be some unneeded #include <sys/cred.h>, but they are left
as an exercise for Bruce.

More changes to the suser() API will come along with the "jail" code.
1999-04-27 11:18:52 +00:00
KATO Takenori
c55a92c639 Sync with follwing files:
Path				Revision
i386/conf/GENERIC		1.162
i386/conf/Makefile.i386		1.146
i386/conf/files.i386		1.236
i386/conf/options.i386		1.111
i386/i386/machdep.c		1.329
i386/i386/userconfig.c		1.134
i386/isa/fd.c			1.135
i386/isa/if_ed.c		1.151
i386/isa/isa_dam.c		1.1
i386/isa/npx.c			1.67
isa/sio.c			1.224
dev/syscons/syscons.c		1.300
i386/isa/wd.c			1.194
isa/vga_isa.c           1.5
isa/atkbd_isa.c         1.3
isa/syscons_isa.c       1.2

Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1999-04-18 14:42:20 +00:00
Peter Wemm
6ac1f14d0b Use PHOLD/PRELE() instead of P_PHSYIO. 1999-04-06 03:12:22 +00:00
Kenneth D. Merry
2a888f938e Add a prioritization field to the devstat_add_entry() call so that
peripheral drivers can determine where in the devstat(9) list they are
inserted.

This requires recompilation of libdevstat, systat, vmstat, rpc.rstatd, and
any ports that depend on the devstat code, since the size of the devstat
structure has changed.  The devstat version number has been incremented as
well to reflect the change.

This sorts devices in the devstat list in "more interesting" to "less
interesting" order.  So, for instance, da devices are now more important
than floppy drives, and so will appear before floppy drives in the default
output from systat, iostat, vmstat, etc.

The order of devices is, for now, kept in a central table in devicestat.h.
If individual drivers were able to make a meaningful decision on what
priority they should be at attach time, we could consider splitting the
priority information out into the various drivers.  For now, though, they
have no way of knowing that, so it's easier to put them in an easy to find
table.

Also, move the checkversion() call in vmstat(8) to a more logical place.

Thanks to Bruce and David O'Brien for suggestions, for reviewing this, and
for putting up with the long time it has taken me to commit it.  Bruce did
object somewhat to the central priority table (he would rather the
priorities be distributed in each driver), so his objection is duly noted
here.

Reviewed by:	bde, obrien
1999-02-10 00:04:13 +00:00
KATO Takenori
4d8efbff69 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1999-01-28 11:24:36 +00:00
Peter Wemm
d17e4ee67d Update the pccard hooks to use a module style declaration instead. 1999-01-19 00:21:53 +00:00
KATO Takenori
21da8ffad1 Sync with sys/i386/isa/fd.c revision 1.131. 1999-01-16 11:40:02 +00:00
KATO Takenori
a498ae6954 Sync with sys/i386/isa/fd.c revision 1.130. 1998-12-30 08:06:41 +00:00
KATO Takenori
012291989b Sync with sys/i386/isa/fd.c revision 1.129. 1998-12-17 08:40:36 +00:00
KATO Takenori
c2a3601760 Sync with sys/i386/isa/fd.c revision 1.128. 1998-12-14 09:06:23 +00:00
Eivind Eklund
2ae353f9a7 Rename one of the two devfs_link's to devfs_makelink. 1998-12-10 19:57:01 +00:00
KATO Takenori
e4561e2ae0 Sync with sys/i386/isa/fd.c, if_fe.c, npx.c and sio.c revisions 1.126,
1.44, 1.63 and 1.219, respectively.
1998-12-08 08:18:59 +00:00
KATO Takenori
6684a4f19d Sync with sys/i386/isa/fd.c revision 1.125. 1998-12-05 09:24:20 +00:00
Bruce Evans
fe310de802 Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c.  Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato
1998-10-22 05:58:45 +00:00
KATO Takenori
c87ddee143 Sync with sys/i386/isa/fd.c revision 1.123. 1998-09-16 08:08:38 +00:00
KATO Takenori
a42481ee16 Sync with sys/i386/isa/fd.c and wd.c revisions 1.122 and 1.176,
respectively.
1998-09-15 14:07:08 +00:00
Søren Schmidt
d024c95599 Remove the SLICE code.
This clearly needs alot more thought, and we dont need this to hunt
us down in 3.0-RELEASE.
1998-09-14 19:56:42 +00:00
KATO Takenori
523bea959c Sync with sys/i386/isa/fd.c revision 1.120. 1998-07-30 09:01:12 +00:00
KATO Takenori
1e023fc3c6 Sync with sys/i386/isa/fd.c revision 1.119. 1998-07-19 15:03:49 +00:00
KATO Takenori
c76d1cd8e7 Sync with sys/i386/isa/fd.c revision 1.118. 1998-07-16 10:27:49 +00:00
KATO Takenori
6baa65474d Sync with sys/i386/isa/fd.c and wd.c revisions 1.117 and 1.172,
respectively.
1998-07-13 09:29:25 +00:00
KATO Takenori
13992e6dc1 Sync with sys/i386/isa/fd.c revision 1.116. 1998-07-11 17:02:07 +00:00