Commit Graph

9 Commits

Author SHA1 Message Date
Jonathan Chen
c3342a3d99 Oops, broke newcard because I forgot to commit this in my last round of changes to pccbb.c 2000-11-28 15:50:13 +00:00
Warner Losh
2276cee521 Implement indirection in the pccard probe/attach. This should make it
possible to have different probe/attach semantics between the two
systems and yet still use the same driver for both.

Compatibility methods for OLDCARD drivers.  We use these routines to make
it possible to call the OLDCARD driver's probe routine in the context that
it expects.  For OLDCARD these are implemented as pass throughs to the
device_{probe,attach} routines.  For NEWCARD they are implemented such
such that probe becomes strictly a matching routine and attach does both
the old probe and old attach.

compat devices should use the following:

	/* Device interface */
	DEVMETHOD(device_probe),	pccard_compat_probe),
	DEVMETHOD(device_attach),	pccard_compat_attach),
	/* Card interface */
	DEVMETHOD(card_compat_match,	foo_match),	/* newly written */
	DEVMETHOD(card_compat_probe,	foo_probe),	/* old probe */
	DEVMETHOD(card_compat_attach,	foo_attach),	/* old attach */

This will allow a single driver binary image to be used for both
OLDCARD and NEWCARD.

Drivers wishing to not retain OLDCARD compatibility needn't do this.

ep driver minorly updated.

sn driver updated more than minorly.  Add module dependencies to allow
module to load.  Also change name to if_sn.  Add some debugging code.
attempt to fix the cannot allocate memory problem I'd been seeing.
Minor formatting nits.
2000-09-19 04:39:20 +00:00
Warner Losh
2c6b3ec454 Define get_memory_offset method 2000-08-11 15:51:51 +00:00
Warner Losh
265be3e08a Add new functions. Also add comments to existing functions. These
are needed for the pccard changes I've just committed.
2000-06-18 05:02:09 +00:00
Warner Losh
41ad2b329a Remove bogus comment 2000-04-20 07:54:59 +00:00
Warner Losh
4e84c35af2 Include <sys/bus.h>, which is needed after Doug's latest object changes. 2000-04-16 06:04:13 +00:00
Warner Losh
3a6352bdee checkpoint latest pccard/pcic hacking:
o Eliminate cross calls between the devices.  Instead move to using the
  newbus messaging system.  Added three new card calls: attach_card,
  detach_card, get_type.
o Eliminate interrupt routine in pccard we never use.
o Move from deactivate to detach for removing cards.
o Start mapping CIS memory, but it is broken and causes panics.  At least
  it is closer to working than before.
o Eliminate struct device everywhere.  It was bogus.
o Initialize softc for pccard device so we have valid pointers to
  ourselves.
o Implement routine to find the pcic ivar for a child device of the pccard so
  we can use it to talk to the pcic hardware.
o Lots of minor tiding up.

This version now panics when we try to read the CIS.  The next batch
of work to make this work is what was outlined in my posting to mobile
about resource allocation and such.
2000-04-13 06:42:58 +00:00
Warner Losh
e14c13dae0 Minor changes to some of the interfaces.
Remove RF_PCCARD_ATTR in anticipation of removing it from sys/rman.h
Add interface for setting "attributes" of pccard/cardbus devices.
Minor formatting nits.
2000-03-26 07:01:52 +00:00
Warner Losh
f27f6c0076 Add resource activation routines to pcic driver. Minor cleanup of
socket attach code.  We now have at least a chance for pccard devices
appearing in the future.

This is a snapshot of ongoing work.  Proceed at your own risk.
1999-11-28 21:11:13 +00:00