Home | History | Annotate | Download | only in ic
History log of /src/sys/dev/ic/uha.c
RevisionDateAuthorComments
 1.50  25-Sep-2022  thorpej Remove unnecessary include of <sys/malloc.h>.
 1.49  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.48  24-Apr-2021  thorpej branches: 1.48.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.47  11-Jul-2016  msaitoh branches: 1.47.34;
KNF. No functional change.
 1.46  27-Oct-2012  chs branches: 1.46.14;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.45  13-Nov-2010  uebayasi branches: 1.45.8; 1.45.18;
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.44  23-Nov-2009  rmind branches: 1.44.4;
Remove some unecessary includes sys/user.h header.
 1.43  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.42  28-Apr-2008  martin branches: 1.42.8; 1.42.14;
Remove clause 3 and 4 from TNF licenses
 1.41  08-Apr-2008  cegger branches: 1.41.2; 1.41.4;
use aprint_*_dev and device_xname
 1.40  19-Oct-2007  ad branches: 1.40.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.39  04-Mar-2007  christos branches: 1.39.2; 1.39.14; 1.39.16; 1.39.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.38  16-Nov-2006  christos branches: 1.38.4;
__unused removal on arguments; approved by core.
 1.37  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.36  11-Dec-2005  christos branches: 1.36.20; 1.36.22;
merge ktrace-lwp.
 1.35  21-Feb-2005  thorpej branches: 1.35.4;
Part 1 of a cleanup pass over the SCSI subsystem. The aim is to name
everything "scsi_*", since we really are talking about the SCSI command
set, ATAPI transport not withstanding. Improve the names of many structures,
and prepend "SCSI_" onto all SCSI command opcodes. Place items described
by the SCSI Primary Commands document into scsi_spc.h.
 1.34  04-Feb-2005  perry de-__P
 1.33  07-Dec-2004  thorpej branches: 1.33.2; 1.33.4;
Don't use "struct scsi_generic" in a hardware-defined structure. Instead,
use an array of 12 bytes. Check the incoming CDB to see that it will fit,
and print and error and fail the command if it won't.
 1.32  30-Oct-2003  simonb branches: 1.32.6;
Remove some assigned-to but otherwise unused variables.
 1.31  15-Nov-2001  lukem branches: 1.31.16;
don't need <sys/types.h> when including <sys/param.h>
 1.30  13-Nov-2001  lukem add/cleanup RCSID
 1.29  19-Jul-2001  thorpej Use BUS_DMA_READ and BUS_DMA_WRITE in some obvious places.
 1.28  07-Jul-2001  thorpej branches: 1.28.2;
bzero -> memset
 1.27  07-Jul-2001  thorpej bcopy -> memcpy
 1.26  25-Apr-2001  bouyer Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
(no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
 1.25  07-Mar-2001  thorpej Add BUS_DMA_STREAMING to data transfer maps.
 1.24  14-Nov-2000  thorpej branches: 1.24.2;
NBPG -> PAGE_SIZE
 1.23  12-Feb-2000  thorpej If we got an xfer from our backlog queue, don't allow sleeping; we're in
interrupt context.

XXX This is fixed properly in the thorpej_scsipi branch, but that won't
be ready for 1.5, I don't think.
 1.22  30-Sep-1999  thorpej branches: 1.22.2;
Update for SCSPI changes.
 1.21  09-Dec-1998  thorpej Update for changed scsipi_xfer struct.
 1.20  05-Dec-1998  mjacob Update HBAs to incorporate the new max_lun property.
 1.19  19-Nov-1998  thorpej Adapt to the new scsipi_adapter interface.
 1.18  10-Oct-1998  thorpej Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter. This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
 1.17  17-Aug-1998  mycroft Assign my copyrights to TNF.
 1.16  17-Feb-1998  thorpej - Perform all necessary bus_dmamap_sync() operations.
- Greatly simplify allocation and DMA mapping of the mailbox and ccbs.
- Be more robust against resource shortage errors, and report errors better.
 1.15  04-Feb-1998  thorpej Add offset and length parameters to bus_dmamap_sync(), used for specifiying
partial syncs of a DMA mapping.
 1.14  04-Feb-1998  thorpej Add dm_mapsize to bus_dmamap_t and rename BUS_DMAMEM_NOSYNC to
BUS_DMA_COHERENT.
 1.13  28-Jan-1998  thorpej Use offsetof() from libkern.h
 1.12  12-Jan-1998  thorpej Adjust for config changes.
 1.11  04-Nov-1997  thorpej Implement a simple queueing mechanism that makes these drivers much
more robust in resource shortage situations, basically identical to
code I added to the "ahc" driver some time ago.

Thanks to Brad Spencer for the testing help.
 1.10  28-Oct-1997  thorpej When creating mscps, be a little more informative about why we couldn't
should creation/initialization of a mscp fail. Also, don't panic in
these situations. Instead, simply return an error condition and allow
the caller to deal with it. It may be the case that we were able to
create one mscp what we can grab, and continue to hobble along.

Also, fix the mscp freelist fencepost error, similar to aha.c and bha.c
 1.9  27-Aug-1997  bouyer branches: 1.9.4;
Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.8  06-Jun-1997  thorpej branches: 1.8.2; 1.8.4;
Pull thorpej-bus-dma branch into mainline.
 1.7  29-Mar-1997  mycroft branches: 1.7.2;
Use a temporary data structure for holding probe information, rather than a
full softc.
 1.6  10-Dec-1996  thorpej Fill in sc_link.max_target
 1.5  15-Nov-1996  jonathan Fix front-ends of split uha driver to compile when DDB is not configured:
Propagate Debugger() macro from uha.c to uha_{eisa,isa}.c.
update file names accordingly.
 1.4  12-Nov-1996  mycroft Fix uha_{reset,init}_mscp() prototypes.
 1.3  13-Oct-1996  christos backout kprintf changes
 1.2  10-Oct-1996  christos - printf -> kprintf, sprintf -> ksprintf
- include <systm.h>
 1.1  31-Aug-1996  mycroft Split the UltraStor driver apart.
 1.7.2.2  17-May-1997  thorpej Update for bus_dmamem_alloc() changes.
 1.7.2.1  13-May-1997  thorpej Convert to use bus dma.
 1.8.4.1  27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.2.1  01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.9.4.2  04-Nov-1997  thorpej Pull up from trunk: add a queueing mechanism to make this much more
robust in resource shortage conditions.
 1.9.4.1  28-Oct-1997  thorpej Pull up from trunk: fix fencepost errors in mscp allocation and be
more verbose/robust when mscp allocation/initialization fails.
 1.22.2.8  12-Mar-2001  bouyer Sync with HEAD.
 1.22.2.7  22-Nov-2000  bouyer Sync with HEAD.
 1.22.2.6  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.22.2.5  01-Nov-1999  thorpej Fixup the SC_DEBUG() stuff for the new world order.
 1.22.2.4  26-Oct-1999  thorpej Update for:

Deal a little more gracefully with the fact that xfer mode parameters
are for the I_T Nexus, and make all xfer mode updates `async events'.
 1.22.2.3  20-Oct-1999  thorpej Eliminate sleeping from adapter routines.
 1.22.2.2  19-Oct-1999  thorpej Don't sleep waiting for a CCB; if we get to the CCB allocation phase, we're
guaranteed to have one.
 1.22.2.1  19-Oct-1999  thorpej Adapt to scsipi API changes.
 1.24.2.5  08-Jan-2002  nathanw Catch up to -current.
 1.24.2.4  14-Nov-2001  nathanw Catch up to -current.
 1.24.2.3  24-Aug-2001  nathanw Catch up with -current.
 1.24.2.2  21-Jun-2001  nathanw Catch up to -current.
 1.24.2.1  09-Apr-2001  nathanw Catch up with -current.
 1.28.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.28.2.1  03-Aug-2001  lukem update to -current
 1.31.16.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.31.16.5  04-Feb-2005  skrll Sync with HEAD.
 1.31.16.4  18-Dec-2004  skrll Sync with HEAD.
 1.31.16.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.16.2  18-Sep-2004  skrll Sync with HEAD.
 1.31.16.1  03-Aug-2004  skrll Sync with HEAD
 1.32.6.1  02-Apr-2005  he Pull up revision 1.33 (requested by thorpej in ticket #1022):
Don't use "struct scsi_generic" in a hardware-defined structure.
Instead, use an array of 12 bytes. Check the incoming CDB to see
that it will fit, and print and error and fail the command if it
won't.
 1.33.4.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.33.4.1  12-Feb-2005  yamt sync with head.
 1.33.2.1  29-Apr-2005  kent sync with -current
 1.35.4.3  27-Oct-2007  yamt sync with head.
 1.35.4.2  03-Sep-2007  yamt sync with head.
 1.35.4.1  30-Dec-2006  yamt sync with head.
 1.36.22.2  10-Dec-2006  yamt sync with head.
 1.36.22.1  22-Oct-2006  yamt sync with head
 1.36.20.1  18-Nov-2006  ad Sync with head.
 1.38.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.39.20.1  25-Oct-2007  bouyer Sync with HEAD.
 1.39.16.1  06-Nov-2007  matt sync with HEAD
 1.39.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.39.2.1  23-Oct-2007  ad Sync with head.
 1.40.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.41.4.3  11-Mar-2010  yamt sync with head
 1.41.4.2  04-May-2009  yamt sync with head.
 1.41.4.1  16-May-2008  yamt sync with head.
 1.41.2.1  18-May-2008  yamt sync with head.
 1.42.14.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.42.8.1  28-Apr-2009  skrll Sync with HEAD.
 1.44.4.1  05-Mar-2011  rmind sync with head
 1.45.18.2  03-Dec-2017  jdolecek update from HEAD
 1.45.18.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.45.8.1  30-Oct-2012  yamt sync with head
 1.46.14.1  05-Oct-2016  skrll Sync with HEAD
 1.47.34.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.48.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed