History log of /freebsd-10.0-release/sys/dev/ppc/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


247094 21-Feb-2013 glebius

Fix build.


247066 21-Feb-2013 imp

Replace splhigh() with critical_enter()/leave() to ensure we write the
config mode unlock sequence quickly enough. This likely isn't too critical,
since splhigh() has been a noop for a decade...


247065 21-Feb-2013 imp

No longer need splhigh() since locking was done, delete it and
comments about it.


227849 22-Nov-2011 hselasky

Rename device_delete_all_children() into device_delete_children().

Suggested by: jhb @ and marius @
MFC after: 1 week


227701 19-Nov-2011 hselasky

Move the device_delete_all_children() function from usb_util.c
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


218861 19-Feb-2011 miwi

- Add support for MosChip 9865 Single 1284 Printer port

PR: kern/152663
Submitted by: Jonathan Chen <jonc@chen.org.nz>
Approved by: rwatson (mentor)


205534 23-Mar-2010 delphij

Add PCI ID for MCS9901's parallel port.

PR: kern/144713
Submitted by: gcooper
MFC after: 2 weeks


188472 11-Feb-2009 kaiw

Added entries for Lava SP-PCI (1 serial + 1 parallel) PCI card. The
card is a multifunction PCI and report itself as two logical devices.


188173 05-Feb-2009 imp

reset_epp and ecp_sync both return int.


187576 21-Jan-2009 jhb

Add locking to ppc and ppbus and mark the whole lot MPSAFE:
- 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 :-(


185003 16-Nov-2008 jhb

Various whitespace and style fixes.


184176 22-Oct-2008 jhb

Fix build with PPC_PROBE_CHIPSET enabled.


184130 21-Oct-2008 jhb

Several cleanups to remove the need for explicit unit numbers and a few
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@


183053 15-Sep-2008 jhb

Rework the handling of interrupt handlers for children of ppc and ppbus:
- 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.


182441 29-Aug-2008 nyan

Remove unneeded include.


182016 22-Aug-2008 jhb

Use bus_foo() rather than bus_space_foo() and remove bus handle and tag
from softc.


182015 22-Aug-2008 jhb

Use ppc_detach() for device_detach instead of ppc_attach().

MFC after: 1 week


167753 21-Mar-2007 nyan

Don't call bus_deactivate_resource() explicitly before calling
bus_release_resource(). This is needed for pc98 by upcoming nexus related
change.


167264 06-Mar-2007 piso

o Wrap ppc_setup_intr() at 80.
o Fix a bit the indentation.


166933 23-Feb-2007 jhb

Whitespace fix.


166909 23-Feb-2007 jhb

Use 'pause' in several places rather than trying to tsleep() on NULL (which
triggers a KASSERT) or local variables. In the case of kern_ndis, the
tsleep() actually used a common sleep address (curproc) making it
susceptible to a premature wakeup.


166901 23-Feb-2007 piso

o break newbus api: add a new argument of type driver_filter_t to
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@


158471 12-May-2006 jhb

Remove various bits of conditional Alpha code and fixup a few comments.


158124 28-Apr-2006 marcel

Rewrite of puc(4). Significant changes are:
o Properly use rman(9) to manage resources. This eliminates the
need to puc-specific hacks to rman. It also allows devinfo(8)
to be used to find out the specific assignment of resources to
serial/parallel ports.
o Compress the PCI device "database" by optimizing for the common
case and to use a procedural interface to handle the exceptions.
The procedural interface also generalizes the need to setup the
hardware (program chipsets, program clock frequencies).
o Eliminate the need for PUC_FASTINTR. Serdev devices are fast by
default and non-serdev devices are handled by the bus.
o Use the serdev I/F to collect interrupt status and to handle
interrupts across ports in priority order.
o Sync the PCI device configuration to include devices found in
NetBSD and not yet merged to FreeBSD.
o Add support for Quatech 2, 4 and 8 port UARTs.
o Add support for a couple dozen Timedia serial cards as found
in Linux.


158057 26-Apr-2006 marcel

o Use __FBSDID
o Whitespace fixes
o Non-K&R functions


158005 24-Apr-2006 marcel

o Move ISA specific code from ppc.c to ppc_isa.c -- a bus front-
end for isa(4).
o Add a seperate bus frontend for acpi(4) and allow ISA DMA for
it when ISA is configured in the kernel. This allows acpi(4)
attachments in non-ISA configurations, as is possible for ia64.
o Add a seperate bus frontend for pci(4) and detect known single
port parallel cards.
o Merge PC98 specific changes under pc98/cbus into the MI driver.
The changes are minor enough for conditional compilation and
in this form invites better abstraction.
o Have ppc(4) usabled on all platforms, now that ISA specifics
are untangled enough.


157774 15-Apr-2006 iwasaki

Import ACPI Dock Station support. Note that this is still very young.
Additional detach implementaions (or maybe improvement) for other
deivce drivers is required.

Reviewed by: njl, imp
MFC after: 1 week


155927 22-Feb-2006 jhb

G/C unused variable.


155921 22-Feb-2006 jhb

- Use bus_setup_intr() and bus_teardown_intr() to register device driver
interrupt handlers rather than BUS_SETUP_INTR() and BUS_TEARDOWN_INTR().
Uses of the BUS_*() versions in the implementation of foo_intr methods
in bus drivers were not changed. Mostly this just means that some
drivers might start printing diagnostic messages like [FAST] when
appropriate as well as honoring mpsafenet=0.
- Fix two more of the ppbus drivers' identify routines to function
correctly in the mythical case of a machine with more than one ppbus.


153610 21-Dec-2005 ru

Add missing MODULE_DEPEND() so that ppbus.ko and these .ko's can be
loaded dynamically.


153072 04-Dec-2005 ru

Fix -Wundef.


144973 12-Apr-2005 imp

don't use C keyword register as CPP macro argument name


139749 06-Jan-2005 imp

Start each of the license/copyright comments with /*-, minor shuffle of lines


129879 30-May-2004 phk

Add missing <sys/module.h> includes


127135 17-Mar-2004 njl

Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde


118294 01-Aug-2003 ambrisko

Forgot an added file in the last commit.


118292 01-Aug-2003 ambrisko

Add printer support to puc(4) driver.
- Move isa/ppc* to sys/dev/ppc (repo-copy)
- Add an attachment method to ppc for puc
- In puc we need to walk the chain of parents.
Still to do, is to make ppc(4) & puc(4) work on other platforms. Testers
wanted.

PR: 38372 (in spirit done differently)
Verified by: Make universe (if I messed up a platform please fix)


116181 11-Jun-2003 obrien

Use __FBSDID().


115545 31-May-2003 phk

Remove break after return;

Found by: FlexeLint


114293 30-Apr-2003 markm

Fix some easy, global, lint warnings. In most cases, this means
making some local variables static. In a couple of cases, this means
removing an unused variable.


111748 02-Mar-2003 des

More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).


93021 23-Mar-2002 nsouch

Restore the original copyright


87599 10-Dec-2001 obrien

Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.


82555 30-Aug-2001 msmith

Add ACPI attachments.


78646 23-Jun-2001 nsouch

Convert inb/outb to bus_space.

Submitted by: jcm@FreeBSD-uk.eu.org


71622 25-Jan-2001 nsouch

Consider that the chipset may be in ECP mode (from BIOS settings)
even if mode PS/2 is forced with bootflags. As a matter of fact,
chipsets needs some extra configuration for accessing PS/2 mode
from ECP. The current patch is only relevant for generic chipsets
since specific code is supposed to deal with this during detection.


70201 19-Dec-2000 nsouch

Fix the PR. Getting a dma channel equal to 0 remains a problem though.

PR: i386/22568


63624 20-Jul-2000 dfr

Add support for the PC87303 chipset (found on Miata alphas) and add
support for relocating the port address if the isa hints specify a
different address from the address the chipset currently has.

Submitted by: Andrew M. Miklic <miklic@ibm.net>


63403 18-Jul-2000 dfr

Add smc37c935 chipset support and clean up the code which tries to
allocate a short port range in some alpha configurations.

Submitted by: "Andrew M. Miklic" <miklic@udlkern.fc.hp.com>,
Mark Abene <phiber@radicalmedia.com>


62061 25-Jun-2000 dfr

Only print the diagnostic about extended I/O ports if bootverbose is true.


60544 14-May-2000 dfr

Port ppc driver to alpha.

Submitted by: Andrew M. Miklic <miklic@ibm.net>


59491 22-Apr-2000 wollman

Enable PnP attachment for parallel port controllers.

PR: 17495


56818 29-Jan-2000 peter

Remove #include "ppc.h" and #if NPPC > 0 - this is always true as it is
'optional ppc' in conf/files*


56617 25-Jan-2000 dfr

* Don't use ivars to access resources, bus_set/get_resource is much better.
* First approximation of making this work on alpha (not working yet).


55948 14-Jan-2000 peter

Don't do device_set_desc() until after checking for PnP probes. Otherwise
things like sound cards can get called "Parallel port". A note to the
unwary; the isa-pnp devices in the system are probed like PCI - each
device ID is passed to *all* isa probe routines to find the best match.
If the driver is not prepared to deal with this, it must abort in this
scenario or it will try and claim all PnP devices.


55939 14-Jan-2000 nsouch

Port of ppbus standalone framework to the newbus system.

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).


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


45935 22-Apr-1999 peter

Return the port size from the probe.
"ppc0 at port 0x378 irq 7 drq 3 on isa0" becomes
"ppc0 at port 0x378-0x37f irq 7 drq 3 on isa0"


44023 14-Feb-1999 nsouch

More appropriate fix to the id_irq read during probe


44001 14-Feb-1999 nsouch

The way the interrupt id was calculated was wrong and the lpt
driver was thinking irq was enabled although it wasn't.
This case was particular to a no-interrupt static configuration.

Reported by: "Norman C. Rice" <nrice@emu.sourcee.com>


43990 14-Feb-1999 nsouch

Fix interrupt handling with DMA. Bit nFault was tested in the control reg.
instead of the status reg. and check ECP mode before considering nFault.


43460 31-Jan-1999 nsouch

Fix compile warnings about missing braces around static initialization of unions.


43433 30-Jan-1999 nsouch

Distinguish EPP address/data register. Add EPP address register access to ppi.

Change microseq offsets. Previously, offsets of the program counter where
added to the index of the current microinstruction. Make them rely on the
index of the next executed microinstruction.

Suggested by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>


42482 10-Jan-1999 nsouch

Fix broken low level ppb_rxxx() return type: char becomes u_char.

Submitted by: Bruce Evans <bde@zeta.org.au>

Some ppb bootup printfs simplified.


42475 10-Jan-1999 nsouch

Major ppbus commit with:

+ 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.


42155 30-Dec-1998 hoek

Silence -Wtrigraph.

Submitted by: Bradley Dunn <bradley@dunn.org> (pr: kern/8817)


41591 07-Dec-1998 archie

The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.


40784 31-Oct-1998 nsouch

pcf.c: timeout management added

ppc.c: nsc code improved. Actually, a complete rewrite.


40565 22-Oct-1998 bde

Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c. Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato


39521 20-Sep-1998 nsouch

- program counter was previously an index in the microsequence, now pc
is struct ppb_microseq* pointing directly into the microsequence


39142 13-Sep-1998 nsouch

invalid printf call fixed -> compile time warning removed


39135 13-Sep-1998 nsouch

ppbus enhanced to support ZIP+ : microseq improved


38761 02-Sep-1998 nsouch

printing with compatible mode fixed if ECP available + more verbose if bootverbose set


38505 24-Aug-1998 bde

Fixed printf format errors. Only one left in LINT on i386's.


38061 03-Aug-1998 msmith

Major ppbus updates from the author.

- 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>


35256 17-Apr-1998 des

Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.


28987 01-Sep-1997 bde

Removed unused #includes.


28259 16-Aug-1997 msmith

Minor ppc_data structure tweak.
Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>


28221 14-Aug-1997 msmith

ISA Parallel-Port Bus chipset driver.
Submitted by: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>