summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/aic7xxx_openbsd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Nuke some forward-only struct's and functions and functions therebykrw2017-12-121-21/+1
| | | | | | made empty. Found by new ctfconv(1) feature and validated by clang. ok mpi@
* Move to iopool. No voluntary testers after several years of requests so nowkrw2016-08-171-22/+53
| | | | everybody gets to test!
* Nuke a bunch of leading and trailing whitespace so I don't go blindkrw2015-07-171-10/+10
| | | | reading this code. No intentional functional change.
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-2/+2
| | | | after discussions with beck deraadt kettenis.
* if the hardware is too busy or its queues are too full, return XS_BUSY,dlg2014-01-171-6/+2
| | | | | | not XS_NO_CCB. discussed with krw@ who agrees
* Backout a bunch of my SCSI commits from c2k11. At least one of thesematthew2011-07-171-6/+2
| | | | | | is causing problems when trying to boot sparc64 from an isp(4). Verified to fix the sparc64/isp(4) regression by krw@; ok deraadt@
* Call bzero(&saa, sizeof(saa)) each time we use saa to attachmatthew2011-07-051-2/+5
| | | | | | | | something. Doesn't matter right now because scsibus_attach_args only has one field and it's mandatory, but I'm planning to move some more fields from scsi_link to scsibus_attach_args+scsibus_softc. ok dlg@
* Use the SDEV_2NDBUS flag like isp(4) instead of the currentmatthew2011-07-041-1/+2
| | | | | | | | | scsi_link::scsibus hack to determine which channel the link is associated with. "looks sane" dlg@, but haven't found any testers yet; committing so further SCSI refactorings can go in. dlg@ or I will back out or fix if anything breaks.
* Remove all adapter-specific 'struct scsi_device's. They are never used. Firstkrw2010-06-281-11/+1
| | | | | | | | step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
* dont drop out of handling a command if ITSDONE is set. return a betterdlg2010-06-021-21/+8
| | | | | | | | | | | error to the midlayer if something screws up. scrub the code slightly while here. this plus src/sys/scsi/scsi_base.c r1.174 seems to fix problems henning has had with tape drives plugged into ahc. tested by and ok henning@
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-21/+23
| | | | | | | | | | | | | 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@
* Remove horrible hack in ahc/ahd that made some commands retrykrw2010-01-201-11/+3
| | | | | | | | | | | endlessly. Use the shiny new XS_NO_CCB instead to retry commands that can't start. Neither dlg@ nor I can figure out why 4.6 and earlier worked. Problem noted, debugged with and fix tested by Jeff Ross and his new external enclosure. Thanks! ok dlg@
* Set ITSDONE in scsi_done() and zap trivial instances of setting itkrw2010-01-101-3/+1
| | | | | | in the drivers just before calling scsi_done(). ok dlg@ beck@
* Bring last drivers fully into the NO_CCB world by replacingkrw2009-11-221-2/+2
| | | | | | | | | | | TRY_AGAIN_LATER uses with equivalent NO_CCB. Eliminates confusion between the two as was always intended. buf I/O's that can't be started get pushed back onto the front of the queue and retried. Others get sent back to originator as failures. No more epi-cycle looping inside the SCSI midlayer hoping the problem goes away. Various testers, no objection from miod@ as vs(4) was tested by nick@.
* 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-2/+2
| | | | | | No functional changes. ok krw@ miod@
* dontqueue is set but never used. garbage collect it.krw2008-11-251-5/+1
|
* 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@
* Remove commented out NetBSD __KERNEL_RCSID macro usage.brad2008-05-131-4/+1
| | | | ok dlg@
* Put scsi_done() invocations inside existing splbio/splx pairs to makekrw2007-10-201-4/+3
| | | | damned sure scsi_done is invoked at splbio. Noted by deraadt@.
* The obvious bzero/memset -> M_ZERO changes.krw2007-09-071-3/+2
|
* Since ahc_controller_info()'s definition is inside #ifndef DEBUG, putkrw2007-08-041-2/+4
| | | | | it's declaration and only use inside #ifndef DEBUG too. Lets DEBUG kernel compile again. Non-DEBUG kernel still compiles too.
* Eliminate unused inline functions and replace ahc_lock() whichkrw2007-05-021-19/+19
| | | | | | | resolves to s = splbio() and ahc_unlock() which resolves to splx(s) with splbio/splx calls. ok marco@ dlg@
* give scsi controllers a real attach args to fill in when attaching scsibus.dlg2006-11-281-7/+15
| | | | ok miod@ marco@ deraadt@
* All CAM_* values stored in xs->error must be 'interpreted' bykrw2006-03-041-2/+2
| | | | | | | | | | | | | | ah[cd]_done() into XS_* values understood by the SCSI code before returning xs to the tender mercies of the SCSI code. So if we bail out without calling ah[cd]_done(), because the request cdb length is excessive, don't use ah[cd]_set_transaction() to put CAM_REQ_INVALID into xs->error, just jam in XS_DRIVER_STUFFUP as ah[cd]_done() would have. If CAM_REQ_INVALID escapes it will be interpreted as XS_SHORT_SENSE as far as I can tell. This code path should never be trod so the net effect should be minimal.
* Strip out fancy timeout code that attempts to mimic FreeBSD's threadkrw2005-12-281-280/+22
| | | | | | | | | | | | | | | | | based timeout handling. Use the simple timeout == bus reset model instead. Also move verbose debug output inside #ifdef/#endif. Fixes pulling out a raidctl disk causing a crash noted by kurt@. Rebuilding the raid still problematic. Reduces but does not eliminate crashes with 'smartctl -d scsi -a /dev/rcd0c' seen by Sigfried H?versen. Should only impact timeout handling. No change to normal processing. Thanks to kurt@ and Sigfied for testing. ok marco@
* It is invalid to scsi_done(xs) and then return TRY_AGAIN_LATER.krw2005-11-021-8/+6
| | | | | | | | | | | | | | | scsi_done() can release the scsi_request xs and TRY_AGAIN_LATER will refer to it and submit it for re-execution. This was being done only if bus_dmamap_load() failed. Ensure the controller resources are freed before returning TRY_AGAIN_LATER, since new resources will be allocated when the command is executed again. Don't bother setting xs->error before returning TRY_AGAIN_LATER as the code returned to sets xs->error to XS_BUSY. ok marco@
* Fix crashes during probe by ensuring that SCSI_IS_SCSIBUS_B() returnskrw2005-02-121-13/+1
| | | | | | | | | false until scsi bus b is initialized. Set TWIN_CHNLB bit that is used elsewhere. Missed chunk from last code sync. Problem found and fixes tested on HP Proliant ML310 by Valov Oleg.
* Don't call ahc_setup_data() after calling ahc_execute_scb() since thekrw2005-01-121-3/+3
| | | | | | scb may have been freed or made active. Only affects XS_RESET case. More correctly mirrors FreeBSD code. Already done to aic79xx_openbsd.c in r1.16.
* fix conflicting types for ahc_send_async().kevlo2005-01-081-2/+2
| | | | ok krw@
* Don't allow an infinite number of SCSI bus resets per i/o.krw2004-12-281-1/+2
| | | | ok marco@.
* Shuffle defines around so that ahc and ahd use the aic_ names thatkrw2004-10-241-7/+7
| | | | | | | | | | come with the freebsd sources, rather than duplicating those names in the ahd_ and ahc_ namespaces. Big reduction in delta to freebsd sources, which reduces noise when updating the code. No .o differences found on i386. ok marco@.
* timedout is not an english word, complaint from theo, ok marcohenning2004-09-241-2/+2
|
* Fix issue with auto request sense handling for both ahc and ahd.krw2004-08-131-1/+2
| | | | | | Restore hppa functionality, add sgi functionality for ahc. ok deraadt@, plus marco@, mickey@, pefo@ for various bits.
* Fold in relevant bits of the most recent two updates fromkrw2004-08-011-12/+3
| | | | | | | | | | | | | gibbs@freebsd. Large commit messages detailing all changes can be read at revisions 1.97 and 1.100 of aic7xxx.c: www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/aic7xxx/aic7xxx.c Tested by marco, nate and pefo. Fixed broken system for nate. ok marco@
* Do *not* set scsi_link flags to SCSIDEBUG_LEVEL for every ahc device.krw2004-01-241-2/+1
| | | | | | | | Let scsi_probedev() set the flags based on scsidebug_targets and scsidebug_luns when a device scsi link is created. Elminates indisciminate flood of debug info for ahc scsi buses and solves mystery of why ahc devices produced info when other devices were silent.
* Major stability improvement. Fix a variety of systems and problemskrw2004-01-171-37/+53
| | | | | | | | | by dealing with various error conditions. Testing by Marco Peereboom, Olivier Cherrier, Alex Holst, Daniel Lucq, deraadt@, beck@ and others. ok deraadt@.
* Fix SC_DEBUG() call so ahc compiles with SCSIDEBUG.krw2004-01-171-2/+2
|
* Fix crash reported in pr/3630. Poll all scsi requests that have SCSI_POLL set.krw2004-01-071-3/+8
| | | | ok miod@ tdeval@.
* Reduce ahc verbosity. Put chip details inside an if (bootverbose) {}krw2004-01-051-3/+5
| | | | | | | block. Put irq on first ahc line after 'rev 0xYY', rather than a separate line. ok deraadt@.
* Give i/o's requeued as a result of aborts, timeouts, etc. a status ofkrw2003-12-281-19/+6
| | | | | | | | | | | | | | | | XS_RESET rather than XS_NOERROR. This prevents unfinished i/o's from being treated as successfully completed ones. Don't bother setting SCB_REQUEUE in scb->flags since the scb is immediately thrown away. Make setting TAG_ENB a little more correct by doing it somewhere both the initial scb setup and subsequent tag resets have access to. Fix a typo. ok miod "I'm not an authoritative person on SCSI issues... though I'm learning!" @.
* Sync ahc with NetBSD, which was in turn updated from FreeBSD by Pascalkrw2003-12-241-1114/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renauld of Network Storage Solutions, Inc. Many fixes, wider device support. In particular, the notorious 'Target 0' problem seems to be fixed. Does *not* include any updates to isa or eisa code beyond what was necessary to compile. Known issues: 1) Tagged Queuing is probably not optimal. 2) PPR negotiation may not be fully functional. 3) No support yet for freezing devices or channels. 4) The mechanism for preventing 'A' and 'B' channel confusion during probe can fail if scsibus > 254 found. 5) Requeuing I/O's not working. A workaround will be committed almost immediately. At the moment timeouts, SCSI message rejects, aborting SCB's and trying to freeze a device may cause incomplete i/o's to be reported as complete. 6) Verbosity and probe messages need work. 7) Last disk on bus seems to go through an extra re-negotiation. 8) >16 devices on an adapter will trigger the usual problems of total openings exceeding available SCB's under heavy load. Tested by deraadt@, beck@, miod@, naddy@, drahn@, marc@ amoung others. ok deraadt@.
* typos from Tom Cosgrove;jmc2003-10-211-5/+5
| | | | | | | | 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
* more dmamp_sync()s; krw@ okmickey2003-09-291-99/+125
|
* strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.ho2003-04-271-3/+3
|
* Endian fixes for ahc driver. These are a no-op for i386. Now works on macppc.drahn2003-03-211-9/+4
| | | | ok millert@ miod@ krw@
* spellingderaadt2003-01-051-3/+3
|
* Share interrupts nicely. Add tag type.smurph2002-09-061-11/+19
|
* attempt to make ahc smaller. change PCI interrupt handler.smurph2002-07-051-65/+142
|
* Ensure scb is setup correctly. Add debugging info.smurph2002-07-011-4/+4
|