summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/osiop.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* another handful of bcopy -> memcpy because there is no overlapderaadt2014-12-191-2/+2
|
* Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishianderaadt2014-07-131-2/+2
| | | | ok tedu
* a bit more ansi; ok teduderaadt2011-06-231-2/+2
|
* Prevent a few more NULL pointer dereferences in troublesome situations; frommiod2011-01-021-3/+8
| | | | NetBSD
* Reset acb->xs to NULL before scsi_done if option DIAGNOSTIC. There seem to bemiod2010-12-081-2/+5
| | | | | | one bad case of use-after-free after a hell lot of heavy I/O creeping in again in this driver. This doesn't fix it but will hopefully help me diagnose once it occurs again.
* Remove all adapter-specific 'struct scsi_device's. They are never used. Firstkrw2010-06-281-9/+1
| | | | | | | | step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
* implement iopools in osiop to get rid of another use of XS_NO_CCB.dlg2010-06-281-20/+37
| | | | | original diff corrected by miod@ tested by and ok miod@
* New scsi code seems to be stable. Pluck previously identifiedkrw2010-05-201-3/+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-5/+3
| | | | ok krw@
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-10/+9
| | | | | | | | | | | | | 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-2/+1
| | | | | | in the drivers just before calling scsi_done(). ok dlg@ beck@
* remove a bunch of unused Debugger()s.jasper2009-08-281-30/+1
| | | | ok krw@ miod@
* Make sure the scsi_xfer timeout is triggered while the command is still alive.miod2009-03-031-5/+11
| | | | | | | | | | With the current code, a fast command could complete between splx and the timeout being triggered, we'd then happily return COMPLETE, reuse the scsi_xfer, schedule the timeout again, causing a nice cycle in the timeout wheels. (I know, I know, I have to inspect all other scsi drivers now, but I'm really tired after spending three hours on this)
* Extend the scsi_adapter minphys() callback to take a struct scsi_link *miod2009-02-161-5/+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-3/+3
| | | | | | No functional changes. ok krw@ miod@
* 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-5/+1
| | | | | | commented out, remove it. Unifdef TFS while there. ok marco@ krw@
* Don't print SCSI ID, it's redundant now that scsibus(4) prints the samekettenis2008-05-271-3/+3
| | | | | | information. ok deraadt@
* Remove commented out NetBSD __KERNEL_RCSID macro usage.brad2008-05-131-4/+1
| | | | ok dlg@
* Take a bit more care to ensure that SCSI_POLL commands always returnkrw2007-11-051-4/+4
| | | | COMPLETE and never SUCCESSFULLY_QUEUED.
* More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...'.krw2007-10-011-4/+2
|
* Better recovery when osiop goes nuts and spitsmiod2007-06-201-2/+9
| | | | | | | osiop0: osiop_select while connected? in loops. Before returning from the interrupt handler, whack the chip. Unfortunately, this causes the few i/o which were queued to time out, but this is better than spinning and eventually panicing.
* Remove broken URLs.jsg2007-05-221-4/+1
| | | | | Fixes PRs 5482, 5483, 5484, 5486, 5487, 5488 Filed by casati@nortel.com
* give scsi controllers a real attach args to fill in when attaching scsibus.dlg2006-11-281-2/+6
| | | | ok miod@ marco@ deraadt@
* The first thing done when XXX_scsi_cmd() returns TRY_AGAIN_LATER iskrw2005-12-031-2/+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.
* Do not dare dereferencing NULL pointers if OSIOP_DEBUG.miod2005-11-211-4/+7
|
* In osiop_checkintr(), bail out early and do not claim the interrupt formiod2005-04-271-6/+16
| | | | | ``can't happen'' situations (which happen sometimes on mvme88k), rather than inadvertently dereference NULL pointers and panic.
* Gremlin crept in; found by drahn@miod2004-12-271-2/+2
|
* Use list and queue macros where applicable to make the code easier to read;miod2004-12-261-5/+5
| | | | no change in compiler assembly output.
* cleanup some whitespacesmickey2004-03-311-7/+6
|
* No need for ADEV_NODOORLOCK quirk anymore; krw@ okmiod2004-03-151-2/+1
|
* 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
* avaliable -> availablemiod2003-09-291-2/+2
|
* make sure Debugger() is called only inside _both_ DDB and OSIOP_DEBUGmickey2003-08-111-3/+3
|
* use bus_dmamap_load_raw() instead of bus_dmamap_load() where appropriate; krw@ okmickey2003-08-031-5/+5
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Put required delays between reading DSTAT and SSTAT0 registers. Add new oneskrw2003-05-191-4/+13
| | | | | | | | where required and modify existing ones to use a consistant delay(25). From NetBSD with minor mods. ok mickey@.
* make sure we always zero out ds (and get no trash from stack) and always warn about no acb where applicable; krw@ okmickey2003-05-061-3/+10
|
* count auto-sense reqs as well; krw@ okmickey2003-05-061-1/+2
|
* allow programming dma block bus transaction length on 710 and set to 8 words for hppa/osiop; krw@ okmickey2003-05-061-2/+2
|
* Fix index bounds checking in save data pointers logic.krw2003-04-121-7/+7
| | | | | | Fix an indent problem and an extra blank space. ok mickey@
* Delete a doubly redundant call to timeout_del() in osiop_timeout.krw2003-04-111-3/+1
| | | | | | | | | First, the only way to get there was if the timeout fired, in which case timeout_del() is a noop. Second, it will be called in osiop_scsidone() for every active command when osiop_reset() is called in osiop_timeout(). From mickey@
* Cleanup/make more consistant the various DEBUG flags and uses thereof.krw2003-04-091-35/+40
| | | | | | Eliminate a couple of unused debug defines and variables. ok mickey@
* Reduce default OSIOP_DEBUG output to a useful volume.krw2003-04-091-8/+10
| | | | From mickey@
* Fix diagnostic output to display data buffer actually being used.krw2003-04-081-4/+12
| | | | | | | | | | | Fix setting of data buffer length when doing auto request sense. Add a little general paranoia about setting data buffer length. Eliminate $ifdef'ed field in acb structure, leaving diagnostic code using it #ifdef'ed. Mostly suggested by and ok mickey@.
* Fix a lot of issues in osiop.krw2003-04-061-140/+149
| | | | | | | | | In particular fix dma memory handling and as a result request sense processing. Much input/advice/testing from Mickey. ok mickey@
* be consistant on Hz vs hzmickey2003-02-111-2/+2
|
* Real (although generic) negotiation results message during boot.krw2003-02-021-5/+39
|
* Merry Christmas Mickey!krw2003-01-081-0/+2000
First cut at osiop driver (LSI Logic/Symbios/NCR 53C710). For hppa only at the moment. Functional for the most part, but there are known problems: 1) SCSI_CHECK/REQUEST_SENSE not handled at all - simply returns a zero'ed scsi_sense_data buffer. As a result all osiop sc_link's are created with the ADEV_NODOORLOCK quirk to suppress PREVENT_ALLOW commands from being issued (and failing) during probe. 2) Sync negotiation (wide is not supported on this chip) needs to be validated due to some ominous comments in the source about being valid only for the 33Mhz Zeus board. 3) Probe message needs fixing/completion to issue useful info. See 2). 4) Timeout/hangs occur under heavy load, e.g. make builds. From NetBSD. ok mickey@