History log of /freebsd-10-stable/sys/dev/sn/if_sn_pccard.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 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

# 199414 17-Nov-2009 jhb

Use the bus_*() routines rather than bus_space_*() for register operations.


# 150106 13-Sep-2005 imp

Use new convenience function to read CIS rather than the older, harder to
use version.


# 149101 15-Aug-2005 imp

Some preliminary support for Megahertz XJEM and CCEM (same cards really)
combo cards.


# 147957 13-Jul-2005 imp

Comment out a few entries in the sn_pccard_products table until
support for them can really be added. Eliminate the check for network
card, because many of the cards in the commented out section are combo
cards and report themselves as either multifunction or modem. They
will be added back as I obtain hardware and test them more fully.


# 147872 10-Jul-2005 imp

Add a boatload of new device ids, gleaned from the pcmcia-cs-3.2.8
distribution. Add the appropriate devices to the man pages.

Obtained from: pcmcia-cs
Approved by: re (scottl)


# 147850 09-Jul-2005 scottl

Fix the build. The SMC_8020BT define doesn't exist yet.

Approved by: re (implicit)


# 147847 08-Jul-2005 imp

Noticed that NetBSD's sm driver has the PSION GOLDCARD listed, so list
that since I can't test it directly. The driver also lists the EM1144
as being supported, but in reality it isn't. The EM1144-T,
{XJ,CC}{3288,3336} have the SMC chips in them, but aren't conformant MFC
cards, so they need their own driver.

Also, it does little harm to list the 8020BT, so remove #if 0.

Approved by: re (scottl)


# 147797 06-Jul-2005 imp

Add support for Farallon EtherMAC PC Card.
Move ethernet MAC address setting into pccard attachment
Fix panic from IFP2ENADDR() use prior to if_alloc
Remove OLDCARD compat support. This should work still on oldcard, however.
sn_attach now requires that the resources be activated now, so adjust.

Approved by: re (scottl)


# 147580 24-Jun-2005 imp

Eliminate unused argument in PCMCIA_CARD macro.

Provide a backwards compatible way to have the extra macro by defining
PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that
want/need to have the same driver on 5 and 6 with pccard attachments.

Approved by: re (dwhite)


# 147256 10-Jun-2005 brooks

Stop embedding struct ifnet at the top of driver softcs. Instead the
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.

This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.

Other changes of note:
- Struct arpcom is no longer referenced in normal interface code.
Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
To enforce this ac_enaddr has been renamed to _ac_enaddr.
- The second argument to ether_ifattach is now always the mac address
from driver private storage rather than sometimes being ac_enaddr.

Reviewed by: sobomax, sam


# 140525 20-Jan-2005 imp

Only attach to network functions. I'm not aware of any multifunction
(pccard sense) sn based cards, but this won't hurt. The
pseudo-multifunction cards need a special driver anyway...


# 129879 30-May-2004 phk

Add missing <sys/module.h> includes


# 129798 28-May-2004 imp

Include required machine/bus.h


# 129764 27-May-2004 imp

Fix disordering of pccarddevs.h noticed by bde. Also remove a few
redundant includes and fix some of the include disordering.

Submitted by: bde


# 129740 25-May-2004 imp

Move to generating pccarddevs.h on the fly, both for the kernel and
the modules.

Also generate usbdevs.h automatically now, but a non-kernel file is
stopping that at the moment.


# 129046 08-May-2004 imp

It turns out that the module dependency on pccard is in error. Since
there's not dependencies on pccard symboles, such a dependency is not
necessary. This means that drivers that have multiple attachments can
not drag bogus devices into the kernel at load time.

We can't (yet) do this with pci and isa. Drivers written for them
actually do seem to have symbols that depend on these busses'
implementation code.

ndis not touched until other things can be tested.


# 121514 25-Oct-2003 imp

Convert to bus_space.
Make the pccard attachment work with NEWCARD
Start locking of the driver, but only the macros are defined right now

Tested on: Megahertz CC10BT/2
# (These cards are very popular on ebay these days, and run < $10 including
# shipping from some sellers).


# 119419 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


# 119227 21-Aug-2003 imp

DSP Solutions, Inc made the XJEM1144 and XJACK ethernet cards. Update
MEGAHERTZ2 to DSPSI.


# 113506 15-Apr-2003 mdodd

- Express hard dependencies on bus (pci, isa, pccard) and
network layer (ether).
- Don't abuse module names to facilitate ifconfig module loading;
such abuse isn't really needed. (And if we do need type information
associated with a module then we should make it explicit and not
use hacks.)


# 113315 10-Apr-2003 imp

Make sure that pp_name is non-null before setting the device
description. This allows us to rely entirely on the CIS entries if
necessary...


# 101531 08-Aug-2002 imp

Don't bogusly depend on pcic. pccard should be enough.

Noticed by: jhay
Forgotten about for two years by: imp


# 100426 21-Jul-2002 imp

Minor whitespace nits. remove #if 1 and #endif pair, but not code between.


# 86394 15-Nov-2001 imp

Migrate to PCMCIA_CARD() macros


# 86273 11-Nov-2001 imp

s/PCCARD_/PCMCIA_/g in NEWCARD device tables to enable easier NetBSD sharing


# 71323 21-Jan-2001 imp

Use PCCARD_CIS_xxx #defines for the table of oem ids. These usually
translate to all NULLs (as for all the ones in this commit).


# 69955 12-Dec-2000 imp

Add isa support:
o write isa driver routines.
o factor detach routine in sn_detach.


# 69151 25-Nov-2000 peter

Make sn_pccard_products[] static


# 67164 15-Oct-2000 phk

Remove unneeded #include <machine/clock.h>


# 66425 28-Sep-2000 imp

Implement sn_pccard_match. The match routines are the compromise
matching methods so that we can run the same driver on both NEWCARD
and OLDCARD. Also set the device description to the card that we
found, if any.

The sn driver should be ready when the NEWCARD catches up. There's a
config activation issue as well as a kernel thread issue to resolve
first.


# 66136 20-Sep-2000 imp

Remove 8 unnecessary includes from phk's script


# 66058 19-Sep-2000 imp

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.


# 63090 13-Jul-2000 archie

Make all Ethernet drivers attach using ether_ifattach() and detach using
ether_ifdetach().

The former consolidates the operations of if_attach(), ng_ether_attach(),
and bpfattach(). The latter consolidates the corresponding detach operations.

Reviewed by: julian, freebsd-net


# 56397 22-Jan-2000 hosokawa

Don't execute MAC address initialization for non-pccard sn devices.


# 56366 21-Jan-2000 hosokawa

Added support for hex-encoded MAC address of Megahertz X-Jack Ethernet Card

Reviewed by: Warner Losh <imp@village.org>


# 54994 22-Dec-1999 imp

Newbusify the driver.

Add support, kinda, for megaheartz xjack nic cards. This support
works well for one machine per ethernet segment because it hard codes
the MAC address. The pccardd in -current doesn't have support to
parse the ethernet address from the CIS in the funky way that the
megaheartz card does things (it includes it in the info tuple, as
ascii, which is non-standard). I'd rather kludge this for the moment
and work to read the CIS from the kernel rather than mess with
pccardd.

The isa attachment is untested. The pccard attachment is known to
work since I'm committing over it.

Card Obtained from: Chris D. Faulhaber <jedger@fxp.org>