Home | History | Annotate | Download | only in pcmcia
History log of /src/sys/dev/pcmcia/pcmciavar.h
RevisionDateAuthorComments
 1.35  26-Jul-2011  dyoung Don't copy iobase and iosize members from pcmciabus_attach_args to the
pcmcia_softc because they're not used in any meaningful way.
 1.34  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.33  03-Jul-2008  drochner branches: 1.33.10;
split device/softc
Now I'm through - all my devices are split.
 1.32  23-Feb-2006  gdamore branches: 1.32.38; 1.32.64; 1.32.68; 1.32.70; 1.32.72;
Add new ihandle member to pcmcia_io_handle, similar to pcmcia_mem_handle's
mhandle structure. This is for opaque use by pcmcia chipsets.
 1.31  11-Dec-2005  christos branches: 1.31.2; 1.31.4; 1.31.6;
merge ktrace-lwp.
 1.30  27-Feb-2005  perry branches: 1.30.4;
nuke trailing whitespace
 1.29  04-Feb-2005  perry de-__P
 1.28  12-Aug-2004  mycroft branches: 1.28.4; 1.28.6;
Simplify a little. Pass down the card type from pcmcia_function_enable(),
which just gets it from the config entry for the function it's enabling.
Multifunction cards are defined to be of type I/O on every function, so there
is no possibility of accidentally switching.
 1.27  12-Aug-2004  mycroft If the card is being detached, do not try to write the CCR to disable the
function.
 1.26  12-Aug-2004  mycroft My previous understanding of the I/O base/limit registers was incorrect.
However, so was the old code. Now it works correctly. :-)
 1.25  11-Aug-2004  mycroft Rather than having a call up from the low-level driver to get the card type,
instead have a call down from the PCMCIA mid-layer to set it. Use this from
pcmcia_function_enable(). (Currently the policy is the same, but this would
allow for more flexibility in deciding which mode to use.)

Now it is safe to hold the socket enabled during attach, so do that. Only
one enable/disable cycle to attach a card now!
 1.24  10-Aug-2004  mycroft Enhance pcmcia_product_lookup():
* Remove the "expected function" value. This was just causing problems with
multifunction cards. Differentiating the functions is better done by
checking the function type (which we now do in ep and sm).
* Add support for matching CIS strings. This necessitated changing the calling
pattern a little too.

Use this enhanced version rather than driver-specific versions that do the
same thing.

Also, remove the last vestiges of PCMCIA_STR_*.
 1.23  10-Aug-2004  mycroft Be robust against child devices failing to handle the socket refcnt properly --
force it to 0 when a card is detached, possibly disabling the socket in the
process.

Add several new functions:
* pcmcia_config_alloc(pf, cfe)
Tries to allocate all the I/O and memory spaces in a config entry.
* pcmcia_config_free(pf)
Frees all the I/O and memory spaces for the active configuration.
* pcmcia_config_map(pf)
Maps all the allocated I/O and memory spaces for the active configuration.
* pcmcia_config_unmap(pf)
Unmaps all the allocated I/O and memory spaces for the active configuration.

And two higher-level functions:
* pcmcia_function_configure(pf, validator)
Tries to find a CIS config entry that it can allocate the spaces for. Each
entry is verified by calling the "validator" function -- which can also do
card- and driver-specific fixups. If successful, the regions are all mapped.
* pcmcia_function_unconfigure(pf)
Equivalent to calling both pcmcia_config_unmap() and pcmcia_config_free().

Most drivers are expected to use the latter two functions, which will greatly
reduce the amount of crufty code.
 1.22  09-Aug-2004  mycroft Dispense with all the interrupt multiplexing code here, and assume that the
underlying implementation DTRT. This has the side effect of causing us to
ignore the INTR and INTRACK bits in the CCR -- but this seems for the best
anyway, since they are not reliably implemented. (I note that Linux doesn't
bother either.)
 1.21  08-Aug-2004  mycroft Remove the "offset" and "size" arguments to pcmcia_io_map(). In the singular
case (ne@pcmcia) where we were using these to create a subregion, it is better
handled by calling bus_space_subregion().

Now there is a 1:1 mapping between I/O spaces in the config table and windows
mapped in the function. Rework the multifunction mapping code to take
advantage of this by using both I/O base addresses if necessary.
 1.20  08-Aug-2004  mycroft pcmcia_socket_{enable,disable}() weren't used. Reimplement them as public
functions taking a pcmcia* device structure.

XXX This is a method of last resort for dealing with stupid/insane cards that
we need to probe harder before we can choose a config entry. It should not be
used by most drivers.
 1.19  07-Jul-2004  mycroft More cleanup:
* Print "devinfo" in a canonial place (like we do in the SCSI code).
* Use aprint_{error,normal}() during attach.
* More PCMCIA_STR_* removal.
 1.18  08-Jul-2003  itojun function prototype must not have variable name
 1.17  15-Aug-2002  christos branches: 1.17.6;
Fix multi-function card memory problems:
- centralize pcmcia function allocation and free'ing.
- free the cfe too, not just the pf in the multifunction card case.
- don't free pointers while walking the list, because free() will
fill the memory with deadbeef, thus killing list walking.
 1.16  01-Jun-2002  lukem SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field). whilst it's O(n),
this mirrors the functionality of SLIST_REMOVE() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
 1.15  15-Dec-2001  soren branches: 1.15.8; 1.15.10;
To make dev/pcmcia work on platforms with 64-bit bus_addr_t and
32-bit bus_size_t (sparc), change the pcmcia_mem_map(9) offsetp
argument to bus_size_t as it is used as a bus_space offset.
 1.14  18-Jan-2001  jdolecek branches: 1.14.2; 1.14.4;
constify
 1.13  17-Oct-2000  haya Add a cis decoding function which decodes some CISTPL_FUNCE tuples for
disk and network functions.
 1.12  08-Feb-2000  enami - Don't rely on implicit declaration.
- Sinc wi/ existing coding style.
 1.11  07-Feb-2000  augustss Add a pcmcia_devinfo() function (akin to pci_devinfo). It generates a
string suitable for printing in the attach message.
 1.10  04-Feb-2000  cgd replace the *_lookup table entry match/lookup functions in all of
these drivers with a single common function (which supports tables
of variable-sized structures). Things are mostly as they were before:
tables are terminated by entry with NULL name, etc. There's also
the ability to call a driver-specific match function which can be used
to augment the table lookup.
 1.9  29-Dec-1998  marc branches: 1.9.8;
added support for quirks based on cis strings, added quirk entry for SVEC_LANCARD
 1.8  24-Dec-1998  marc add quirk support for cards which lie extensively about their CIS
 1.7  17-Nov-1998  thorpej Finish implementing interrupt-driven card insertion and removal support.

- Deactivate the card on removal and queue a REMOVAL event for the socket's
event thread to finish the detach.
- Queue an INSERTION event for the socket's event thread on insertion.

Implement a few missing infrastructure pieces to support this.

Hot swapping of PCMCIA cards now "works". (Not quite; things like network
devices need changes for their respestive subsystems. These changes are
coming soon...)
 1.6  10-Oct-1998  thorpej Define missing pcmcia_io_free().
 1.5  19-Jul-1998  christos Add a devlist2h.awk so that we don't sprinkle the same constants over
each device driver file and use it.
 1.4  01-Feb-1998  marc add state to struct pcmcia_function for mfc iobase/iosize support
 1.3  19-Oct-1997  enami Make `manufacturer' and `product' 32bit wide so that they can contain
both 16bit id values found in card CIS and special value to indicate
that no value found in CIS. Use that special value for the card that
doesn't have id values. Test that value in ne2000_match().
 1.2  16-Oct-1997  thorpej Pull marc-pcmcia branch down from trunk.
 1.1  30-Jul-1997  marc branches: 1.1.2;
file pcmciavar.h was initially added on branch marc-pcmcia.
 1.1.2.8  16-Oct-1997  thorpej Copyright/license update.
 1.1.2.7  16-Oct-1997  thorpej Pass down the start and side of the i/o space allocation range to
the "pcmcia" layer so that drivers with Very Special i/o space allocation
needs can know what range they should be dealing with.
 1.1.2.6  14-Oct-1997  thorpej KNF, RCS IDs.
 1.1.2.5  14-Oct-1997  thorpej Allow the i/o address alignment to be specified in the call to
pcmcia_io_alloc(). If the caller does not care about the alignment, 0
should be passed.
 1.1.2.4  23-Aug-1997  thorpej Split up pcmcia_enable_function() into pcmcia_function_init() and
pcmcia_function_enable(). Implement pcmcia_function_disable().
If the enabled count on a socket reaches 0, call the chipset-level
socket disable function. If the enabled count becomes non-0, call
the chipset-level socket enable function.
 1.1.2.3  10-Aug-1997  thorpej Create a structure to encapsulate information about allocated i/o and
mem space on the pcmcia bus. Use this in chip-level window enable
functions rather than making assumptions about the bus space handles.

Also, clean up lots of debugging prints. Use patchables to enable them.
 1.1.2.2  30-Jul-1997  marc add the pcmcia device dir.
 1.1.2.1  30-Jul-1997  marc added pcmcia infrastructure and a few devices
 1.9.8.2  11-Feb-2001  bouyer Sync with HEAD.
 1.9.8.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.14.4.3  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.14.4.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.14.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.2.3  27-Aug-2002  nathanw Catch up to -current.
 1.14.2.2  20-Jun-2002  nathanw Catch up to -current.
 1.14.2.1  08-Jan-2002  nathanw Catch up to -current.
 1.15.10.1  21-Oct-2003  jmc Pullup to rev 1.17 (requested in ticket #699)
Enable support for multi-function pcmcia cards.
 1.15.8.2  29-Aug-2002  gehenna catch up with -current.
 1.15.8.1  20-Jun-2002  gehenna catch up with -current.
 1.17.6.7  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.17.6.6  04-Feb-2005  skrll Sync with HEAD.
 1.17.6.5  21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.6.4  18-Sep-2004  skrll Sync with HEAD.
 1.17.6.3  25-Aug-2004  skrll Sync with HEAD.
 1.17.6.2  12-Aug-2004  skrll Sync with HEAD.
 1.17.6.1  03-Aug-2004  skrll Sync with HEAD
 1.28.6.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.28.6.1  12-Feb-2005  yamt sync with head.
 1.28.4.1  29-Apr-2005  kent sync with -current
 1.30.4.1  21-Jun-2006  yamt sync with head.
 1.31.6.1  22-Apr-2006  simonb Sync with head.
 1.31.4.1  09-Sep-2006  rpaulo sync with head
 1.31.2.1  01-Mar-2006  yamt sync with head.
 1.32.72.1  18-Jul-2008  simonb Sync with head.
 1.32.70.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.32.68.2  16-May-2009  yamt sync with head
 1.32.68.1  04-May-2009  yamt sync with head.
 1.32.64.1  28-Sep-2008  mjf Sync with HEAD.
 1.32.38.2  06-Nov-2007  joerg Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
three layers (class logic, device logic, bus logic), all of them being
optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
not suspended (even partially), device_is_enabled returns true if the
device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
pnp_system_resume. Before running any suspend/resume handlers, check
that all currently attached devices support power management and bail
out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
can register what events they are interested in and whether the handler
should be global or not.
- Introduce device_active API for devices to mark themselve in use from
either the system or the device. Use this to implement the idle handling
for audio and input devices. This is intended to replace most ad-hoc
watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.
 1.32.38.1  04-Sep-2007  joerg Add a basic generic network power management handler for PCMCIA as well.
Contrary to the versions for PCI/Cardbus, expect the caller to provide
the status variable as we currently have no way in hardware to do that.

This handler should be extended to power down/power up the slots on
D0/D3 transistions.
 1.33.10.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

RSS XML Feed