summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Replace simple one-line bcopy()/memcpy() of faked data into scsi_xfer with callkrw2020-10-151-3/+4
| | | | | to scsi_copy_internal_data(). Thus getting xs->resid properly set and adding the usual uio/size sanity checks.
* 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-3/+3
| | | | | 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-3/+3
|
* When building emulated INQUIRY results use the SCSI_REV_* #define's tokrw2020-09-021-3/+3
| | | | initialize the 'version' field. Not numbers.
* Rename [READ|WRITE]_BIG to [READ|WRITE]_10. Rename struct scsi_rw_big tokrw2020-09-011-3/+3
| | | | | | struct scsi_rw_10. ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
* Remove needless uses of SDEV_ONLYBIG. It was always set when SDEV_UMASS was set,krw2020-08-261-2/+1
| | | | | | | | and was always checked in concert with SDEV_ATAPI. Just rely on SDEV_ATAPI and SDEV_UMASS in all but the one place sd(4) where SDEV_ONLYBIG is set independently of SDEV_ATAPI/_UMASS. ok jmatthew@
* Nuke unused struct scsi_link members of adapter softc's where thekrw2020-07-221-2/+1
| | | | driver successfully compiles on one or more of amd64, i386, hppa.
* Move remaining scsi bus initialization info from "prototype scsi link"krw2020-07-201-4/+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-6/+6
| | | | | | | adapter_buswidth, adapter_softc) from struct scsi_link to struct scsibus_attach_args. Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
* Always a joker hiding somewhere.krw2020-07-171-4/+4
| | | | Access adapter_buswidth via link->bus->sb_adapter_buswidth.
* Access adapter softc via link->bus->sb_adapter_softc.krw2020-07-161-13/+13
| | | | | | | | 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-3/+1
| | | | statement. All to make upcoming diff(s) smaller and easier to read.
* Shuffle things around so that sc->sc_link initialization iskrw2020-07-021-4/+4
| | | | even more concentrated just before config_found().
* Nuke trailing whitespace.krw2020-06-271-6/+6
|
* No need to bzero()/memset() 'struct scsibus_attach_args' variableskrw2020-06-271-2/+1
| | | | immediately before initializing the only field in the struct.
* 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.
* 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().
* 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.
* 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@
* we've been using LBA48 for < 137GB drives for 17 years, so perhapstedu2020-01-231-2/+1
| | | | we can remove the XXX now.
* Remove some unused code left over from an ancient (i.e. 2007) attemptkrw2019-08-192-25/+2
| | | | | | to present wd disks as sd drives. ok deraadt@
* Use timeout_add_msec(9)kn2019-07-071-3/+4
| | | | | | | RECOVERYTIME is twice per second, so sleep for 500 milliseconds and reflect the unit to be clear. OK patrick
* Remove unnecessary if/else block, both branches are identical. We canfcambus2018-11-021-9/+4
| | | | | | | | in fact use the ATA_DELAY macro directly. Coverity CID 1453008. OK sthen@, kn@
* Don't pull in <sys/file.h> just to get fcntl.hguenther2017-12-301-2/+2
| | | | ok deraadt@ krw@
* Delete unnecessary <sys/file.h> includesguenther2017-12-302-4/+2
| | | | ok millert@ krw@
* Repair flushcache/standby operations to not convert AT_WAIT operationsderaadt2017-12-141-12/+4
| | | | | to AT_POLL, which some chip driver underneath cannot handle. tested by bluhm also
* remove defines for ioctls the kernel doesn't recognisejsg2017-10-241-28/+1
| | | | ok mpi@
* Use the correct argument to sizeof. Coverity CID 1453382.jsg2017-08-231-2/+2
|
* add some details relating to SATA device power managementjmatthew2017-05-311-3/+19
| | | | part of a diff from Imre Vadasz via sf@
* fix SATA_SStatus_DET_OFFLINE value and add newer SStatus bitsjmatthew2017-05-311-2/+4
| | | | from Imre Vadasz via sf@
* Add an ioctl to tell storage devices to flush their internal cachessf2017-05-291-10/+26
| | | | | | | Currently implemented for wd and sd. Initially ported from netbsd by pedro@ ok deraadt@
* Also pass the blk offset to disk_unbusy(), so that it can pass it toderaadt2017-05-041-3/+3
| | | | | | the random subsystem as entropy. This value is pretty much unknown, and anyways our entropy input ring does not saturate from knowns. ok mikeb djm
* Fix size passed to free(), found the hard way by Nick Permyakovjca2016-03-151-2/+2
| | | | ok deraadt@
* Set segflg member of uio struct with symbolic enum valuestefan2016-01-201-2/+2
| | | | | | | | instead of using magic numbers. No binary change. Diff from Martin Natano. ok deraadt@
* Fix typo in comment.kettenis2016-01-031-2/+2
| | | | Pointed out by mlarkin@
* Set UltraDMA transfer mode. Some (early?) SATA drives, such as the Maxtorkettenis2015-12-292-2/+25
| | | | | | | | | | | 7Y250M0, refuse to do DMA unless the transfer mode has been set. This causes reads (and presumably writes) to time out. Unlike the wdc code, this only sets the UltraDMA transfer mode. If we ever want to support ancient PATA drivers through the atascsi layer, we probably need to set the PIO and/or MWDMA transfer modes as well. ok jmatthew@, dlg@)
* fairly simple sizes for free(); ok teduderaadt2015-08-281-5/+5
|
* trivial size to free()deraadt2015-08-261-2/+2
|
* The 80's called and want their interface back. Remove last fragments ofkrw2015-08-174-14/+10
| | | | | | | | | ST-506 support. Remove redundant 'precomp' variables/fields and rename remaining few to 'features' to be consistant with the rest of the code. Consensus that no ST-506 disks (requiring ISA cards, <120MB, usually rife with bad sectors that can't be worked around) are still running OpenBSD.
* rename the probe and free members of atascsi_methods to ata_probedlg2015-05-152-7/+7
| | | | | | | | and ata_free. this makes them consistent with the rest of the members, and lets me #define free to weird debug things in the kernel without screwing these files up.
* Use config_suspend() instead of dereferencing ca_activate directly tompi2015-04-041-6/+2
| | | | | | | | | | support drivers that do not need any specific suspend/resume magic and do not have an activate function. config_suspend() will automagically propagate the event to the children of the driver. Needed at least by kauaiata(4/macppc). ok deraadt@, mlarkin@
* Remove some includes include-what-you-use claims don'tjsg2015-03-143-7/+3
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* remove the second void * argument on tasks.dlg2015-01-271-5/+5
| | | | | | | | | | | | | | | | | | | | | when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier. now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument. so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it. ok krw@
* More malloc() -> mallocarray() in the kernel.doug2014-12-091-5/+5
| | | | ok deraadt@ tedu@
* remove uneeded proc.h includesjsg2014-09-143-6/+4
| | | | ok mpi@ kspillner@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-122-8/+8
| | | | after discussions with beck deraadt kettenis.
* remove most of the boolean_t infection outside uvm/ddb/pmap; ok jsgderaadt2014-07-101-3/+1
|
* Kill unused shutdown hook pointers.mpi2014-07-091-2/+1
| | | | ok miod@, deraadt@, tedu@
* replace workq_task_add with a task. stash teh struct in the ata xfer thingdlg2013-12-092-7/+11
| | | | so its now reliable.