Home | History | Annotate | Download | only in pcmcia
History log of /src/sys/dev/pcmcia/mhzc.c
RevisionDateAuthorComments
 1.56  10-May-2023  riastradh mhzc(4): Use config_detach_children.
 1.55  20-Jan-2023  msaitoh s/attemping/attempting/ in comment.
 1.54  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.53  24-Apr-2021  thorpej branches: 1.53.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.52  08-Dec-2018  thorpej branches: 1.52.14;
Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.51  22-Jun-2018  msaitoh branches: 1.51.2;
It's not required to include net/bpfdesc.h. Remove it.
 1.50  27-Oct-2012  chs branches: 1.50.30; 1.50.36;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.49  19-Jan-2010  pooka branches: 1.49.12; 1.49.22;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.48  06-Dec-2009  dyoung device_t/softc split.
 1.47  13-Nov-2009  dyoung Don't use com_activate(), it's gone away. Thanks to Andreas Wrede
for pointing out that these drivers still used com_activate().

Use device_private(). Join some lines.

Remove superfluous activation hooks.

Add child-detachment hooks (not used, yet).

TBD: device_t/softc split.
 1.46  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.45  12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.44  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.43  28-Apr-2008  martin branches: 1.43.8; 1.43.14;
Remove clause 3 and 4 from TNF licenses
 1.42  05-Apr-2008  cegger branches: 1.42.2; 1.42.4;
use aprint_*_dev and device_xname
 1.41  14-Mar-2008  cube Split device_t and softc for all com(4) devices (well, everything that
uses a com_softc backend). Use proper types and ansify where appropriate.
 1.40  19-Oct-2007  ad branches: 1.40.12; 1.40.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.39  16-Nov-2006  christos branches: 1.39.8; 1.39.22; 1.39.24; 1.39.28;
__unused removal on arguments; approved by core.
 1.38  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.37  07-Sep-2006  dogcow branches: 1.37.2; 1.37.4;
remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP.
 1.36  13-Jul-2006  gdamore Add an option COM_REGMAP to allow com(4) to use an array of register indices.
This allows us to convert aucom to just another com attachment, and cleanup
some code in the com_arbus.c.

Additionally, we use a common com_cleanup routine rather than having a
zillion copies of it in the attachment points.

This has been tested on a number architectures, and it has been shown to get
close to comparable performance when COM_REGMAP is defined, and comparable
when it is not defined.

Approved by core@. Fixes PR port-evbmips/32362.
 1.35  25-Mar-2006  thorpej branches: 1.35.4;
Use device_parent().
 1.34  11-Dec-2005  christos branches: 1.34.4; 1.34.6; 1.34.8; 1.34.10; 1.34.12;
merge ktrace-lwp.
 1.33  06-Oct-2005  jdc Change memoff to bus_size_t (like all other PCMCIA devices).
Now compiles on sparc too.
 1.32  30-May-2005  christos branches: 1.32.2;
- add const
- avoid variable shadow
- do proper UNCONST with XXXUNCONST
 1.31  27-Feb-2005  perry nuke trailing whitespace
 1.30  04-Feb-2005  perry de-__P
 1.29  12-Aug-2004  mycroft branches: 1.29.4; 1.29.6;
delay() -> tsleep()
 1.28  10-Aug-2004  mycroft Now that all the silly string printing is gone, move the location where we
print a newline so it doesn't have to be done in every driver.
 1.27  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.26  10-Aug-2004  mycroft More careful about cleaning up pointers.
 1.25  10-Aug-2004  mycroft Print diagnostics in only one place if intr_establish() or function_enable()
fails.

Also, be a little more careful about passing up error values, and consistently
clear our interrupt handler pointer.
 1.24  10-Aug-2004  mycroft Copyright maintenance.
 1.23  09-Aug-2004  mycroft Do the I/O mapping in the main attach routine.
Also, we don't need to bother cleaning up on a failed attach -- we keep enough
state for the detach routine to do it.
 1.22  09-Aug-2004  mycroft Make pcmcia_function_disable() primarily responsible for disabling the CCR
bits. pcmcia_intr_disestablish() continues to do this as a stopgap.
 1.21  09-Aug-2004  mycroft Do our io_map()s and intr_establish()es earlier.
 1.20  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.19  08-Aug-2004  mycroft AFAICT, there's no reason not to use PCMCIA_WIDTH_AUTO here.
 1.18  08-Aug-2004  mycroft Nuke an extra printf().
 1.17  07-Aug-2004  mycroft Remove extra space.
 1.16  07-Aug-2004  mycroft Clean up attach messages.
 1.15  06-Aug-2004  mycroft A few things:
* The DEPCM-XX cards don't need to be recognized by OUI or string -- they
work just fine with the IO-DATA PC-LAT/E attachment, and are probable OEM.
So, remove the DEPCM case.
* PCMCIA_STR_* elimination.
* The Megahertz EM3336 is not always an X-Jack device, so take the "XJ" out
of the product number.
 1.14  01-Jan-2003  thorpej branches: 1.14.2;
Use aprint_normal() in cfprint routines.
 1.13  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.12  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.11  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10  09-Jul-2002  uwe Print correct io addresses in sm attachment message (pasto).
 1.9  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.8  13-Nov-2001  lukem branches: 1.8.8;
add RCSIDs
 1.7  01-Jul-2001  uwe branches: 1.7.2;
Make mhzc_alloc_ethernet search the right address range.
Fixes: kern/11451.
Reviewed by: thorpej
 1.6  30-Jul-2000  briggs branches: 1.6.2;
Add MII support to smc91cxx driver. This is supported for the 91c100
and 91c100FD (FEAST) controllers. Existing controllers should continue
to work as they have. Added the card's memory to the probe message.
 1.5  05-Feb-2000  enami branches: 1.5.4;
Add detach support for ethernet portion.
 1.4  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.3  20-Oct-1999  enami Don't restrict the ethernet portion after modem portion. It prevents
us from using some config entries (com at 0x3xxx).
 1.2  28-Sep-1999  thorpej branches: 1.2.2; 1.2.4; 1.2.6;
Fix a slight buglet in `enable' magic odering, point out by
Chuck Cranor.
 1.1  28-Sep-1999  thorpej Add a driver for the Megahertz Ethernet/Modem combo cards, e.g. XJEM3336.
This supplies an attachment of the `sm' and `com' drivers.

Thanks to Chuck Cranor for sifting through the Linux smc91c92_cs.c driver
to find the magic sequence that brings the Ethernet portion of the card
on-line!
 1.2.6.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.4.1  15-Nov-1999  fvdl Sync with -current
 1.2.2.2  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.2.2.1  20-Oct-1999  thorpej Sync w/ trunk.
 1.5.4.1  06-Aug-2000  briggs Pullups approved by thorpej --
Add MII support to smc91cxx driver. This is supported for the 91c100
and 91c100FD (FEAST) controllers. Existing controllers should continue
to work as they have. Added the card's memory to the probe message.

Make sure that we do not call bus_space_*_multi_* with zero count.
Use bus_space_read/write_multi_stream_2 for FIFO instead of bsr/w_multi_2.
 1.6.2.6  03-Jan-2003  thorpej Sync with HEAD.
 1.6.2.5  18-Oct-2002  nathanw Catch up to -current.
 1.6.2.4  01-Aug-2002  nathanw Catch up to -current.
 1.6.2.3  20-Jun-2002  nathanw Catch up to -current.
 1.6.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.6.2.1  24-Aug-2001  nathanw Catch up with -current.
 1.7.2.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.2.3  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7.2.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.8.8.2  15-Jul-2002  gehenna catch up with -current.
 1.8.8.1  20-Jun-2002  gehenna catch up with -current.
 1.14.2.7  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.14.2.5  04-Feb-2005  skrll Sync with HEAD.
 1.14.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.14.2.2  25-Aug-2004  skrll Sync with HEAD.
 1.14.2.1  12-Aug-2004  skrll Sync with HEAD.
 1.29.6.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.29.6.1  12-Feb-2005  yamt sync with head.
 1.29.4.1  29-Apr-2005  kent sync with -current
 1.32.2.4  17-Mar-2008  yamt sync with head.
 1.32.2.3  27-Oct-2007  yamt sync with head.
 1.32.2.2  30-Dec-2006  yamt sync with head.
 1.32.2.1  21-Jun-2006  yamt sync with head.
 1.34.12.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.34.10.1  19-Apr-2006  elad sync with head.
 1.34.8.3  14-Sep-2006  yamt sync with head.
 1.34.8.2  11-Aug-2006  yamt sync with head
 1.34.8.1  01-Apr-2006  yamt sync with head.
 1.34.6.1  22-Apr-2006  simonb Sync with head.
 1.34.4.1  09-Sep-2006  rpaulo sync with head
 1.35.4.3  17-Jun-2006  gdamore Undo the undo. Restore COM_INIT_REGS.
 1.35.4.2  17-Jun-2006  gdamore Revert COM_INIT_REGS.
 1.35.4.1  15-Jun-2006  gdamore Adapt to new com framework.
 1.37.4.2  10-Dec-2006  yamt sync with head.
 1.37.4.1  22-Oct-2006  yamt sync with head
 1.37.2.1  18-Nov-2006  ad Sync with head.
 1.39.28.1  25-Oct-2007  bouyer Sync with HEAD.
 1.39.24.2  23-Mar-2008  matt sync with HEAD
 1.39.24.1  06-Nov-2007  matt sync with HEAD
 1.39.22.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.39.8.1  23-Oct-2007  ad Sync with head.
 1.40.16.2  02-Jun-2008  mjf Sync with HEAD.
 1.40.16.1  03-Apr-2008  mjf Sync with HEAD.
 1.40.12.1  24-Mar-2008  keiichi sync with head.
 1.42.4.4  11-Mar-2010  yamt sync with head
 1.42.4.3  16-May-2009  yamt sync with head
 1.42.4.2  04-May-2009  yamt sync with head.
 1.42.4.1  16-May-2008  yamt sync with head.
 1.42.2.1  18-May-2008  yamt sync with head.
 1.43.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.43.8.1  28-Apr-2009  skrll Sync with HEAD.
 1.49.22.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.49.12.1  30-Oct-2012  yamt sync with head
 1.50.36.2  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.50.36.1  25-Jun-2018  pgoyette Sync with HEAD
 1.50.30.1  26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.51.2.1  10-Jun-2019  christos Sync with HEAD
 1.52.14.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.53.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed