Commit Graph

24 Commits

Author SHA1 Message Date
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
Peter Wemm
0d50adcacf Don't clobber the smb cdevsw entry that was installed by the driver
framework.
1999-07-06 13:42:43 +00:00
Poul-Henning Kamp
03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
Poul-Henning Kamp
2447bec829 Simplify cdevsw registration.
The cdevsw_add() function now finds the major number(s) in the
struct cdevsw passed to it.  cdevsw_add_generic() is no longer
needed, cdevsw_add() does the same thing.

cdevsw_add() will print an message if the d_maj field looks bogus.

Remove nblkdev and nchrdev variables.  Most places they were used
bogusly.  Instead check a dev_t for validity by seeing if devsw()
or bdevsw() returns NULL.

Move bdevsw() and devsw() functions to kern/kern_conf.c

Bump __FreeBSD_version to 400006

This commit removes:
        72 bogus makedev() calls
        26 bogus SYSINIT functions

if_xe.c bogusly accessed cdevsw[], author/maintainer please fix.

I4b and vinum not changed.  Patches emailed to authors.  LINT
probably broken until they catch up.
1999-05-31 11:29:30 +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
Poul-Henning Kamp
52400704e9 Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference between
a major number for a dev_t.
1999-05-09 13:00:50 +00:00
Doug Rabson
566643e39e Move the declaration of the interrupt type from the driver structure
to the BUS_SETUP_INTR call.
1999-05-08 21:59:43 +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
Nicolas Souchu
4012f363f2 Return approriate errors to userland. 1999-02-14 14:36:45 +00:00
Nicolas Souchu
ba81c311c1 Fix smbus allocation and add the alsmb (see alpm(4)) driver. 1999-02-13 17:57:19 +00:00
Matthew Dillon
d7bcbf6358 Add parens to SMBPRI, fixing bug in tsleep() call that OR's SMBPRI with
something else.
1999-01-27 19:58:53 +00:00
Nicolas Souchu
602c5d866a Return error codes to user-land.
Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
1999-01-14 22:55:03 +00:00
Nicolas Souchu
bf896bd0e2 Change /dev/smb and /dev/iic interface to allow user programs to interact with
devices dynamically. That means,

        + only one /dev/iic or /dev/smb device for each smb/iic bus to access
        + I2C/SMB device address must be given to any ioctl
        + new devices may be plugged and accessed after boot, which was
          impossible previously (device addresses were hardcoded into
          the kernel)
1999-01-09 18:08:24 +00:00
Nicolas Souchu
517e248509 Rename smbtx to intsmb (IntelSMB interface), the future PIIX4 SMBus
interface driver.
1998-12-28 19:07:51 +00:00
Archie Cobbs
e43f5ffbb8 Eliminate compiler warning. 1998-12-10 02:31:08 +00:00
Archie Cobbs
f1d19042b0 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1998-12-07 21:58:50 +00:00
Nicolas Souchu
f8cf96db8f Remove broken and useless intr interface.
Submitted by: Doug Rabson <dfr@nlsystems.com>
	      Amancio Hasty <hasty@rah.star-gate.com>

Avoid compile warnings.
1998-11-22 22:01:42 +00:00
Nicolas Souchu
7a8ecb9e64 Add semicolon to INTERFACE declarations 1998-11-08 18:35:53 +00:00
Nicolas Souchu
623bdbdb0a Change METHODE (french) to METHOD.
Submitted by: Nick Hibma <nick.hibma@jrc.it>
1998-11-07 14:56:04 +00:00
Nicolas Souchu
3ab1f0562c New callback mechanism to allow iicbus bus allocation when requesting
smbus over iicsmb(4).
1998-10-31 11:39:54 +00:00
Nicolas Souchu
813548fa2c Major number allocated for generic SMB i/o -> 106 1998-09-09 18:57:38 +00:00
Nicolas Souchu
c498ec5f46 Device registration temporaly removed until major number allocation ok. 1998-09-04 17:53:42 +00:00
Nicolas Souchu
b2dc47b48a Reviewed by: Doug Rabson
Submitted by:	nsouch
I2C and SMB ioctls
1998-09-03 21:00:08 +00:00
Nicolas Souchu
d70424edcb Submitted by: nsouch
System Management Bus generic support over new bus architecture.
1998-09-03 20:52:54 +00:00