summaryrefslogtreecommitdiffstats
path: root/sys/dev/iicbus
Commit message (Collapse)AuthorAgeFilesLines
* Lock down the network interface queues. The queue mutex must be obtainedjlemon2000-11-251-7/+2
| | | | | | | | | | | | | | before adding/removing packets from the queue. Also, the if_obytes and if_omcasts fields should only be manipulated under protection of the mutex. IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on the queue. An IF_LOCK macro is provided, as well as the old (mutex-less) versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which needs them, but their use is discouraged. Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF, which takes care of locking/enqueue, and also statistics updating/start if necessary.
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Remove unneeded #include <machine/clock.h>phk2000-10-154-4/+0
|
* Allow these drivers to be detached.jake2000-06-162-0/+2
| | | | Reviewed by: mdodd
* Remove unneeded #include <sys/kernel.h>phk2000-04-291-1/+0
|
* Remove ~25 unneeded #include <sys/conf.h>phk2000-04-194-6/+0
| | | | Remove ~60 unneeded #include <sys/malloc.h>
* Remove unneeded <sys/buf.h> includes.phk2000-04-183-3/+0
| | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
* * Factor out the object system from new-bus so that it can be used bydfr2000-04-082-0/+4
| | | | | | | | | | non-device code. * Re-implement the method dispatch to improve efficiency. The new system takes about 40ns for a method dispatch on a 300Mhz PII which is only 10ns slower than a direct function call on the same hardware. This changes the new-bus ABI slightly so make sure you re-compile any driver modules which you use.
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-2/+2
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Remove the 'ivars' arguement to device_add_child() andmdodd1999-12-032-3/+3
| | | | | | | | | | | | | | | | 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
* Convert iic to use make_dev() rather than cdevsw_add(). This stops thepeter1999-11-181-1/+3
| | | | | annoying 'iic is usurping iic's cdevsw' type messages. (Yes, there are other ways to fix cdevsw_add(), but that is a doomed api)
* Use cdevsw_add() explicitly and DRIVER_MODULE().peter1999-11-081-1/+2
|
* Sync with RELENG_3.nsouch1999-11-012-3/+7
|
* Fix: WARNING: "iic" is usurping "iic"'s cdevsw[] - the DEV_DRIVER_MODULE()peter1999-10-041-4/+0
| | | | takes care of the cdevsw_add() - it doesn't need to be done twice.
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | 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
* Remove NBPF conditionality of bpf calls in most of our network drivers.phk1999-09-251-10/+0
| | | | | | | | | | | | This means that we will not have to have a bpf and a non-bpf version of our driver modules. This does not open any security hole, because the bpf core isn't loadable The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be. Add a couple of missing FreeBSD tags.
* $Id$ -> $FreeBSD$peter1999-08-2811-11/+11
|
* Alter the behavior of sys/kern/subr_bus.c:device_print_child()mdodd1999-07-293-29/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Rename bpfilter to bpf.des1999-07-061-6/+6
|
* Remove cmaj and bmaj args from DEV_DRIVER_MODULE.phk1999-07-041-3/+2
|
* Simplify cdevsw registration.phk1999-05-311-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* This commit should be a extensive NO-OP:phk1999-05-301-5/+22
| | | | | | | | | | | | | 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.
* Unconfuse DEV_MODULE() and DEV_DRIVER_MODULE() about the difference betweenphk1999-05-091-2/+2
| | | | a major number for a dev_t.
* Move the declaration of the interrupt type from the driver structuredfr1999-05-085-10/+5
| | | | to the BUS_SETUP_INTR call.
* Continue where Julian left off in July 1998:phk1999-05-071-3/+3
| | | | | | | | | | | | | | 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.)
* Staticize.eivind1999-04-111-2/+2
|
* Handle correctly iicbus request/release mechanism. Add iicbus allocationnsouch1999-02-132-9/+28
| | | | to the general purpose i/o iic(4) driver.
* Changed to use IICBUS_REPEATED_STARTroger1999-02-061-2/+2
| | | | Submitted by: Changed to use IICBUS_REPEATED_START
* Submitted by: Nicolas Souchu <nsouch@freebsd.org>roger1999-01-281-1/+50
| | | | | Updated to support bt848 driver and MSP3400 audio chip. This adds changes made in 1.4.2.1 and 1.4.2.2 from RELENG_3
* Submitted by: Nicolas Souchu <nsouch@freebsd.org>roger1999-01-281-3/+6
| | | | | Updated to support bt848 driver MSP34xx audio chip. This adds changes made in 1.3.2.1 and 1.3.2.2 from RELENG_3
* Submitted by: Nicolas Souchu <nsouch@freebsd.org>roger1999-01-281-2/+2
| | | | Added support required by bt848 driver for MSP34xx audio chip
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-2/+2
| | | | kernel compile
* Change /dev/smb and /dev/iic interface to allow user programs to interact withnsouch1999-01-096-34/+157
| | | | | | | | | | 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)
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-073-13/+4
| | | | and local variables, goto labels, and functions declared but not defined.
* Remove broken and useless intr interface.nsouch1998-11-222-5/+3
| | | | | | | Submitted by: Doug Rabson <dfr@nlsystems.com> Amancio Hasty <hasty@rah.star-gate.com> Avoid compile warnings.
* Check if devclass exists for probed devices beforensouch1998-11-081-2/+4
| | | | declaring the device 'alive'.
* Add semicolon to INTERFACE declarationsnsouch1998-11-082-4/+4
|
* Add iic driver iff the corresponding devclass exists.nsouch1998-11-071-7/+8
|
* Properly reset parent to get interface addr.nsouch1998-11-041-3/+3
|
* iicbb is generic support for I2C bit-banging.nsouch1998-10-3110-120/+665
| | | | Other files: timeout management added to the I2C framework.
* Major number allocated for generic I2C i/o -> 105nsouch1998-09-091-5/+4
|
* Device registration temporaly removed until major number allocation ok.nsouch1998-09-041-4/+5
|
* Reviewed by: Doug Rabsonnsouch1998-09-031-0/+40
| | | | | Submitted by: nsouch I2C and SMB ioctls
* Submitted by: nsouchnsouch1998-09-038-0/+1843
Philips I2C bus generic support other new bus architecture.
OpenPOWER on IntegriCloud