summaryrefslogtreecommitdiffstats
path: root/sys/dev/advansys
Commit message (Collapse)AuthorAgeFilesLines
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-298-10/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-052-6/+6
|
* Check for BIOS version 3.0 as well as 3.1.scottl2005-02-211-1/+1
| | | | Submitted by: Coverity Prevent analysis tool
* Fix a missing /*-obrien2005-02-141-1/+1
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-0616-20/+20
|
* Properly release allocated resources if adw(4) device fails to fully attach,rsm2004-12-061-0/+20
| | | | | | | | | | eg. if the firmware load fails. Shortish MFC timeout so this can be merged before the 4.11 freeze. PR: kern/34306 Submitted by: gibbs Approved by: gibbs, imp (mentor) MFC after: 5 days
* Add missing <sys/module.h> includesphk2004-05-302-0/+2
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-174-18/+17
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Make the extern for adv_mcode match the reality: it's u_int8_t, butphk2004-03-101-1/+1
| | | | probably unendiansafely used as u_int16_t.
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-022-4/+4
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-2410-20/+30
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-222-4/+4
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Mega busdma API commit.scottl2003-07-016-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* Merge common XPT_CALC_GEOMETRY functions into a single convenience function.njl2003-06-142-37/+2
| | | | | | | | | | | | | Devices below may experience a change in geometry. * Due to a bug, aic(4) never used extended geometry. Changes all drives >1G to now use extended translation. * sbp(4) drives exactly 1 GB in size now no longer use extended geometry. * umass(4) drives exactly 1 GB in size now no longer use extended geometry. For all other controllers in this commit, this should be a no-op. Looked over by: scottl
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though thescottl2003-05-272-4/+4
| | | | | | | | BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'. Approved by: re (bmah)
* I deserve a big pointy hat for having missed all those referencesmux2003-04-102-4/+4
| | | | to bus_dmasync_op_t in my last commit.
* Clean up argument comments for bus_dma_tag_create() calls.mdodd2003-03-296-133/+185
|
* Wrap the static endian functions to shutup GCC.obrien2003-02-241-0/+2
|
* Add adv_adj_endian_qdone_info() & adv_adj_scsiq_endian()obrien2003-02-231-0/+18
| | | | so this at least compiles on big-endian machines.
* Consolidate MIN/MAX macros into one place (param.h).alfred2003-02-022-4/+0
| | | | Submitted by: Hiten Pandya <hiten@unixdaemons.com>
* Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in themike2003-01-191-1/+1
| | | | | | | 'int nsegments' argument to bus_dma_tag_create(). ~0ul does not fit in an int on machines with 64 bit longs. Noticed by: alpha tinderbox
* Change BUS_SPACE_UNRESTRICTED (~0ul) to plain ~0 when used in thepeter2002-10-093-4/+4
| | | | | 'int nsegments' argument to bus_dma_tag_create(). ~0ul does not fit in an int.
* Be consistent about "static" functions: if the function is markedphk2002-09-281-1/+1
| | | | | | static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
* Restore I/O port resources to the condition before adv_isa_probe() isnyan2001-05-061-10/+17
| | | | | | called. Submitted by: yokota
* Use correct resource id for bus_release_resource().nyan2001-05-061-10/+10
|
* Turn on interrupt-entropy harvesting for all/any mass storage devicesmarkm2001-03-014-5/+6
| | | | | | | I could find. I have no doubt missed a couple. Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
* - Check if the ccb_infos in the softc is NULL before trying to free it injhb2001-02-082-2/+11
| | | | | | | | adv_free() as the ISA probe routine doesn't malloc() ccb_infos but does call adv_free(). - Release the ISA-only overrun DMA tags, bufs, and maps if the probe fails. Tested by: rwatson
* Remove unneeded <stddef.h> #includes.phk2000-10-291-2/+0
|
* Add the use of M_ZERO to some malloc calls.dwmalone2000-10-291-2/+1
| | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: gibbs
* Convert all users of fldoff() to offsetof(). fldoff() is badphk2000-10-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | because it only takes a struct tag which makes it impossible to use unions, typedefs etc. Define __offsetof() in <machine/ansi.h> Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h> Remove myriad of local offsetof() definitions. Remove includes of <stddef.h> in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API. Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001. Paritials reviews by: various. Significant brucifications by: bde
* Remove unneeded #include <machine/clock.h>phk2000-10-154-4/+0
|
* Fix typo (accessable --> accessible).alex2000-06-141-1/+1
| | | | | | PR: 18588 Submitted by: Anatoly Vorobey <mellon@pobox.com> Reviewed by: asmodai
* Unused include: #include "adw.h"peter2000-06-101-1/+0
|
* Use the correct register names, not the FreeBSD 2.2 compatability ones.peter2000-05-282-6/+6
|
* Back out the previous change to the queue(3) interface.jake2000-05-262-8/+8
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-232-8/+8
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Fixed return value of adv_attach function.nyan2000-05-231-17/+18
| | | | Submitted by: Oleg Sharoiko <os@rsu.ru>
* Hide annoying message under boot-verbose.phk2000-04-231-2/+3
| | | | | | | Fix Typo. Approved by: nyan Also: PR-18172
* Remove unneeded <sys/buf.h> includes.phk2000-04-181-1/+0
| | | | | Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
* - Release allocated resources on error.nyan2000-04-122-145/+164
| | | | | | Reported by YAMAMOTO Shigeru <shigeru@iij.ad.jp> - Clean up some code. - Set the value of rid variable to PCI_BASEADR0(== 0x10) (adv_pci.c).
* Newbusify adv driver.nyan2000-04-078-157/+166
| | | | Reviewed by: imp
* adv_pci.c:gibbs2000-03-025-99/+115
| | | | | | | | | | | | | | | | | | | adw_pci.c: Update comments describing supported chips/cards. adwcam.c: adwlib.c: adwlib.h: Handle more error return codes from the firmware. Break out the bus reset code into its own function. Usa a constant for the bus reset hold delay. Fix an interrupt race problem in adw_idle_cmd_send by incorporating the poll loop for command completion. Approved by: jkh@FreeBSDorg
* Fix indentation.gibbs2000-02-041-1/+1
| | | | Overlooked by: n_himba@FreeBSD.org but not bde@FreeBSD.org
* Unbreak LINT (missing curly brace).n_hibma2000-02-041-1/+1
| | | | Broken by: gibbs
* Add support for the AdvanSys ASC38C0800 Ultra2 chipset. Preliminarygibbs2000-02-037-1010/+2539
| | | | | | | support is also included for the ASC38C1600 Ultra160 chipset, but as firmware is not yet available for this chip, it is disabled. Approved by: jkh@FreeBSD.org
* Remove a spurious printf left in from debugging.gibbs2000-02-011-1/+0
| | | | PR: 16642
* Remove unneeded #include "eisa.h" and #if NEISA > 0peter2000-01-291-5/+0
|
* Remove unnecessary includes.nyan2000-01-171-2/+0
|
* Pre 4.0 tidy up.peter2000-01-141-1/+1
| | | | | | | | | | | | Collect together the components of several drivers and export eisa from the i386-only area (It's not, it's on some alphas too). The code hasn't been updated to work on the Alpha yet, but that can come later. Repository copies were done a while ago. Moving these now keeps them in consistant place across the 4.x series as the newbusification progresses. Submitted by: mdodd
* adv_pci.c:gibbs2000-01-146-434/+614
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update list of supported products. Adjust probe message to include the ASC3030. advansys.c: Fix a long standing bug in the error recovery strategy. In order to keep recovery simple, we freeze the SIMQ, stopping the XPT from submitting new requests. Unfortunately, we also will freeze the SIMQ if bus_dmamap_load blocks or we run out of controller resources. On cards with limited resources it was possible to freeze the SIM a second time and never unfreeze it. Now we more carefully track our exception state so we never freeze the SIMQ more than once. Don't rely on pointers fitting in a 32bit field stored in the per-transaction data structures on the card. Use an index to an array of transaction mapping structures instead. This should allow this driver to work on the Alpha. Deal with the ASC3030 which is almost idistinguishable from the ASC3050. Unfortunately the ASC3030 does not work at Ultra speeds, so if we can't find an eeprom, we must assume that ultra is disabled. The SIIG cards using the 3030 do not have eeproms. As a side effect, we now honor the ultra disable bit in the eeprom if it is present. Don't bother attempting to write corrected eeprom data back to the eeprom. We can function just fine if the data is corrupted and I'd rather not risk messing up the user's eeprom. Modify the interrupt handler to catch latched external bus rests. Dynamically determine the maximum number of S/G elements we can map at a single time. The nature of the firmware interface for these cards makes this value dependent on the number of "queues" the card can support. advlib.c: advlib.h: advmcode.c: advmcode.h: Synchronize with the latest firmware image released in the Linux Advansys driver.
OpenPOWER on IntegriCloud