summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus/ppb_msq.c
Commit message (Collapse)AuthorAgeFilesLines
* - Use ppb_assert_locked() rather than using explicit mtx_assert callattilio2011-11-221-4/+1
| | | | | | - Make ppbus code agnostic in regard of INVARIANTS option MFC after: 2 weeks
* Add missing va_end() to clean up after va_start().brueffer2011-10-071-0/+1
| | | | | | CID: 4725 Found with: Coverity Prevent(tm) MFC after: 1 week
* Add locking to ppc and ppbus and mark the whole lot MPSAFE:jhb2009-01-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - To avoid having a bunch of locks that end up always getting acquired as a group, give each ppc(4) device a mutex which it shares with all the child devices including ppbus(4), lpt(4), plip(4), etc. This mutex is then used for all the locking. - Rework the interrupt handling stuff yet again. Now ppbus drivers setup their interrupt handler during attach and tear it down during detach like most other drivers. ppbus(4) only invokes the interrupt handler of the device that currently owns the bus (if any) when an interrupt occurs, however. Also, interrupt handlers in general now accept their softc pointers as their argument rather than the device_t. Another feature of the ppbus interrupt handlers is that they are called with the parent ppc device's lock already held. This minimizes the number of lock operations during an interrupt. - Mark plip(4), lpt(4), pcfclock(4), ppi(4), vpo(4) MPSAFE. - lpbb(4) uses the ppc lock instead of Giant. - Other plip(4) changes: - Add a mutex to protect the global tables in plip(4) and free them on module unload. - Add a detach routine. - Split out the init/stop code from the ioctl routine into separate functions. - Other lpt(4) changes: - Use device_printf(). - Use a dedicated callout for the lptout timer. - Allocate the I/O buffers at attach and detach rather than during open and close as this simplifies the locking at the cost of 1024+32 bytes when the driver is attached. - Other ppi(4) changes: - Use an sx lock to serialize open and close. - Remove unused HADBUS flag. - Add a detach routine. - Use a malloc'd buffer for each read and write to avoid races with concurrent read/write. - Other pps(4) changes: - Use a callout rather than a callout handle with timeout(). - Conform to the new ppbus requirements (regular mutex, non-filter interrupt handler). pps(4) is probably going to have to become a standalone driver that doesn't use ppbus(4) to satisfy it's requirements for low latency as a result. - Use an sx lock to serialize open and close. - Other vpo(4) changes: - Use the parent ppc device's lock to create the CAM sim instead of Giant. - Other ppc(4) changes: - Fix ppc_isa's detach method to detach instead of calling attach. Tested by: no one :-(
* Various whitespace and style fixes.jhb2008-11-161-4/+3
|
* Several cleanups to remove the need for explicit unit numbers and a fewjhb2008-10-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | other fixes: - Add pointers back to device_t objects in softc structures instead of storing the unit and using devclass_get_device(). - Add 'lpbb', 'pcf', 'pps', and 'vpo' child devices to every 'ppbus' device instead of just the first one. - Store softc pointers in si_drv1 of character devices instead of pulling the unit number from the minor number and using devclass_get_softc() and devclass_get_device(). - Store the LP_BYPASS flag in si_drv2 instead of encoding it in the minor number. - Destroy character devices for lpt(4) when detaching the device. - Use bus_print_child_footer() instead of duplicating it in ppbus_print_child() and fix ppbus_print_child()'s return value. - Remove unused AVM ivar from ppbus. - Don't store the 'mode' ivar in the ppbus ivars since we always fetch it from the parent anyway. - Try to detach all the child devices before deleting them in ppbus_detach(). - Use pause() instead of a tsleep() on a dummy address when polling the ppbus. - Use if_printf() and device_printf() instead of explicit names with unit numbers. Silence on: current@
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Fix some gcc-3.1+ warnings:peter2002-03-191-0/+1
| | | | | warning: deprecated use of label at end of compound statement umass.c:2626:46: multi-line string literals are deprecated
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-7/+7
| | | | also don't use ANSI string concatenation.
* A quote from the ia64 compiler:dfr2000-10-101-1/+1
| | | | | `char' is promoted to `int' when passed through `...' (so you should pass `int' not `char' to `va_arg')
* Remove unneeded #include <sys/kernel.h>phk2000-04-291-1/+0
|
* Make this lot build on alpha.dfr2000-01-251-1/+1
|
* Port of ppbus standalone framework to the newbus system.nsouch2000-01-141-23/+28
| | | | | | | | | | | | | | | | | | | | | Note1: the correct interrupt level is invoked correctly for each driver. For this purpose, drivers request the bus before being able to call BUS_SETUP_INTR and BUS_TEARDOWN_INTR call is forced by the ppbus core when drivers release it. Thus, when BUS_SETUP_INTR is called at ppbus driver level, ppbus checks that the caller owns the bus and stores the interrupt handler cookie (in order to unregister it later). Printing is impossible while plip link is up is still TRUE. vpo (ZIP driver) and lpt are make in such a way that using the ZIP and printing concurrently is permitted is also TRUE. Note2: specific chipset detection is not done by default. PPC_PROBE_CHIPSET is now needed to force chipset detection. If set, the flags 0x40 still avoid detection at boot. Port of the pcf(4) driver to the newbus system (was previously directly connected to the rootbus and attached by a bogus pcf_isa_probe function).
* Incorrect NULL -> 0eivind1999-12-201-3/+3
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix warnings preparing for -Wall -Wcast-qualdillon1999-01-271-2/+2
| | | | | Also disable one usb module in LINT due to fatal compilation errors, temporary.
* Major ppbus commit with:nsouch1999-01-101-5/+17
| | | | | | | | | | | | | | | | | | | + ECP parallel port chipset FIFO detection + DMA+FIFO parallel I/O handled as chipset specific + nlpt updated in order to use the above enhanced parallel I/O. Use 'lptcontrol -e' to use enhanced I/O + Various options documented in LINT + Full IEEE1284 NIBBLE and BYTE modes support. See ppbus(4) for an overview of the IEEE1284 standard + Detection of PnP parallel devices at boot + Read capability added to nlpt driver to get IEEE1284 compliant printer status with a simple 'cat /dev/lpt0' + IEEE1284 peripheral emulation added to BYTE mode. Two computers may dialog according to IEEE1284 signaling method. See PERIPH_1284 option and /sys/dev/ppbus/ppi.c All this code is supposed to provide basic functions for IEEE1284 programming. ppi.c and nlpt.c may act as examples.
* - port of vpo code to CAMnsouch1998-09-201-15/+7
| | | | | | | | - ppbus was released before checking if still in disk_mode by vpoio and immio: the microseq (in_disk_mode) was never executed. Fixed. - nlptintr() renamed to nlpt_intr(). spltty() inserted in nlptintr() before nlpt_intr() call
* ppbus enhanced to support ZIP+ : 1284 code added, microseq improved +nsouch1998-09-131-4/+6
| | | | some bugs corrected in vpoio.
* Major ppbus updates from the author.msmith1998-08-031-0/+326
- ppbus now supports PLIP via the if_plip driver - ieee1284 infrastructure added, including parallel-port PnP - port microsequencer added, for scripting the sort of port I/O that is common with parallel devices without endless calls up and down through the driver structure. - improved bus ownership behaviour among the ppbus-using drivers. - improved I/O chipset feature detection The vpo driver is now implemented using the microsequencer, leading to some performance improvements as well as providing an extensive example of its use. Reviewed by: msmith Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
OpenPOWER on IntegriCloud