summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/aac.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace local *_copy_internal_data() with scsi_copy_internal_data().krw2020-10-151-23/+4
|
* Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'krw2020-09-221-12/+12
| | | | | | | | | | | | 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@
* Replace '32' with SID_SCSI2_ALEN (a.k.a. 31) when building emulated INQUIRYkrw2020-09-051-2/+2
| | | | | responses. This is what the SCSI specifications say is the correct value and already used in several cases.
* Replace '.response_format = 2' with '.response_format = SID_SCSI2_RESPONSE'.krw2020-09-031-2/+2
|
* When building emulated INQUIRY results use the SCSI_REV_* #define's tokrw2020-09-021-2/+2
| | | | initialize the 'version' field. Not numbers.
* Rename [READ|WRITE]_BIG to [READ|WRITE]_10. Rename struct scsi_rw_big tokrw2020-09-011-9/+9
| | | | | | struct scsi_rw_10. ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
* Neither is saa.ssa.pool the same as saa.saa_pool.krw2020-07-201-2/+2
|
* Move remaining scsi bus initialization info from "prototype scsi link"krw2020-07-201-5/+6
| | | | | | | 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-2/+1
| | | | statement. All to make upcoming diff(s) smaller and easier to read.
* Nuke trailing whitespace.krw2020-06-271-12/+12
|
* No need to bzero()/memset() 'struct scsibus_attach_args' variableskrw2020-06-271-2/+1
| | | | immediately before initializing the only field in the struct.
* kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)cheloha2020-06-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | time_second(9) and time_uptime(9) are widely used in the kernel to quickly get the system UTC or system uptime as a time_t. However, time_t is 64-bit everywhere, so it is not generally safe to use them on 32-bit platforms: you have a split-read problem if your hardware cannot perform atomic 64-bit reads. This patch replaces time_second(9) with gettime(9), a safer successor interface, throughout the kernel. Similarly, time_uptime(9) is replaced with getuptime(9). There is a performance cost on 32-bit platforms in exchange for eliminating the split-read problem: instead of two register reads you now have a lockless read loop to pull the values from the timehands. This is really not *too* bad in the grand scheme of things, but compared to what we were doing before it is several times slower. There is no performance cost on 64-bit (__LP64__) platforms. With input from visa@, dlg@, and tedu@. Several bugs squashed by visa@. ok kettenis@
* Use SDEV_NO_ADAPTER_TARGET instead of the value that is beingkrw2020-06-241-2/+2
| | | | | | | aassigned to adapter_buswidth to indicate the adapter is not a target on the bus. ok dlg@ as part of a larger diff.
* Let aac(4) compile again by #include'ing selinfo.h.krw2020-02-181-1/+2
|
* IPS_MAXFER, NAX_XFER, and MAXBSIZE are all definedkrw2020-02-141-3/+3
| | | | | | as (64 * 1024). Reduce confusion by using MAXPHYS (a.k.a. (64 * 1024)) as other drivers do.
* Nuke unnecessary abstraction 'scsi_minphys()' which just callskrw2020-02-051-2/+2
| | | | | | 'minphys()'. Just use & check for NULL instead, since 'minphys()' is always called on the code path ([cd|sd|st]minphys) that calls physio().
* Use a consistant idiom/format when declaring scsi_adapter structureskrw2020-01-231-6/+2
| | | | | | | | | | | in drivers. Terse one liners, NULLs instead of 0's, explicitly specify all members, etc. Nuke #ifdef notyet blocks related to the scsi_adapter in aic. No intentional functional change. ok tedu@
* aac(4): tsleep(9) -> tsleep_nsec(9)cheloha2020-01-151-5/+5
| | | | | | | | | | | | | | | | | aac_wait_command() is odd. It accepts a timeout in terms of ticks and passes that to tsleep(9), but the comment above the function suggests the timeout itself is ignored. On top of that, aac_wait_command()'s only caller passes in a value from scsi_xfer.timeout, which is a count of milliseconds. krw@ says not to worry too much about these discrepencies and to just do what makes the most sense given the state of the code. So, change aac_wait_command()'s "timeout" to "msecs" and pass that tsleep_nsec(9). ok krw@
* fix build errors of aac(4)jan2019-10-051-3/+3
|
* 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@
* A pile of sizes to free(9). In test for a few days in snapshots.deraadt2017-04-081-3/+3
| | | | | Errors will result in nice clean panic messages so we know what's wrong. Reviewed by dhill visa natano jsg.
* Kill async code commented out for more than 10 years.mpi2016-03-271-306/+1
|
* Die, damned distracting red space.krw2015-05-021-46/+46
|
* unbreak aac(4) by re-adding uvm_extern.h for ptoa()jasper2014-07-311-1/+3
| | | | ok deraadt@ sthen@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-6/+6
| | | | after discussions with beck deraadt kettenis.
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-3/+1
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* a polled command timing out isnt a software resource shortage, itsdlg2014-01-171-2/+2
| | | | | | a driver stuffup. aac is XS_NO_CCB clean now.
* remove a XS_NO_CCB case by moving aac to iopools.dlg2014-01-171-41/+33
| | | | eyes and ok by krw@ jmatthew@
* replace aacminphys with scsi_minphys. both are just wrappers arounddlg2014-01-171-15/+6
| | | | minphys.
* aacvar advertises a public api which is only used inside aac.c. make itdlg2014-01-171-1/+8
| | | | "private" so i dont feel bad about changing it.
* simplify kthread_create(). no more stdargderaadt2013-11-181-2/+2
| | | | ok matthew guenther mikeb
* ENOMEM is probably more appropriate than 0 in this error case.mlarkin2013-11-131-2/+2
|
* Use of uninitialized variable. There are obvious locking problems alsomlarkin2013-11-131-2/+2
| | | | | | | | present in this function, but I've been advised to walk away, and it have been this way forever (and this code is not even enabled in GENERIC by default anyway) original bug found by Maxime Villard, thanks.
* Enforce ca_activate tree-walks over the entire heirarchy for all events,deraadt2013-05-301-6/+1
| | | | | | cleaning up some shutdown-hook related code on the way. (A few drivers related to sparc are still skipped at kettenis' request) ok kettenis mlarkin, tested by many others too
* Backout a bunch of my SCSI commits from c2k11. At least one of thesematthew2011-07-171-2/+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@
* First batch of converting SCSI HBAs from setting saa_targets andmatthew2011-07-081-2/+2
| | | | | | saa_luns instead of adapter_buswidth and luns in the prototype link. ok dlg@, miod@
* Kill some #if 0'ed code (the 'raw' scsi path). Move splx()krw2011-04-041-30/+5
| | | | | | to before scsi_done(). This doesn't mean aac will ever enabled! ok dlg@
* Force openings to 1 for devices that can't do tagged i/o, i.e. morekrw2010-10-121-1/+2
| | | | | | | | | | | | | | than 1 i/o active at once. This reduces the chances that concurrent i/o's for such devices will confuse the device or the adapter code. It also eliminates a reason for adapter code to maintain its own queues. Tweak all drivers that fake INQUIRY results to set the SID_CmdQue flag, thus continuing to claim to be able to do tagged i/o. Positive feedback from matthew@ and marco@ for an earlier version. ok dlg@
* Stefan Rinkes pointed that the disabled aac(4) driver does not compilekrw2010-09-211-4/+5
| | | | | | with gcc4. Use his diff to make it compile. Submitted & tested by Stefan Rinkes. Thanks!
* Use SSD_ERRCODE_CURRENT instead of magic 0x70.krw2010-09-201-2/+2
| | | | ok dlg@ matthew@
* No "\n" needed at the end of panic() strings.krw2010-08-071-5/+5
| | | | | | | 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-6/+1
| | | | | | | | step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
* New scsi code seems to be stable. Pluck previously identifiedkrw2010-05-201-4/+2
| | | | | | | low-hanging splbio/splx pairs that are no longer needed and see if this reveals any hidden scsi flaws. ok dlg@
* more BUS_DMA_ZERO love.oga2010-05-181-5/+3
| | | | ok marco.
* Remove a bunch of if 0ed out code that used vtophys. it hasn't been usedoga2010-04-101-15/+1
| | | | | | | by now, probably won't be in the future. ok krw. "Correctski" from miod@ after I put back another chunk he wanted to remain.
* Change the scsi_cmd function member of scsi_adapter from int tokrw2010-03-231-15/+10
| | | | | | | | | | | | | 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@
* Zap all setting of ITSDONE in drivers that don't look at it. Nobodykrw2010-01-091-11/+1
| | | | | | | else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@