Home | History | Annotate | Download | only in isa
History log of /src/sys/dev/isa/if_le_isa.c
RevisionDateAuthorComments
 1.53  29-May-2022  rin Audit unload/unmap v.s. free against DMA buffer for sys/dev;
make sure that bus_dmamap_unload(9) [or bus_dmamap_destroy(9)] or
bus_dmamem_unmap(9) are preceding to freeing DMA buffer, if it is
loaded or mapped, respectively.

This is mandatory for some archs. See, e.g.:

http://www.nerv.org/netbsd/?q=id:20210511T013030Z.013443cc790088147e4beed43f53dedabeaf9312
http://www.nerv.org/netbsd/?q=id:20220511T172220Z.561179f0b6fcc5b9cd73e274f69d74e2ce9e4c93

For some drivers, resource leaks for error paths are fixed at
the same time.

XXX XXX XXX
Compile test only (at least one arch per driver).
 1.52  08-Dec-2021  andvar fix various typos in comments and log messages.
 1.51  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.50  24-Apr-2021  thorpej branches: 1.50.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.49  13-Nov-2010  uebayasi branches: 1.49.76;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.
 1.48  12-May-2009  cegger branches: 1.48.4;
struct device * -> device_t, no functional changes intended.
 1.47  28-Apr-2008  martin branches: 1.47.14;
Remove clause 3 and 4 from TNF licenses
 1.46  04-Apr-2008  tsutsui branches: 1.46.2; 1.46.4;
Split device_t/softc for le(4) and variants and misc cosmetic changes.
 1.45  19-Oct-2007  ad branches: 1.45.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.44  04-Mar-2007  christos branches: 1.44.2; 1.44.14; 1.44.16; 1.44.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.43  16-Nov-2006  christos branches: 1.43.4;
__unused removal on arguments; approved by core.
 1.42  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.41  24-Dec-2005  perry branches: 1.41.20; 1.41.22;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.40  11-Dec-2005  christos merge ktrace-lwp.
 1.39  30-May-2005  christos branches: 1.39.2;
- add const
- avoid variable shadowing.
 1.38  27-Feb-2005  perry nuke trailing whitespace
 1.37  04-Feb-2005  perry de-__P
 1.36  14-Sep-2004  drochner branches: 1.36.4; 1.36.6;
Separate the namespace for default (ie unspecified) locators used
by the isa.c bus driver and the "address/whatever not specified"
argument passed to leaf device drivers.
The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter
"ISA_UNKNOWN_XXX", defined in isavar.h.
This way we save a dependency of every ISA device driver on "locators.h".
 1.35  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.34  02-Oct-2002  thorpej branches: 1.34.6;
Fix sizeof and whitespace bug from the script I'm using to do the
CFATTACH_DECL conversion. (Grumble.)
 1.33  02-Oct-2002  thorpej Use CFATTACH_DECL().
 1.32  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.31  29-Jun-2002  rafal Allow this work work without a DRQ for PCNet parts mapped into ISA space
but which are connected to a local bus and do their own bus-mastering.
This has to be turned on via `flags 1' on the nele? device specification.
Gets one of my boxes working again with -current again.
 1.30  29-Jun-2002  rafal Pass bus_space_map() an address then a size, rather than size twice, so this
has a hope of working.
 1.29  07-Jan-2002  thorpej branches: 1.29.8; 1.29.10;
Overhaul of the ISA autoconfiguration code to support direct
configuration of devices logically attached to the ISA bus:

* Change the isa_attach_args to have arrays of io, mem, irq, drq
resources.
* Add a "pnpnames" and a linked list of "pnpcompatnames" to the
isa_attach_args. If either of these members are non-NULL,
direct configuration of the bus is being performed. Add an
ISA_DIRECT_CONFIG() macro to test for this.
* Drivers are not allowed to modify the isa_attach_args unless
direct configuration is not being performed and the probe fucntion
is returning success.
* Adapt device drivers -- currently, all driver probe routines return
"no match" if ISA_DIRECT_CONFIG() evaluates to true.
 1.28  13-Nov-2001  lukem add RCSID
 1.27  08-Jul-2001  thorpej branches: 1.27.2;
Remove unnecessary include files. From Onno van der Linden.
 1.26  30-May-2001  mrg use _KERNEL_OPT
 1.25  14-Nov-2000  thorpej branches: 1.25.2;
NBPG -> PAGE_SIZE
 1.24  28-Jun-2000  mrg remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.23  15-Aug-1998  mycroft branches: 1.23.12;
Assign my copyrights to TNF.
 1.22  21-Jul-1998  drochner adapt to LANCE driver split
 1.21  05-Jul-1998  jonathan defopt INET, NETATALK.
 1.20  25-Jun-1998  thorpej Don't panic if a DRQ is already allocated. Instead, just return EAGAIN
to indicate that the resource is unavailable.
 1.19  09-Jun-1998  thorpej Adjust for changes to the ISA DMA API.
 1.18  18-Apr-1998  drochner Fix botched DMA tag initialization.
 1.17  16-Apr-1998  drochner Make the ISA LANCE drivers work without BROKEN_INDIRECT_CONFIG.
DEPCA is now split out into a separate driver.
Because there can be only one attachment of a device to a bus, for
each card type a separate pseudo-bus was introduced which attaches to "isa"
and where "le" attaches to.
 1.16  04-Feb-1998  thorpej Add dm_mapsize to bus_dmamap_t and rename BUS_DMAMEM_NOSYNC to
BUS_DMA_COHERENT.
 1.15  20-Oct-1997  thorpej Don't panic if we fail to remap i/o or mem space in the attach function.
Instead, print a diagnostic and return. (Some drivers do this already.)

Also, normalize the diagnostic message, and fix some places where the
printfs were getting ugly.
 1.14  19-Oct-1997  thorpej Make sure the i/o and/or mem addresses aren't wildcarded (i.e. -1) before
using the address in a bus_space_map() call.
 1.13  10-Sep-1997  mycroft Oops. Fix a teensy error in the previous.
 1.12  10-Sep-1997  mycroft If we select a 32k window on the DEPCA, make sure to switch to the lower 32k
chunk.
 1.11  06-Jun-1997  thorpej branches: 1.11.4;
Pull thorpej-bus-dma branch into mainline.
 1.10  17-Mar-1997  thorpej branches: 1.10.2;
#include <net/if_media.h>
 1.9  15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.8  12-Feb-1997  thorpej Oops, pass the memory handle, not bus PA, to bus_space_unmap().
From Matthias Drochner <drochner@zelz28.zel.kfa-juelich.de>, in
PR #3216.
 1.7  05-Dec-1996  thorpej branches: 1.7.4;
Duh, make sure i/o tags and handles are initialized before actually
probing for the LANCE chip.
 1.6  02-Dec-1996  thorpej Convert to use <machine/bus.h>
 1.5  13-Oct-1996  christos backout kprintf changes
 1.4  10-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.3  30-Aug-1996  thorpej Add a missing "int" in a function declaration.
 1.2  12-May-1996  mycroft Use intr.h.
 1.1  07-May-1996  thorpej Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Break up ISA LANCE driver into ISA and PCI front-ends.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
 1.7.4.3  12-Mar-1997  is Merge in changes from The Trunk
 1.7.4.2  10-Mar-1997  is netinet/if_ether.h => netinet/if_inarp.h
 1.7.4.1  21-Feb-1997  is Transform to the new world order.
 1.10.2.3  25-May-1997  thorpej Use bus_space_set_region_1() as appropriate.
 1.10.2.2  17-May-1997  thorpej Update for bus_dmamem_alloc() changes.
 1.10.2.1  13-May-1997  thorpej Convert to use bus dma.
 1.11.4.1  16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.23.12.2  22-Nov-2000  bouyer Sync with HEAD.
 1.23.12.1  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.25.2.7  18-Oct-2002  nathanw Catch up to -current.
 1.25.2.6  01-Aug-2002  nathanw Catch up to -current.
 1.25.2.5  28-Feb-2002  nathanw Catch up to -current.
 1.25.2.4  11-Jan-2002  nathanw More catchup.
 1.25.2.3  14-Nov-2001  nathanw Catch up to -current.
 1.25.2.2  24-Aug-2001  nathanw Catch up with -current.
 1.25.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.27.2.3  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.27.2.2  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.27.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.29.10.2  29-Jun-2002  lukem Pull up revision 1.31 (requested by rafal in ticket #397):
Allow this work work without a DRQ for PCNet parts mapped into ISA space
but which are connected to a local bus and do their own bus-mastering.
This has to be turned on via `flags 1' on the nele? device specification.
Gets one of my boxes working again with -current again.
 1.29.10.1  29-Jun-2002  lukem Pull up revision 1.30 (requested by rafal in ticket #396):
Pass bus_space_map() an address then a size, rather than size twice, so this
has a hope of working.
 1.29.8.1  15-Jul-2002  gehenna catch up with -current.
 1.34.6.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.34.6.5  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.34.6.4  04-Feb-2005  skrll Sync with HEAD.
 1.34.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.34.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.34.6.1  03-Aug-2004  skrll Sync with HEAD
 1.36.6.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.36.6.1  12-Feb-2005  yamt sync with head.
 1.36.4.1  29-Apr-2005  kent sync with -current
 1.39.2.4  27-Oct-2007  yamt sync with head.
 1.39.2.3  03-Sep-2007  yamt sync with head.
 1.39.2.2  30-Dec-2006  yamt sync with head.
 1.39.2.1  21-Jun-2006  yamt sync with head.
 1.41.22.2  10-Dec-2006  yamt sync with head.
 1.41.22.1  22-Oct-2006  yamt sync with head
 1.41.20.1  18-Nov-2006  ad Sync with head.
 1.43.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.44.20.1  25-Oct-2007  bouyer Sync with HEAD.
 1.44.16.1  06-Nov-2007  matt sync with HEAD
 1.44.14.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.44.2.1  23-Oct-2007  ad Sync with head.
 1.45.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.46.4.2  16-May-2009  yamt sync with head
 1.46.4.1  16-May-2008  yamt sync with head.
 1.46.2.1  18-May-2008  yamt sync with head.
 1.47.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.48.4.1  05-Mar-2011  rmind sync with head
 1.49.76.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.50.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed