Commit Graph

46 Commits

Author SHA1 Message Date
riastradh
82b8caba92 Kill some more extern struct cfdriver declarations.
Down with externs in .c!
2017-10-28 04:53:54 +00:00
pgoyette
916bdfa5d4 Modularize the ld driver and all of its attachments. Ensure that all
parents are capable of rescan (or otherwise provide a means of attaching
children post-initialization).
2016-09-27 03:33:32 +00:00
chs
cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
uebayasi
8184d5dc03 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.
2010-11-13 13:51:57 +00:00
christos
9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
sborrill
85b692fb65 Add support for >2TB arrays and implement raw I/O mode which is a
requirement for this.

N.B. Still to do - move dump on ld to 64-bit disk addresses
2008-10-02 08:21:57 +00:00
tsutsui
1f459d82b5 Replace device_lookup() with device_lookup_private() on getting softc
for future device_t/softc spilt.
2008-06-08 12:43:51 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger
7088512994 use aprint_*_dev and device_xname 2008-04-08 12:07:25 +00:00
briggs
83967b2fba Use AAC_PREALLOCATE_FIBS with the softc as a parameter to catch up with
revision 1.10 of aacvar.h.
2007-10-21 12:59:33 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
briggs
f82d990bc1 Bring in changes from FreeBSD...
* 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-06-05 04:04:13 +00:00
briggs
f5462cf43d Clear interrupt status at once instead of piecemeal.
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-26 18:10:46 +00:00
briggs
a21419937e Import code from FreeBSD to tell the controller how much physical RAM the
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-26 12:45:02 +00:00
briggs
4208391f45 Some changes from the FreeBSD driver:
* 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-05-24 15:07:47 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
thorpej
59c5bfcbfc LP54 -> LP64 in a comment. 2006-03-04 20:44:11 +00:00
chs
599510004a use %z when printing a sizeof. 2005-12-27 17:25:41 +00:00
jdolecek
8c602c3844 Add some casts to make this compile on amd64 (and perhaps other LP64
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-26 21:33:46 +00:00
jdolecek
9019b1d22c fix aac_print_fib() to compile with AAC_DEBUG; noncompilable "%16D" printf
format replaced by explicit hexadecimal dump of the first 32 bytes of fip->data
2005-11-26 21:29:48 +00:00
drochner
e6a178f21f kill a number of autoconf submatch functions which follow the
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
	then fail
else
	ask device match function

This is handled by config_stdsubmatch() now.
2005-08-25 22:33:18 +00:00
drochner
fa3cb84d62 replace the "locdesc_t" structure carrying the number of locators
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-08-25 18:35:38 +00:00
darcy
77a3cb4427 Fix another portability issue. Part of PR kern/30456. 2005-06-20 20:40:21 +00:00
darcy
67a10100f5 Fix some printf statements to make them more portable. Doesn't completely
fix PR kern/30456 but fixes part of it.
2005-06-20 11:37:47 +00:00
christos
f381db6045 - add missing const
- fix variable shadowing
- remove unneeded casts
2005-05-30 04:43:46 +00:00
darcy
3b06c2c797 Add to XXX comment for future reference. 2005-03-12 10:35:29 +00:00
briggs
802400546d * Remove aif_get_mailboxstatus() from the aac_interface structure. Replace
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-03-01 03:31:45 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
briggs
2847fb818d Be more verbose at attachment. Display kernel revision and add
the monitor revision and adapter serial number at a "verbose" level.
Add the total adapter RAM at "normal" level.
2005-02-15 12:29:33 +00:00
scw
36a24a9003 Cast away a couple of "assignment makes pointer from integer without a cast"
warnings.
2005-01-14 16:23:32 +00:00
drochner
96b589fc18 a round of autoconf cleanup:
-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-09-13 12:55:47 +00:00
thorpej
8b2ffcedfc Use ANSI function decls and more use of static. 2004-08-24 00:53:28 +00:00
christos
e4b3e03b4c Remove extraneous ; from OpenBSD. 2004-03-20 21:16:55 +00:00
ad
ae788c30d0 Mirror change made in FreeBSD, rev 1.39 of aac.c. May address PR 23574.
bzero out the sync command buffer when sending commands.  This was causing
problems when enumerating multiple arrays.
2003-12-09 20:12:14 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
thorpej
749715f6ee Use aprint_*(). 2003-01-31 00:26:25 +00:00
thorpej
72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
fvdl
a06b80d60e Actually, back out previous. Better have it not compile on LP64 to show
that it's broken for that case.
2002-11-25 20:29:14 +00:00
fvdl
2b98828aef Add some hideous casts to get this to compile on LP64. Doesn't look like
it has a chance of working, though.
2002-11-25 20:24:08 +00:00
thorpej
6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
lukem
06de426449 SIMPLEQ rototill:
- 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-06-01 23:50:52 +00:00
thorpej
96e504cc78 Fix a pasto in printf arguments which resulted in the aac kernel
version being mis-reported.
2002-05-31 17:36:29 +00:00
ad
77e08f053a Add a driver for Adaptec FSA RAID controllers, as often found in Dell
servers. Based on the FreeBSD/OpenBSD versions.
2002-04-26 02:05:07 +00:00