summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus/ppbconf.c
Commit message (Collapse)AuthorAgeFilesLines
* - Corrrect mispellings of word usefulgabor2013-04-171-1/+1
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
* - Correct mispellings of the word occurrencegabor2013-04-171-1/+1
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
* Rename device_delete_all_children() into device_delete_children().hselasky2011-11-221-1/+1
| | | | | Suggested by: jhb @ and marius @ MFC after: 1 week
* Move the device_delete_all_children() function from usb_util.chselasky2011-11-191-8/+2
| | | | | | | | to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Identify a few other places where it makes sense to use device_delete_all_children(). MFC after: 1 week
* bus_add_child: change type of order parameter to u_intavg2010-09-101-1/+1
| | | | | | | | | | This reflects actual type used to store and compare child device orders. Change is mostly done via a Coccinelle (soon to be devel/coccinelle) semantic patch. Verified by LINT+modules kernel builds. Followup to: r212213 MFC after: 10 days
* Add missing locking around setting the ppc interrupt handler IVAR.jhb2009-01-261-0/+2
| | | | Reported by: many
* Add locking to ppc and ppbus and mark the whole lot MPSAFE:jhb2009-01-211-44/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-31/+31
|
* Several cleanups to remove the need for explicit unit numbers and a fewjhb2008-10-211-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* Rework the handling of interrupt handlers for children of ppc and ppbus:jhb2008-09-151-38/+2
| | | | | | | | | | | | | | | | | - Retire IVARs for passing IRQs around. Instead, ppbus and ppc now allow child devices to access the interrupt by via a rid 0 IRQ resource using bus_alloc_resource_any(). - ppc creates its own interrupt event to manage the interrupt handlers of child devices. ppc does not allow child devices to use filters. It could allow this if needed, but none of the current drivers use them and it adds a good bit of complication. It uses intr_event_execute_handlers() to fire the child device interrupt handlers from its threaded interrupt handler. - Remove the ppbus_dummy_intr() hack. Now the ppc device always has an interrupt handler registered and we no longer bounce all the way up to nexus to manage adding/removing ppbus child interrupt handlers. Instead, the child handlers are added and removed to the private interrupt event in the ppc device.
* Whitespace fix.jhb2008-08-221-1/+1
|
* Work around problems with the ppbus(4)'s interesting way of managingjhb2008-01-101-0/+37
| | | | | | | | interrupt handlers for child devices by adding a dummy handler that is always present so that the underlying interrupt thread is always around avoiding panics from stray interrupts. MFC after: 3 days
* Remove a useless cast from void * to struct ppb_device *.piso2007-03-061-1/+1
|
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-2/+2
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Import ACPI Dock Station support. Note that this is still very young.iwasaki2006-04-151-0/+18
| | | | | | | | Additional detach implementaions (or maybe improvement) for other deivce drivers is required. Reviewed by: njl, imp MFC after: 1 week
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* -Wunused cleanuppeter2001-06-121-2/+1
|
* make code use strxxx() callsalfred2001-04-011-11/+3
| | | | Glanced at by: imp
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-2/+2
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Staticize some malloc M_ instances.phk2000-12-081-1/+1
|
* Confusing comment.n_hibma2000-05-051-1/+1
|
* Some newbus-inspired tidy-ups. Use device_identify() rather than scanningpeter2000-01-231-70/+33
| | | | | | | | | | | | the resource table to locate children. The 'at ppbus?' can go again. Remove a few #if Nxxx > 0' type things, config arranges this for us. Move the newbus method glue next to the DRIVER_MODULE() stuff so we don't need extra prototypes. Don't set device descriptions until after the possibility of the probe returning an error. Remove all cdevsw_add() calls, all the drivers that did this also use make_dev() correctly, so it's not required. A couple of other minor nits.
* Port of ppbus standalone framework to the newbus system.nsouch2000-01-141-184/+245
| | | | | | | | | | | | | | | | | | | | | 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
|
* Staticize.eivind1999-04-111-2/+2
|
* Replace includes of <sys/kernel.h> with includes ofjdp1999-01-141-2/+2
| | | | | <sys/linker_set.h> in those files that use only the linker set definitions.
* Fix missing \n in boot printfs. Add more mode detection if bootverbose.nsouch1999-01-111-24/+30
|
* Fix broken low level ppb_rxxx() return type: char becomes u_char.nsouch1999-01-101-4/+2
| | | | | | Submitted by: Bruce Evans <bde@zeta.org.au> Some ppb bootup printfs simplified.
* Major ppbus commit with:nsouch1999-01-101-62/+147
| | | | | | | | | | | | | | | | | | | + 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.
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-2/+1
| | | | and local variables, goto labels, and functions declared but not defined.
* - port of vpo code to CAMnsouch1998-09-201-1/+4
| | | | | | | | - 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-9/+16
| | | | some bugs corrected in vpoio.
* Major ppbus updates from the author.msmith1998-08-031-26/+66
| | | | | | | | | | | | | | | | | - 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>
* Staticize.eivind1998-02-091-2/+2
|
* Removed unused #includes. The !KERNEL case may be more broken than before.bde1997-09-011-10/+1
|
* Remove bogus i386/* includes.msmith1997-08-281-5/+1
|
* Sync with ppbus-970815 from the author :msmith1997-08-161-151/+230
| | | | | | | | | - 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>
* New directory and drivers for Parallel Port Bus devices.msmith1997-08-141-0/+339
Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
OpenPOWER on IntegriCloud