summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/adw.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* ansify and de'register some prototypesdhill2012-01-111-58/+22
| | | | ok miod@
* Do not use NULL in integer comparisons. No functional change.miod2011-04-071-2/+2
| | | | ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
* iopoolification. Tested on my Advansys ASP-3940U2W. Various eyeskrw2010-10-031-58/+26
| | | | including miod@, oga@, dlg@, matthew@.
* No "\n" needed at the end of panic() strings.krw2010-08-071-2/+2
| | | | | | | Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
* Remove all adapter-specific 'struct scsi_device's. They are never used. Firstkrw2010-06-281-12/+1
| | | | | | | | step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
* xs->cmd[n] doesn't mean the n'th byte, because xs->cmd is a structkrw2010-06-261-6/+4
| | | | | | | | *scsi_generic. Change xs->cmd[0] references in sii.c to xs->cmd->opcode and do (caddr_t) arithmetic when copying chunks into the adw adapter struct. Found by Matthew Dempsky, diff tweaked and tested by me.
* New scsi code seems to be stable. Pluck previously identifiedkrw2010-05-201-5/+1
| | | | | | | low-hanging splbio/splx pairs that are no longer needed and see if this reveals any hidden scsi flaws. ok dlg@
* BUS_DMA_ZERO instead of alloc, map, bzero.oga2010-05-191-4/+2
| | | | ok krw@
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-7/+8
| | | | | | | | | | | | | void. Use XS_NO_CCB error in the scsi command (xs) to report the NO_CCB condition. Eliminates all SUCCESSFULLY_QUEUED and COMPLETE confusion and untangles the midlayer from the adapter a bit more. Eyes and some fixes by miod@ There may be some compile issues on little used (i.e. I don't have any) drivers but the change is mechanical and thus easy to remedy. ok dlg@
* Set ITSDONE in scsi_done() and zap trivial instances of setting itkrw2010-01-101-4/+1
| | | | | | in the drivers just before calling scsi_done(). ok dlg@ beck@
* Missing scsi_done() in some error path returning COMPLETE; ok dlg@miod2009-09-041-1/+11
|
* remove more unneeded Debugger() calls from dev/jasper2009-08-291-7/+2
| | | | | agreed by deraadt@ ok jsing@
* Extend the scsi_adapter minphys() callback to take a struct scsi_link *miod2009-02-161-4/+3
| | | | | | as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
* Replace timeout_add(msecs * hz / 1000) with timeout_add_msec(msecs).grange2009-01-211-4/+4
| | | | | | No functional changes. ok krw@ miod@
* Stop maintaining internal queues of received scsi_xfer structures.krw2008-11-261-119/+3
| | | | | We can now just push unwanted ones back up into the SCSI layer with NO_CCB like other drivers.
* Return NO_CCB instead of TRY_AGAIN_LATER when ccb's run out.krw2008-11-241-2/+2
| | | | "I'm all for it." marco@ "Yeah" deraadt@
* SCSI_DATA_UIO is never used. Code which checks for it is either dead ormiod2008-09-121-15/+5
| | | | | | commented out, remove it. Unifdef TFS while there. ok marco@ krw@
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-261-8/+1
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* More scsi_done() at SPLBIO. Wrap more interrupt function calls whilekrw2007-11-051-1/+4
| | | | polling in splbio/splx.
* give scsi controllers a real attach args to fill in when attaching scsibus.dlg2006-11-281-3/+7
| | | | ok miod@ marco@ deraadt@
* The first thing done when XXX_scsi_cmd() returns TRY_AGAIN_LATER iskrw2005-12-031-4/+1
| | | | | | | | to set xs->error to XS_BUSY. So it is pointless and misleading to set xs->error to XS_TIMEOUT, XS_DRIVER_STUFFUP or XS_BUSY just before returning TRY_AGAIN_LATER. No functional change.
* Use list and queue macros where applicable to make the code easier to read;miod2004-12-261-11/+11
| | | | no change in compiler assembly output.
* remove uvm_extern.hbrad2004-01-091-3/+1
| | | | | | tested on alpha, i386, powerpc, sparc64, m68k. ok miod@
* typos from Tom Cosgrove;jmc2003-10-211-3/+3
| | | | | | | | Tom: I did not commit a couple of your changes. i did not include some punctuation fixes (full stops, etc.) mnemorable -> mnemonic: i decided memorable was probably better instrunctions -> instruction: i kept the plural
* First round of __P removal in sysmillert2002-03-141-21/+21
|
* Remove local defines for SCSI status codes and use those nowkrw2001-11-111-11/+11
| | | | defined in scsi_all.h.
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-2/+2
| | | | (Look ma, I might have broken the tree)
* Switch everything to the new bus_dmamap_sync API.art2001-11-051-3/+3
| | | | | Most work by Wilbern Cobb <vedge@csoft.org> with some fixes from me, mickey@ and drahn@.
* Correct some pryntf() usage: get the correct number of arguments in themiod2001-09-211-3/+3
| | | | correct order.
* Prepare for transition to 5-parameter bus_dmamap_sync() by creating andkrw2001-08-261-7/+9
| | | | | | | | | | using *_bus_dmamap_sync() defines that are defined appropriately depending on __HAS_NEW_BUS_DMAMAP_SYNC. Most of the code changes are simple reversions to the original NetBSD code. Slip in a siop_script_sync() instead of a manually done code section.
* Eliminate use of static functions in line with normal OpenBSDkrw2001-07-111-43/+43
| | | | | | | | preferences. Having more debugging info available during fixup of this driver to work on powerpc can't hurt either! Change adwminphys() to adw_minphys() to make consistant with all other function names in adw.c.
* allocate memory w/ NOWAIT during autoconf time and check for NULL returnmickey2001-05-161-2/+5
|
* No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)ho2001-05-161-8/+4
|
* Update the adw driver to use the latest version of firmware (3.3f).krw2001-04-111-2/+2
| | | | Move the microcode files to dev/microcode/adw/*.
* Typo police:krw2001-02-221-7/+7
| | | | | | | | Replace last ADV/ASC/Adv, etc. uses with ADW/Adw as appropriate. Delete comments about non-existant structure members, correct references to existing structure members to use correct structure names or typedefs.
* Tone down the verbosity level slightly on the adw driver, printkrw2001-02-201-64/+40
| | | | | | | | negotiation results on one line, during boot polling only, in same format as now used in siop. Move one check for probe INQUIRY commands to poll loop rather than checking every good I/O twice.
* Initialize xs->stimeout, even when pollingkrw2001-01-221-4/+4
|
* Use xs->stimeout instead of adding a struct timeout to ccbkrw2001-01-151-9/+10
|
* This update should cause the adw driver to:krw2000-12-081-129/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - actually check the returned scsi_status value and act accordingly instead of ALWAYS returning XS_NOERROR - always return the scsi status value in xs->status for completed requests - no longer reference ccb->xs and ccb->dmamap_xfer if an 'unallocated' ccb is encountered - immediately remove the ccb adw_isr_callback is working on from the pending list, leaving it in limbo until it is put on the free list just before any return - 'freeze' a target only when a scsi_status indicating it is busy is encountered, and 'thaw' a target whenever a bus reset is done or a request completes - check done_status, host_status and scsi_status in that order as is done in the linux driver and was done here until very recently, which seems cleaner to me. But opinions may vary. The only behaviour change that should result is that done_status of QD_NO_STATUS no longer causes a check of host_status values, but is an error causing a XS_DRIVER_STUFFUP - produce a more general error message with actual values for host_status, scsi_status and done_status values, with references to adw(4) for more details on the error where appropriate (man page update coming) - take what seems like appropriate action for all known host_status, scsi_status and done_status values with more use of XS_RESET where appropriate - use adw_reset_bus() instead of AdwResetSCSIBus() in adw_async_callback() so pending requests are requeued and devices left unfrozen when this happens - print an error message with the code # when adw_async_callback is called with an unknown code.
* This fixes a problem that caused DMA errors from shortly beforekrw2000-11-101-2/+2
| | | | | | | | | | | | | | | | | | | 2.7 through the released 2.8. As NetBSD describes the problem: DMA failure still arise when AdvanSys U[2]W host adapters are used in conjunction with Intel 82443BX Host Bridge/Controller (rev. 0x03). With a correct sg_cnt, scatter/gather lists with >1 element no longer reference random(?) memory. Now the mystery is why this didn't cause more problems on other chipsets. Installs of 2.7 and 2.8 to a drive on an adw bus now work even if the motherboard uses the 82443BX. So many problems from one character ...
* Reseting -> Resettingkrw2000-10-151-3/+3
|
* Remove #ifdef/#endif around various bits of INQUIRY responsekrw2000-09-061-5/+1
| | | | | | | | information. Left over from old attempt to fit adw with U3W on floppyxx.fs instead of floppyBxx.fs. Puts 'sdx at ...' msgs back at the start of their own lines so the drives can be found during (I)nstall or (U)pgrade!
* sync to NetBSD:krw2000-07-221-3/+4
| | | | | | | | | | | | | | | | | - remove #include <vm/vm_param.h> and #include <vm/pmap.h> as they are already included with #include <vm/vm.h> - more Adv -> Adw, ADV -> ADW adjustments & other minor formatting corrections plus: - put 'Carrier Ready failure!' warning message inside #ifdef ADW_DEBUG/#endif as it appears under heavy load but is nothing but a reminder the card was too busy to notice a 'tickle' from the driver.
* Sync adw files with (almost) latest NetBSD versions:krw2000-06-291-240/+396
| | | | | | | | | | | | | | | | | | | adw.c synched with v1.23 (from v1.14) adw.h v1.9 ( v1.5 ) adwlib.c v1.17 ( v1.7 ) adwlib.h v1.13 ( v1.7 ) adwmcode.c v1.5 ( v1.2 ) adwmcode.h v1.5 ( v1.2 ) microcode for cards is updated to latest version, loss of carrier problems are solved in a more robust manner than before, lots of code cleanup. first support for upcoming U3W cards added, as a result of which the driver is now too large for RAMDISK and has been moved to RAMDISKB. Most of the work done by dante@ NetBSD.
* add $ tagkrw2000-04-291-0/+1
|
* adw_intr should only claim adw interrupts. Two typos.krw2000-04-021-3/+5
|
* If we got an xfer from our backlog queue, don't allow sleeping; we're inmillert2000-02-191-9/+15
| | | | interrupt context. thorpej@netbsd.org
* support new u2w cards; dante@mclink.it, merged by kwesterback@home.comderaadt2000-02-051-188/+446
|