summaryrefslogtreecommitdiff
path: root/sys/dev/ic/aac.c
AgeCommit message (Collapse)Author
2021-08-07Merge thorpej-cfargs2.thorpej
2021-04-24Merge thorpej-cfargs branch:thorpej
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?).
2019-11-10in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAITchs
and remove code to handle failures that can no longer happen.
2017-10-28Kill some more extern struct cfdriver declarations.riastradh
Down with externs in .c!
2016-09-27Modularize the ld driver and all of its attachments. Ensure that allpgoyette
parents are capable of rescan (or otherwise provide a means of attaching children post-initialization).
2012-10-27split device_t/softc for all remaining drivers.chs
replace "struct device *" with "device_t". use device_xname(), device_unit(), etc.
2010-11-13Don't pull in the whole uvm(9) API to access only PAGE_SIZE anduebayasi
some other constants. These are provided by sys/param.h now.
2008-12-16replace bitmask_snprintf(9) with snprintb(3)christos
2008-10-02Add support for >2TB arrays and implement raw I/O mode which is asborrill
requirement for this. N.B. Still to do - move dump on ld to 64-bit disk addresses
2008-06-08Replace device_lookup() with device_lookup_private() on getting softctsutsui
for future device_t/softc spilt.
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2008-04-08use aprint_*_dev and device_xnamecegger
2007-10-21Use AAC_PREALLOCATE_FIBS with the softc as a parameter to catch up withbriggs
revision 1.10 of aacvar.h.
2007-10-19machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.had
2007-07-09Merge some of the less invasive changes from the vmlocking branch:ad
- kthread, callout, devsw API changes - select()/poll() improvements - miscellaneous MT safety improvements
2007-06-05Bring in changes from FreeBSD...briggs
* Allocate commands on-demand. * Update a bunch of constants and some structures. * Use __attribute__ ((__packed__)) instead of __packed to be consistent. * Support more commands for devices that can apparently handle them. * Support a "new comm. interface" present in more recent Adaptec firmware. This reduces the amount of PCI bus traffic in handling commands. * Support larger commands going to the adapter--if the adapter can support them. * Support 64-bit commands for archs where sizeof(bus_addr_t) > 4 and for adapters that advertise SGMAP64. * Handle the WINDOW4G option and NO4GB quirk by excluding 2G-4G window unless we have the WINDOW4G capability without the NO4GB quirk. * Ask the adapter more about its capabilities and try to use those if they seem sane. * Do our bus_dmamap_sync() inside dequeue_fib instead of following, since we have the information that we need there. * Provide access functions for some adapters that I haven't seen yet (MIPS-based "Rocket" adapters). Not yet used.
2007-05-26Clear interrupt status at once instead of piecemeal.briggs
Enable a few more bits in the I/O requested by ld and check for the fast response bit when reading back from the queue. Both changes come from reading the FreeBSD driver and testing on a Dell CERC SATA controller.
2007-05-26Import code from FreeBSD to tell the controller how much physical RAM thebriggs
system has. This has the (scary-because-we've-been-running-so-long- without-it) commit message (for the first version of the change): Tell the controller how much physical memory we have. Without this there was a chance that our DMA regions would collide with the memory window used by the cache on the controller. The result would be massive data corruption. This seemed to mainly affect systems with >2GB of memory.
2007-05-24Some changes from the FreeBSD driver:briggs
* Include definitions of adapter-initiated fibs. * Send aifs back to the adapter after we receive them. * Use indexes instead of pointers in 32-bit hardware registers. * If we get a message that there's a printf from the adapter, but we have a NUL in the first character of the printf string, change the NUL to a space.
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2006-11-16__unused removal on arguments; approved by core.christos
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2006-03-04LP54 -> LP64 in a comment.thorpej
2005-12-27use %z when printing a sizeof.chs
2005-11-26Add some casts to make this compile on amd64 (and perhaps other LP64jdolecek
architectures). Part of PR kern/30456. The binary object file on i386 confirmed to be exactly the same before and after the change.
2005-11-26fix aac_print_fib() to compile with AAC_DEBUG; noncompilable "%16D" printfjdolecek
format replaced by explicit hexadecimal dump of the first 32 bytes of fip->data
2005-08-25kill a number of autoconf submatch functions which follow thedrochner
standard scheme: if (<configured> != <wildcard> && <configured> != <real>) then fail else ask device match function This is handled by config_stdsubmatch() now.
2005-08-25replace the "locdesc_t" structure carrying the number of locatorsdrochner
explicitely by a plain integer array the length in now known to all relevant parties, so this avoids duplication of information, and we can allocate that thing in drivers without hacks
2005-06-20Fix another portability issue. Part of PR kern/30456.darcy
2005-06-20Fix some printf statements to make them more portable. Doesn't completelydarcy
fix PR kern/30456 but fixes part of it.
2005-05-30- add missing constchristos
- fix variable shadowing - remove unneeded casts
2005-03-12Add to XXX comment for future reference.darcy
2005-03-01* Remove aif_get_mailboxstatus() from the aac_interface structure. Replacebriggs
with aif_get_mailbox(). Make it return uint32_t instead of 'int'. * Add an AAC_GET_MAILBOX() macro and change AAC_GET_MAILBOXSTATUS() to use that. * Update the Dell PERC 2QC quirk code to use AAC_GET_MAILBOX instead of the StrongARM-specific code. While StrongARM access is correct for that card, it's a bad example of how to access the mailbox registers. * Add the GETINFO command and use it to get and display the card's supported options at a verbose level during attachment.
2005-02-27nuke trailing whitespaceperry
2005-02-15Be more verbose at attachment. Display kernel revision and addbriggs
the monitor revision and adapter serial number at a "verbose" level. Add the total adapter RAM at "normal" level.
2005-01-14Cast away a couple of "assignment makes pointer from integer without a cast"scw
warnings.
2004-09-13a round of autoconf cleanup:drochner
-convert submatch() style functions (passed to config_search() or config_found_sm()) to the locator passing variants -pass interface attributes in some cases -make submatch() functions look uniformly as far as possible -avoid macros which just hide cfdata members, and reduce dependencies on "locators.h"
2004-08-24Use ANSI function decls and more use of static.thorpej
2004-03-20Remove extraneous ; from OpenBSD.christos
2003-12-09Mirror change made in FreeBSD, rev 1.39 of aac.c. May address PR 23574.ad
bzero out the sync command buffer when sending commands. This was causing problems when enumerating multiple arrays.
2003-05-03DMA, not dma nor Dma.wiz
2003-01-31Use aprint_*().thorpej
2003-01-01Use aprint_normal() in cfprint routines.thorpej
2002-11-25Actually, back out previous. Better have it not compile on LP64 to showfvdl
that it's broken for that case.
2002-11-25Add some hideous casts to get this to compile on LP64. Doesn't look likefvdl
it has a chance of working, though.
2002-09-27Introduce a new routine, config_match(), which invokes thethorpej
cfattach->ca_match function in behalf of the caller. Use it rather than invoking cfattach->ca_match directly.
2002-06-01SIMPLEQ rototill:lukem
- 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
2002-05-31Fix a pasto in printf arguments which resulted in the aac kernelthorpej
version being mis-reported.
2002-04-26Add a driver for Adaptec FSA RAID controllers, as often found in Dellad
servers. Based on the FreeBSD/OpenBSD versions.