Home | History | Annotate | Download | only in pcmcia
History log of /src/sys/dev/pcmcia/xirc.c
RevisionDateAuthorComments
 1.39  10-May-2023  riastradh xirc(4): Use config_detach_children.
 1.38  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.37  24-Apr-2021  thorpej branches: 1.37.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.36  05-Oct-2019  mrg branches: 1.36.10;
add missing break.

(this code is fun. it has switch inside switch, and both switches
have two cases, one with an identifier and one with a magic number.)
 1.35  08-Dec-2018  thorpej Clean up initialization of com_regs structure, in preparation for
some additional changers.
 1.34  22-Jun-2018  msaitoh branches: 1.34.2;
It's not required to include net/bpfdesc.h. Remove it.
 1.33  14-Feb-2012  drochner branches: 1.33.40; 1.33.46;
fix incomplete device_t/softc split which led to crash on attachment,
closes PR kern/45874 by Hauke Fath
approved by releng
 1.32  19-Jan-2010  pooka branches: 1.32.12; 1.32.16;
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.31  06-Dec-2009  dyoung device_t/softc split.
 1.30  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.29  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.28  12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.27  14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.26  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.25  28-Jul-2008  drochner branches: 1.25.2; 1.25.8;
add missing device_private(), fixes crash in interrupt handler
 1.24  28-Apr-2008  martin branches: 1.24.2; 1.24.4; 1.24.6;
Remove clause 3 and 4 from TNF licenses
 1.23  05-Apr-2008  cegger branches: 1.23.2; 1.23.4;
use aprint_*_dev and device_xname
 1.22  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.21  19-Oct-2007  ad branches: 1.21.12; 1.21.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.20  16-Nov-2006  christos branches: 1.20.8; 1.20.22; 1.20.24; 1.20.28;
__unused removal on arguments; approved by core.
 1.19  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.18  07-Sep-2006  dogcow branches: 1.18.2; 1.18.4;
remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP.
 1.17  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.16  25-Mar-2006  thorpej branches: 1.16.4;
Use device_parent().
 1.15  11-Dec-2005  christos branches: 1.15.4; 1.15.6; 1.15.8; 1.15.10; 1.15.12;
merge ktrace-lwp.
 1.14  30-May-2005  christos branches: 1.14.2;
- add const
- avoid variable shadow
- do proper UNCONST with XXXUNCONST
 1.13  27-Feb-2005  perry nuke trailing whitespace
 1.12  04-Feb-2005  perry de-__P
 1.11  10-Aug-2004  mycroft branches: 1.11.2; 1.11.6; 1.11.8;
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.10  10-Aug-2004  mycroft More careful about cleaning up pointers.
 1.9  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.8  09-Aug-2004  mycroft Minor change.
 1.7  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.6  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.5  09-Aug-2004  mycroft Do our io_map()s and intr_establish()es earlier.
 1.4  09-Aug-2004  mycroft Add some code to deal with the interrupt mask register on early CEM cards.
Doesn't seem to work yet, but it's marginal progress.
 1.3  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.2  08-Aug-2004  mycroft * Some rearrangement of where the power control hooks are called.
* Don't splnet() in xi_init() -- the callers do that.
* Don't do the enable call in xi_init() -- it should be done only in a process
context so it can sleep.
* Call xi_start() at the end of xi_init() to restart output.
* If the interface is already up, we only need to call xi_set_address() to
change state on SIOCSIFFLAGS.
 1.1  08-Aug-2004  mycroft Split "xi" into a "xirc" frontend (similar to mhzc; it attaches two child
devices) and a "xi" backend.

My CE2 and CEM2 cards are now probed correctly. However, there are still
some problems with one model of the CE2, and the CEM2 doesn't seem to get
any modem interrupts.

While I'm at it, fix several bugs:

* The tuple scan for the MAC address was broken in multiple ways.
* xi_intr() did not deal well with a shared interrupt.
* We were setting the wrong page number to look at the receive status. (How
did this work???)
* Remove the xi_full_reset() from xi_reset(). Move the parts of
xi_full_reset() needed to undo the effect of xi_stop() into xi_init(). This
allows a stop/init pair to DTRT, and much quicker, as used by various
ioctl()s.
* Set the TRS register before reading the TSO register, as the Linux driver
does. While I'm at it, fix the name.
* Fix numerous problems with xi_set_address(). "Where do I begin?" There's a
chance that multicast works now, but I haven't tested it.
* Explicitly clear the MSR register, and also force SELECT_MII to 0 if we
didn't find any PHYs.
* Clean up some cruft that appears to be bogus.

Probably needs more work, but it's a start.
 1.11.8.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.11.8.1  12-Feb-2005  yamt sync with head.
 1.11.6.1  29-Apr-2005  kent sync with -current
 1.11.2.7  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.11.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.11.2.5  04-Feb-2005  skrll Sync with HEAD.
 1.11.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.11.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.11.2.2  12-Aug-2004  skrll Sync with HEAD.
 1.11.2.1  10-Aug-2004  skrll file xirc.c was added on branch ktrace-lwp on 2004-08-12 11:42:05 +0000
 1.14.2.4  17-Mar-2008  yamt sync with head.
 1.14.2.3  27-Oct-2007  yamt sync with head.
 1.14.2.2  30-Dec-2006  yamt sync with head.
 1.14.2.1  21-Jun-2006  yamt sync with head.
 1.15.12.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.15.10.1  19-Apr-2006  elad sync with head.
 1.15.8.3  14-Sep-2006  yamt sync with head.
 1.15.8.2  11-Aug-2006  yamt sync with head
 1.15.8.1  01-Apr-2006  yamt sync with head.
 1.15.6.1  22-Apr-2006  simonb Sync with head.
 1.15.4.1  09-Sep-2006  rpaulo sync with head
 1.16.4.3  17-Jun-2006  gdamore Undo the undo. Restore COM_INIT_REGS.
 1.16.4.2  17-Jun-2006  gdamore Revert COM_INIT_REGS.
 1.16.4.1  15-Jun-2006  gdamore Adapt to new com framework.
 1.18.4.2  10-Dec-2006  yamt sync with head.
 1.18.4.1  22-Oct-2006  yamt sync with head
 1.18.2.1  18-Nov-2006  ad Sync with head.
 1.20.28.1  25-Oct-2007  bouyer Sync with HEAD.
 1.20.24.2  23-Mar-2008  matt sync with HEAD
 1.20.24.1  06-Nov-2007  matt sync with HEAD
 1.20.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.20.8.1  23-Oct-2007  ad Sync with head.
 1.21.16.3  28-Sep-2008  mjf Sync with HEAD.
 1.21.16.2  02-Jun-2008  mjf Sync with HEAD.
 1.21.16.1  03-Apr-2008  mjf Sync with HEAD.
 1.21.12.1  24-Mar-2008  keiichi sync with head.
 1.23.4.4  11-Mar-2010  yamt sync with head
 1.23.4.3  16-May-2009  yamt sync with head
 1.23.4.2  04-May-2009  yamt sync with head.
 1.23.4.1  16-May-2008  yamt sync with head.
 1.23.2.1  18-May-2008  yamt sync with head.
 1.24.6.1  19-Oct-2008  haad Sync with HEAD.
 1.24.4.1  31-Jul-2008  simonb Sync with head.
 1.24.2.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.25.8.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.25.2.1  28-Apr-2009  skrll Sync with HEAD.
 1.32.16.1  18-Feb-2012  mrg merge to -current.
 1.32.12.1  17-Apr-2012  yamt sync with head
 1.33.46.2  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.33.46.1  25-Jun-2018  pgoyette Sync with HEAD
 1.33.40.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.34.2.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.34.2.1  10-Jun-2019  christos Sync with HEAD
 1.36.10.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.37.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed