summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus/ppb_1284.c
Commit message (Collapse)AuthorAgeFilesLines
* Add locking to ppc and ppbus and mark the whole lot MPSAFE:jhb2009-01-211-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-21/+22
|
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-101-3/+3
| | | | also don't use ANSI string concatenation.
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* ppi needs to use a bus method to get this rather than peering inside thensouch2000-01-141-2/+2
| | | | | | 1284 stuff. Submitted by: Peter Wemm <peter@netplex.com.au>
* Port of ppbus standalone framework to the newbus system.nsouch2000-01-141-156/+169
| | | | | | | | | | | | | | | | | | | | | 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).
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Terminate negociation if Ext. link negociation succeeds. This avoidsnsouch1999-01-141-1/+8
| | | | the unknown mode panic during boot probe.
* Major ppbus commit with:nsouch1999-01-101-65/+705
| | | | | | | | | | | | | | | | | | | + 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.
* unused function removed (byte_1284_inbyte)nsouch1998-09-131-34/+1
|
* ppbus enhanced to support ZIP+ : 1284 code added, microseq improved +nsouch1998-09-131-26/+63
| | | | some bugs corrected in vpoio.
* Major ppbus updates from the author.msmith1998-08-031-18/+54
| | | | | | | | | | | | | | | | | - 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>
* Make the debug options new-style.eivind1998-01-311-1/+4
| | | | | This also zaps a DPT option from lint; it wasn't referenced from anywhere.
* Removed unused #includes. The !KERNEL case may be more broken than before.bde1997-09-011-9/+1
|
* Sync with ppbus-970815 from the author :msmith1997-08-161-0/+163
- interrupt-driven printing now works (nlpt) - Rearrangement of bus-related functions into ppb_base/ppbconf - Addition of ieee1284 interface functions, preliminary parallel-port PnP support Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
OpenPOWER on IntegriCloud