summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/adw.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'krw2020-09-221-4/+4
| | | | | | | | | | | | member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*' from cmd. Take the address of cmd as required by the various casts. No intentional functional change. luna88k test by aoyama@, sparc64 test by jmatthew@ Identification of 2009's last *cmd use and ok jmatthew@
* The only thing worse than trailing whitespace is leading spaces instead of tabs.krw2020-08-081-30/+30
|
* Move remaining scsi bus initialization info from "prototype scsi link"krw2020-07-201-5/+5
| | | | | | | fields to struct scsibus_attach_args. Nuke the struct scsi_link * (saa_sc_link) in scaibus_attach_args. Explicitly initialize each field in scsibus_attach_args variables.
* Move the adapter related items (luns, adapter, adapter_target,krw2020-07-191-5/+6
| | | | | | | adapter_buswidth, adapter_softc) from struct scsi_link to struct scsibus_attach_args. Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
* Access adapter softc via link->bus->sb_adapter_softc.krw2020-07-161-4/+4
| | | | | | | | In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth' via sb_adapter_buswidth. Removes last post-config uses of the copies of bus related information in scsi_link.
* Expunge some Captain Obvious comments, tweak whitespace a bit, move a debugkrw2020-07-111-4/+1
| | | | statement. All to make upcoming diff(s) smaller and easier to read.
* No need to bzero()/memset() 'struct scsibus_attach_args' variableskrw2020-06-271-2/+1
| | | | immediately before initializing the only field in the struct.
* Variables 'nowait' amd 'flags' should have died in 2008 with r1.36'skrw2020-03-101-10/+3
| | | | | | | removal of internal queuing of scsi_xfer's. Put them out of their misery. Nuke an obsolete comment in passing. CID 1453357.
* Trailing whitespace.krw2020-02-181-17/+17
|
* *_minphys() functions that cap i/o sizes at a value larger than thekrw2020-02-151-12/+2
| | | | | | | | | | | | | | | value minphys() uses (MAXPHYS) are pointless since minphys() is always called after the *_minphys() function. MAXPHYS (64 * 1024) == 16 * 4096. 4096 is the smallest PAGE_SIZE we have. So a *_minphys() function that caps the i/o size at N * PAGE_SIZE where N is > 16 is just wasting cycles. Nuke adv_minphys (40 * PAGE_SIZE), adw_minphys (254 * PAGE_SIZE), ahc_minphys (128 * PAGE_SIZE), ahd_minphys (128 * PAGE_SIZE), ami_minphys (26 * PAGE_SIZE), cac_minphys (65535 (!!!) * 512), iha_minphsy (32 * PAGE_SIZE), trm_minphys (31 * PAGE_SIZE), twe_minphys (62 * PAGE_SIZE). uha_minphys (32 * PAGE_SIZE),
* Nuke softc field 'sc_adapter" and just point sc_link's at shiney newkrw2020-02-071-8/+6
| | | | 'adw_switch' like all the cool kids do.
* Shuffle some names around to make reading the code less headachekrw2020-01-261-2/+2
| | | | | | | | inducing. Rename scsi_adapter member 'scsi_minphys' to 'dev_minphys' to reflect what it is supposed to do. Use consistent naming convention (<dev>_minphys) for the actual device functions. No functional change.
* Drivers that implement their own *minphys() don't need to call thekrw2020-01-251-2/+1
| | | | | | | system minphys(). scsi_minphys() will do that and cd/sd/st will call scsi_minphys(). ok jmatthew@ as part of larger diff
* If you use sys/param.h, you don't need sys/types.hderaadt2017-09-081-2/+1
|
* Partially revert previous mallocarray conversions that containdhill2017-04-111-2/+2
| | | | | | | | | constants. The consensus is that if both operands are constant, we don't need mallocarray. Reminded by tedu@ ok deraadt@
* Convert some malloc(9) to mallocarray(9)dhill2017-04-091-2/+2
| | | | ok deraadt@
* 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
|