Commit Graph

41 Commits

Author SHA1 Message Date
Warner Losh
d2cd166745 OLDCARD is OBSOLETE_IN_6. Tag it as such. 2003-06-12 04:46:43 +00:00
Warner Losh
9598fb9322 1. Allow drivers to query CIS strings from OLDCARD.
2. Include backwards compatibility good for the moment (eventually will
   be turned off in current, but allow for a short transition period).

PR:	51333
Submited by: Scott Mitchell (1)
MFC after:	2 weeks
2003-04-23 23:39:21 +00:00
Warner Losh
db351cca83 Add 16-bit before bus to keep the words card and bus apart. 2002-07-31 20:01:11 +00:00
Warner Losh
79d9b7534a Be more conservative about the address ranges we assign. Some
machines don't like the more liberal default, so be more conservative
about what we do by default.
2002-07-17 05:50:06 +00:00
Takanori Watanabe
154ce58548 Forget to change lookup function for oldcard side. 2002-05-30 18:48:44 +00:00
Takeshi Shibagaki
9198b952b5 Add some code which is compatible for NEWCARD. It makes manufacturer
id transfer from pccardd.

Reviewed by: imp
2002-02-20 14:42:36 +00:00
Warner Losh
76051d5c6d If flags were specified for the device, print them in the probe
message.  Some scsi devices have rather elaberate flags, and it is
hard to know which ones were specified in pccard.conf when debug
information only includes the dmesg.
2001-09-09 17:28:02 +00:00
Warner Losh
cce0210e49 There is no tcic driver, so no need to list it here. 2001-08-15 05:39:58 +00:00
Warner Losh
e4db871961 Type sanity: use uintptr_t * for read_ivar and u_int8_t instead of u_char 2001-08-10 06:00:44 +00:00
Warner Losh
c671fc7bfb #ifdef some 5.0 code with freebsd_version to reduce diffs with stable. 2001-07-28 04:25:11 +00:00
Warner Losh
acf5760400 Update copyright info 2001-05-25 18:03:07 +00:00
Warner Losh
821257e1db This code touches MD code inappropriately. So we have to include pc98
specific file for pc98.
2001-05-15 23:43:02 +00:00
Warner Losh
510937db3c Minor style(9) changes:
return (VALUE);
2001-05-14 06:15:24 +00:00
Warner Losh
9058c0858a Change machdep.pccard.pcic_mem_{start,end} to machdep.pccard.mem_{start,end}
since they have nothing to do with pcic and it makes grepping for pcic
infection in pccard harder.

MFC after:	3 days
2001-05-14 05:56:12 +00:00
Warner Losh
804e80065b o Get rid of static array of slots in pccard layer. Move this to the
softc.
o Store pointers to softc in dev_t in si_drv1.
o Change 'kludge version' to 'classic version' since things are getting less
  kludgy.
o Minor code shuffling so that we probe and attach the pccard slots.
o Minor style(9) changes.
2001-05-13 01:44:27 +00:00
Duncan Barclay
a31957707a Add a sysctl pair for the pcic memory allocation range
machdep.pccard.pcic_mem_start
	machdep.pccard.pcic_mem_end
and default the range to IOM_BEGIN/IOM_END.

This may prove useful to if_ray users (and others) on more modern
hardware that maps BIOS stuff into 0xd000-0xdffff.

MFC: after 1 week

Approved by:	imp
2001-05-08 22:51:05 +00:00
Warner Losh
4d98b7a61b My fix to NEWCARD for getting the function type broke oldcard due to
a name conflict.

Pointed out by: markm

# I had to login to freefall to make this commit, so something maybe up
2001-04-21 14:10:32 +00:00
Warner Losh
c33c1284cb First step towards making loadable modules independent of having
pccard in the kernel for those drivers with pccard attachments.  This
makes the compat layer a little larger by introducing some inlines,
but should almost make it possible to have independent attachments.
The pccard_match function are the only one left, which I will take
care of shortly.
2001-03-22 06:00:07 +00:00
Garrett Wollman
0a2c3d48c6 select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
Warner Losh
486d464d74 o Now that I've had time to test the new interface, reintegrate it back in.
o Fix OLDCARD to use the new interface.
o Rename the offsetp argument to deltap to more closely reflect what it
  is returning (it returns the delta from the requested value to the actual
  value).
o Remove duplicate $FreeBSD$ in pccbb.c
o Allow deltap to be NULL.
o Convert new isa pcic driver and add XXX comments that this function isn't
  actually implemented there (which means that NEWCARD pccard stuff won't
  work there until it is).
o Revert attempts to make old inferface work in NEWCARD.

Subitted by: peter (Parts of the new version code)
2001-01-07 16:31:09 +00:00
Warner Losh
fa024f017e Add pccard_product_lookup comatibility shim 2000-09-28 07:22:30 +00:00
Warner Losh
d186a392ba o Remove 9 unnecessary includes.
o Add Vpp power at 5.0V rather than 0. Setting it to zero violates
  the pccard spec.  Most pcic devices in use today don't let us
  violate the spec, but some older ones do.  Bill Paul sent this to
  me a long time ago and I thought I'd commit it before now.
o Add some debug stuff hidden behind bootverbose.
2000-09-20 20:02:49 +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
2563e6f5b8 Add some infrastructure support for dealing with large attribute
memory space needed by the raylink driver (in progress, nearing
completion).

This is a minorly cleaned up diff from Duncan to help him reduce the
diffs from stock FreeBSD.

Submitted by: Duncan Barclay <dmlb@ragnet.demon.co.uk>
2000-08-10 17:35:11 +00:00
Warner Losh
6cd40f893b o Implement some compatibility functions for NEWCARD compat. This is
incomplete, but will eventually allow the same drivers to function
  with both oldcard and newcard.
o Remove include of opt_bus.h.  It isn't needed and gets in the way of
  module building.
2000-06-18 04:59:39 +00:00
Warner Losh
da05ca010e Checkin my first batch of New Mexico changes:
o minor whitespace things (bad because this is also a functional commit)
o Backport reading in of CIS entries from the driver level.
2000-04-25 06:07:27 +00:00
Warner Losh
db5ca7b1d2 o Preliminary support for mapping the CIS by the driver.
o Modify xe driver to use this.

There's still some issues with this code, so xe can't map the cis just
yet.  I'm thinking about how to resolve the issue.  pccard_nbk's
pccard_alloc_resource is getting in the way.
2000-04-20 08:37:46 +00:00
Poul-Henning Kamp
3389ae9350 Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>
2000-04-19 14:58:28 +00:00
Warner Losh
da144b9373 /tmp/msg 2000-02-21 06:52:20 +00:00
Tatsumi Hosokawa
87ef0a0afb Propagate MAC address in CIS tupple to dev/ed/ driver.
Many ed-based Ethernet PC-cards can't get correct MAC address without
this patch.

Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
Reviewed by: Warner Losh <imp@village.org>
2000-01-21 03:08:46 +00:00
Warner Losh
d95b5da991 Switch to using suspend/resume methods rather than the APM hooks.
Should have no effect, but does make things a little cleaner.  I
thought this was the race that was causing problems, but it turned out
to be in pccardd waking up after the empty/insert events had happened
and being confused.

Minor cleanup:
o Remove isahd from pccard_devinfo
o remove extra from controller
o formatting nits
o use PCCARD_DEVINFO(d) rather than a bare device_get_ivars(d)
1999-12-08 07:55:20 +00:00
Peter Wemm
5ab0514321 Allow NULL for startp and/or countp in bus_get_resource() so that you can
get one of the two without having to use a dummy variable.
1999-11-20 14:56:55 +00:00
Warner Losh
27e8060d4a Kill unneeded includes
Found by phk's script a while ago.
1999-11-20 05:02:00 +00:00
Warner Losh
78d7954c0f Do not add children for new bus kludge version of pccard.
Fix some compile warnings.
1999-10-28 04:51:39 +00:00
Warner Losh
4f76d87b21 Massive rewrite of pccard to convert it to newbus.
o Gut the compatibility interface, you now must attach with newbus.
o Unit numbers from pccardd are now ignored.  This may change the units
  assigned to a card.  It now uses the first available unit.
o kill old skeleton code that is now obsolete.
o Use newbus attachment code.
o cleanup interfile dependencies some.
o kill list of devices per slot.  we use the device tree for what we need.
o Remove now obsolete code.
o The ep driver (and maybe ed) may need some config file tweaks to
  allow it to attach.  See config files that were committed for examples
  on how to do this.

Drivers to be commited shortly.

This is an interrum fix until the new pccard.  ed, ep and sio will be
supported by me with this release, although others are welcome to try
to support other devices before new pccard is working.

I plan on doing minimal further work on this code base.  Be careful
when upgrading, since this code is known to work on my laptop and
those of a couple others as well, but your milage may vary.

BUGS TO BE FIXED:

o system memory isn't allocated yet, it will be soon.
o No devices actually have a pccard newbus attach in the tree.

BUGS THAT MIGHT BE FIXED:

o card removal, including suspend, usually hangs the system.

Many thanks to Peter Wemm and Doug Rabson for helping me to fill in
the missing bits of New Bus understanding at FreeBSD Con '99.
1999-10-25 02:41:58 +00:00
Warner Losh
b5137699ae Reorganize the attachement point for pcic (it was unattached and
floating before).  Attach pccard devices to pcic, one per slot
(although this may change to one per pcic).  pcic is now attached to
isa (to act as a bridge) and pccard is attached to pcic, cbb and
pc98ic (the last two are card bus bridge and the pc98ic version of
pcic, neither of which are in the tree yet).  Move pccard compat code
into pccard/pccard_compat.c.

THIS REQUIRES A CONFIG FILE CHANGE.  You must change your pcic/card
entries to be:
# PCCARD (PCMCIA) support
controller	pcic0	at isa?
controller	pcic1	at isa?
controller	card0

The old system was upside down and this corrects that problem.  It
will make it easier to add support for YENTA pccard/card bus bridges.

Much more cleanup needs to happen before newbus devices can have
pccard attachments.  My previous commit's comments were premature.
1999-10-15 17:29:21 +00:00
Warner Losh
53cdc67254 Make it easier to have completely new bus attachment points for pccard
devices.  There may still be problems with said drivers, if so please
let me know.

o Move attach-like functionality to the nbk attach compatibility code.
o Smarter probe code: for the compatibility code probe succeeds if
  strcmp succeeds, for noncompatibility you can do anything you like.
o Get rid of some compiler warnings introduced in last commit.
1999-10-15 03:10:13 +00:00
Warner Losh
58a49816c7 *** empty log message *** 1999-09-26 21:52:43 +00:00
Warner Losh
8fc2f800b0 Kill printf warnings. 1999-09-26 21:24:36 +00:00
Peter Wemm
c5cf380782 $Id$ -> $FreeBSD$ 1999-09-06 11:23:05 +00:00
Warner Losh
b99d6b5edc Kludge together support for the old pccard system with newbus. This
will allow newbus based drivers to have pccard attachments.  Also
start printing out probe messages for pccards stating the resources
used and regularize many of the pccard printfs.

Reviewed by: Peter Wemm.
1999-09-06 06:34:44 +00:00