Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/aic7xxx_osm.c
RevisionDateAuthorComments
 1.43  01-Aug-2023  andvar fix various typos in comments.
 1.42  23-Feb-2022  andvar fix various typos in comments, mainly immediatly/immediately/,
as well shared and recently fixed typos in OpenBSD code by Jonathan Grey.
 1.41  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.40  24-Apr-2021  thorpej branches: 1.40.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.39  10-Nov-2019  chs branches: 1.39.10;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.38  30-Oct-2016  mlelstv branches: 1.38.16;
Error recovery stops normal queue processing but didn't resume it
when the recovery succeeded. Add the missing calls to scsipi_channel_thaw
similar to kern/41867.
 1.37  24-Feb-2010  dyoung branches: 1.37.20; 1.37.38; 1.37.42;
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.36  08-Jan-2010  dyoung branches: 1.36.2;
Expand PMF_FN_* macros.
 1.35  22-Sep-2009  tsutsui - wrap long lines
- remove unnecessary casts against void pointers
 1.34  12-Sep-2009  tsutsui Fix warnings by -Wpointer-sign, which is disabled by default. PR kern/33965
 1.33  02-Sep-2009  tsutsui Call ahc_shutdown() during system shutdown via pmf_device_register1(9),
as well as pre-pmf(9)'fied kernel did via shutdownhook_establish(9).
Tested on O2.

ahc_suspend() and ahc_resume() are still disabled due to lack of hardware.
Anyone who can test Cardbus APA-1480?
 1.32  02-Sep-2009  tsutsui Call pmf_device_register(9) in ahc_attahc() rather than ahc_pci_attach()
since pmf_device_deregister(9) is called from ahc_detach() so that
cardbus backend also gets proper pmf(9) calls.
PCI backend is tested on on O2, but cardbus is untested.
 1.31  16-May-2009  tsutsui Make ahc_detach() take struct ahc_softc * as well as ahc_attach()
and remove bogus casts around ahc_detach().

XXX: There is a pmf_device_deregister(9) call in ahc_detach()
XXX: while there is no pmf_device_register(9) in ahc_attach().
XXX: It looks more pmf(9) stuff is required for cardbus detach.
 1.30  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.29  07-May-2009  rjs Use device_private().
 1.28  05-May-2009  cegger device_t/softc split
 1.27  08-Apr-2008  cegger branches: 1.27.4; 1.27.18;
use aprint_*_dev and device_xname
 1.26  28-Jan-2008  macallan branches: 1.26.6;
get rid of the shutdown hook, add suspend and resume handlers instead
XXX: ahc_suspend panics here so suspend calls ahc_shutdown and resume does
nothing.
This fixes a hangup and subsequent panic which occured when the shutdown hooks
were called and /afterwards/ the sd suspend handler tried to flush caches
through an already shut down ahc.
 1.25  04-Mar-2007  christos branches: 1.25.16; 1.25.22;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.24  16-Nov-2006  christos branches: 1.24.4;
__unused removal on arguments; approved by core.
 1.23  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.22  10-Apr-2006  bouyer branches: 1.22.8; 1.22.10;
Don't use ppr_option uninitialized. Coverity ID 2504.
 1.21  14-Mar-2006  tsutsui branches: 1.21.2;
TAB/space cleanup.
 1.20  05-Dec-2005  bouyer branches: 1.20.4; 1.20.6; 1.20.8; 1.20.10;
Wrap debug printf in AHC_DEBUG. Pointed out by Izumi Tsutsui.
 1.19  28-Nov-2005  bouyer Don't call alloc_scb() (which can call bus_dmamem_alloc/map) from
ADAPTER_REQ_RUN_XFER context (which can be interrupt context), defer this
to the ADAPTER_REQ_GROW_RESOURCES callback.
Fix a panic in uvm reported by John R. Shannon on port-xen; patch tested on
ahc by me and on ahd by John.
 1.18  10-Sep-2005  tsutsui branches: 1.18.6;
Replace a magic number with proper macro.
 1.17  30-May-2005  christos branches: 1.17.2;
- add missing const
- fix variable shadowing
- remove unneeded casts
 1.16  27-Feb-2005  perry branches: 1.16.2;
nuke trailing whitespace
 1.15  21-Apr-2004  itojun branches: 1.15.4; 1.15.6;
avoid unbounded sprintf(), use snprintf()
 1.14  02-Nov-2003  wiz branches: 1.14.2; 1.14.4; 1.14.6;
Fix some typos. From Tom Cosgrove via jmc@openbsd.
 1.13  30-Oct-2003  simonb Remove some assigned-to but otherwise unused variables.
 1.12  01-Oct-2003  fvdl Reenable negotiation by default for discovery commands, until I figure out
what the issue is.
 1.11  02-Sep-2003  fvdl * Make the ahc and ahd probes more alike.
* Remove some redundant code.
* ahd: Don't initiate negotiation for a discovery xs when the negotiation goal
is set. Just looking at the auto_negotiate mask is enough, and it can
cause an endless loop if the request gets requeued (happens with a
of a PPR negotiation, which ends with a busfree).
 1.10  14-Jul-2003  lukem add missing __KERNEL_RCSID()
 1.9  19-Jun-2003  bouyer branches: 1.9.2;
Make sure we pass the current state of the driver to scsipi_async_event(),
not the request from the mid-layer.
Fix kern/21893 from Anthony Mallet.
 1.8  01-May-2003  fvdl Don't reference channel_b if it's not a twin channel adapter.
From MINOURA Makoto.
 1.7  21-Apr-2003  fvdl Reset channel(s) in ahc_attach, rather than at first access.
 1.6  21-Apr-2003  fvdl Set/report DT a bit more correctly.
 1.5  20-Apr-2003  fvdl Pick the right channel in the reset ioctl.
 1.4  20-Apr-2003  fvdl Resurrect change from previous ahc driver version: reset channel (unless
configured not to in the BIOS) on first access.
 1.3  20-Apr-2003  fvdl Delay ahc_free until after shutdown hook disestablish.
 1.2  19-Apr-2003  fvdl NetBSD RCS Ids.
 1.1  19-Apr-2003  fvdl Newer adaptec 7xxx driver. Written by Justin Gibbs for FreeBSD. Ported to
NetBSD by Pascal Renauld at Network Storage Solutions, Inc.
Some modifications by me.
 1.9.2.6  11-Dec-2005  christos Sync with head.
 1.9.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.9.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1  03-Aug-2004  skrll Sync with HEAD
 1.14.6.1  16-Dec-2005  jmc Pullup rev 1.19-1.20 (requested by bouyer in ticket #10177)

Don't call alloc_scb() (which can call bus_dmamem_alloc/map) from
ADAPTER_REQ_RUN_XFER context (which can be interrupt context), defer this
to the ADAPTER_REQ_GROW_RESOURCES callback. Fixes a panic in uvm.
 1.14.4.1  16-Dec-2005  jmc Pullup rev 1.19-1.20 (requested by bouyer in ticket #10177)

Don't call alloc_scb() (which can call bus_dmamem_alloc/map) from
ADAPTER_REQ_RUN_XFER context (which can be interrupt context), defer this
to the ADAPTER_REQ_GROW_RESOURCES callback. Fixes a panic in uvm.
 1.14.2.1  16-Dec-2005  jmc Pullup rev 1.19-1.20 (requested by bouyer in ticket #10177)

Don't call alloc_scb() (which can call bus_dmamem_alloc/map) from
ADAPTER_REQ_RUN_XFER context (which can be interrupt context), defer this
to the ADAPTER_REQ_GROW_RESOURCES callback. Fixes a panic in uvm.
 1.15.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.15.4.1  29-Apr-2005  kent sync with -current
 1.16.2.2  07-Dec-2005  tron Pull up following revision(s) (requested by bouyer in ticket #1033):
sys/dev/ic/aic7xxx_osm.c: revision 1.20
sys/dev/ic/aic79xx_osm.c: revision 1.14
Wrap debug printf in AHC_DEBUG. Pointed out by Izumi Tsutsui.
 1.16.2.1  29-Nov-2005  tron Pull up following revision(s) (requested by bouyer in ticket #1014):
sys/dev/ic/aic7xxx.c: revision 1.117
sys/dev/ic/aic79xxvar.h: revision 1.20
sys/dev/ic/aic79xx_osm.c: revision 1.13
sys/dev/ic/aic7xxx_inline.h: revision 1.7
sys/dev/ic/aic79xx.c: revision 1.32
sys/dev/ic/aic7xxx_osm.c: revision 1.19
sys/dev/ic/aic7xxxvar.h: revision 1.50
Don't call alloc_scb() (which can call bus_dmamem_alloc/map) from
ADAPTER_REQ_RUN_XFER context (which can be interrupt context), defer this
to the ADAPTER_REQ_GROW_RESOURCES callback.
Fix a panic in uvm reported by John R. Shannon on port-xen; patch tested on
ahc by me and on ahd by John.
 1.17.2.4  04-Feb-2008  yamt sync with head.
 1.17.2.3  03-Sep-2007  yamt sync with head.
 1.17.2.2  30-Dec-2006  yamt sync with head.
 1.17.2.1  21-Jun-2006  yamt sync with head.
 1.18.6.1  29-Nov-2005  yamt sync with head.
 1.20.10.1  19-Apr-2006  elad sync with head.
 1.20.8.2  11-Apr-2006  yamt sync with head
 1.20.8.1  01-Apr-2006  yamt sync with head.
 1.20.6.1  22-Apr-2006  simonb Sync with head.
 1.20.4.1  09-Sep-2006  rpaulo sync with head
 1.21.2.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.22.10.2  10-Dec-2006  yamt sync with head.
 1.22.10.1  22-Oct-2006  yamt sync with head
 1.22.8.1  18-Nov-2006  ad Sync with head.
 1.24.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.25.22.1  18-Feb-2008  mjf Sync with HEAD.
 1.25.16.1  23-Mar-2008  matt sync with HEAD
 1.26.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.27.18.2  23-Jul-2009  jym Sync with HEAD.
 1.27.18.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.27.4.3  11-Mar-2010  yamt sync with head
 1.27.4.2  16-Sep-2009  yamt sync with head
 1.27.4.1  16-May-2009  yamt sync with head
 1.36.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.37.42.1  04-Nov-2016  pgoyette Sync with HEAD
 1.37.38.1  05-Dec-2016  skrll Sync with HEAD
 1.37.20.1  03-Dec-2017  jdolecek update from HEAD
 1.38.16.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.39.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.40.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed