summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atascsi.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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@
* Set UltraDMA transfer mode. Some (early?) SATA drives, such as the Maxtorkettenis2015-12-291-1/+4
| | | | | | | | | | | 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@)
* rename the probe and free members of atascsi_methods to ata_probedlg2015-05-151-3/+3
| | | | | | | | 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.
* replace workq_task_add with a task. stash teh struct in the ata xfer thingdlg2013-12-091-1/+4
| | | | so its now reliable.
* macros for TRIMdlg2011-07-081-1/+4
|
* Move ata_put_xfer() from ata_xfer to atascsi_methods. It's just sillymatthew2011-05-081-3/+7
| | | | | | | | to have a non-changing function pointer be part of an object rather than it's virtual method table. ok dlg@; tested on ahci(4) by Mattieu Baptiste, jasper@, and Jason Crawford; no sili(4) testers, but identical changes to ahci(4)
* Add port multiplier support, has been in snaps for a while with no reporteddrahn2011-01-261-9/+21
| | | | issues. No actual OKs, but general acknowledgement and 'get it in' from several.
* commands and bits for data set management.dlg2010-09-231-1/+7
|
* define and use macros for looking at ncq bits.dlg2010-09-201-1/+6
| | | | requested by and ok krw@
* Implement translation of the SCSI START STOP UNIT command.kettenis2010-07-031-1/+2
| | | | ok dlg@, marco@
* map the ATA data set management stuff (ie, trim) to the SCSI thindlg2010-05-051-3/+7
| | | | provisioning bits in read cap 16
* cut atascsi over to providing and using iopools. this gets rid of NO_CCBdlg2010-04-221-12/+5
| | | | | | | and makes the ioctl path more reliable on busy disks by allowing it to sleep in the runqueue for an io to use. mk@ did the original diff and figured most of the problems out. ok mk@
* move the stupid throwing away of ata_xfers out the run of the first scsidlg2010-04-191-3/+1
| | | | | inquiry against the device up to when the port is probed. this has been bugging me for ages.
* fill in the the lowest aligned logical block address field. itdlg2010-04-051-2/+7
| | | | | | | | indicates the LBA of the first logical block that is located at the beginning of a physical block implemented as best as i can by my understanding of the spec. not tested yet.
* add support for ata disks with block sizes other than 512 bytes. i haventdlg2010-04-051-2/+2
| | | | ever seen one, but the spec describes how to do it.
* add support for emulating the disk characteristics and disk limits vpddlg2010-04-031-4/+13
| | | | | | pages. this if the first step in figuring out if disks use a different physical block size compared to the logical block size they present to the operating system.
* krw and marco found another problem with my atascsi chanages.dlg2009-12-081-1/+2
| | | | | | | | | | | | | | | turns out you cant send atapi devices the ata IDENTIFY command, they dont grok it. you have to send a PACKET IDENTIFY instead, which is exactly the same but with a different command id. this diff changes it so we send a PACKET IDENTIFY to atapi devices. my diff "broke" this because it actually checks to see if the IDENTIFY succeeded rather than just completed. the previous code was wrong with regard to atapi devices. it is just lucky we dont use the IDENTIFY output for atapi devs. my apologies to marco@ and krw@
* get rid of the return codes from command submission, ata_cmd handlersdlg2009-12-071-9/+9
| | | | | | | | | now return void. all state about a command is now represented within the ata_xfer structure, and all layers using it (both hba and atascsi) now check only ata_xfer. this relies on my scsi midlayer changes. it was written just before the second last backout of the midlayer.
* Extend the scsi_adapter minphys() callback to take a struct scsi_link *miod2009-02-161-2/+4
| | | | | | as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
* provide a thing for use with %b to show which xa flags are set.dlg2008-01-011-1/+5
|
* massage the way vpds are defined. rename the page used for the devicesdlg2007-12-281-1/+2
| | | | | | | serial number and split the vpd header out for use in other places. while here define the device identification page bits too. ok krw@ marco@
* Ask for write cache and read look ahead to be turnedjsg2007-12-061-1/+14
| | | | | | | on if supported as per the wd changes. Some drives don't do this for us and it helps performance by a large amount. ok dlg@
* when we probe a port send an ata inquiry to the device and cachedlg2007-11-281-2/+3
| | | | | | | | | | the result in the ata_port struct. use this cached inquiry data when building the replies to scsi commands rather than fetching a new copy of ata inq every time. this shrinks the code by 100 lines. it also avoids a malloc in a scsi io path, which could be issued at a time when malloc isnt guaranteed to succeed, but a real scsi io definitely should.
* implement atascsi_probe_dev and atascsi_detach_dev. they let a hba telldlg2007-11-261-2/+2
| | | | the midlayer(s) what to do.
* drive port probes from the scsi midlayer now that it will ask the adapterdlg2007-11-261-1/+2
| | | | | | if a device is there before doing any scsi commands. also implement a free path for when devices are detached. software hotplug has been tested on sili, and ahci is still working according to claudio@
* starting bits to implement hotplug of sili controllers. this adds the codedlg2007-11-231-2/+2
| | | | | | to clean up the atascsi stuff, and has sili call it when its going away. tested on an expresscard sili variant by kettenis@
* Do a security freeze lock like we do in wd(4) to deal with systemsjsg2007-04-121-1/+2
| | | | | | that leave the security set on by default. "looks sane" grange@, "looks ok" pascoe@, "put it in" dlg@
* Sort ATA commands by value.jsg2007-04-101-8/+8
| | | | ok dlg@
* device signatures appear to be common to sata controllers too.dlg2007-04-051-1/+5
|
* some registers are shared amongst various sata controllers, so stickdlg2007-04-041-1/+22
| | | | definitions of them here. this starts with the SStatus register.
* Read log page 10h to determine the NCQ error, instead of aborting allpascoe2007-04-021-1/+15
| | | | | | active commands when an error is encountered. ok dlg@
* Let atascsi issue NCQ commands if the controller supports it.pascoe2007-03-221-1/+9
| | | | | | This includes a nasty hack to reduce openings and throw away command slots if the device supports a lower queue depth than the host controller does. Yes, we're thinking about a better solution.
* Add support for issuing NCQ commands via AHCI.pascoe2007-03-211-1/+2
| | | | | | | | | | | | | | | | | | Because you cannot have NCQ commands active at the same time as standard (non-queued) commands, we must introduce a queueing scheme into the driver. This scheme ensures that a standard command is only issued to the drive when all currently active NCQ commands have finished, and that NCQ command issue is delayed when we have a pending standard command. Additionally, the queueing scheme adds a constraint to ensure that there are never more than two standard commands issued on a port at once. This should ensure that commands become active in the order they were submitted (regardless of their command slot number) both initially and when the port is reactivated after error recovery. These points mean that issuing a standard command effectively serialises the port, which may help us implement meaningful I/O barriers in the future.
* replace the array of u_int8_ts for the fis/registers with a struct to makedlg2007-03-211-59/+73
| | | | | it a bit easier to read. there are variations on this, but they can be defined later.
* add missing FLUSH_CACHE commands.dlg2007-03-201-1/+3
|
* Add support for ATA PACKET commands. This should make ATAPI cdrom drives,pascoe2007-03-201-1/+5
| | | | etc, just work.
* move ata command definitions from atascsi.c to atascsi.hdlg2007-03-201-1/+98
|
* reorder slightly. ata bits before atascsidlg2007-03-201-16/+23
|
* Add timeout handling for ATA commands.pascoe2007-03-201-1/+3
|
* nothing from wdc, wd, or any of the existing ata stuff pls. this gets riddlg2007-03-201-1/+2
| | | | | | of the wdcreg.h include in atascsi. "feel free to remove" pascoe@
* Request "descriptor processed" interrupts only for PIO requests (inquiry,pascoe2007-03-201-1/+2
| | | | | | | | | etc), and request that the D2H FIS at the completion of all (DMA) commands generate an interrupt. This makes each data transfer generate one interrupt instead of two and should guarantee that the interrupt that is generated actually arrives after the command has completed.
* Instead of having a copy of every register that we will issue in the ata_cmd,pascoe2007-03-201-8/+52
| | | | | | | | | | simply include a pointer to the command FIS that we will issue to the device. Include another space where we can copy back an error register set from a failed command. This means that we can now build and issue arbitrary commands from atascsi, and retrieve errors back.
* Change API for struct ata_xfer allocation to move it into the device thatpascoe2007-03-201-3/+6
| | | | | | | | | atascsi will be driving, and add it to the AHCI CCB. This effectively gives us all the resources we need for a transfer in one hit, meaning that we don't need to worry about whether we will have a pool shortage or not enough CCBs. The SCSI mid layer should take care to never exceed the number of CCBs we have available, based on our sc_link.openings.
* we need a resid toodlg2007-03-131-1/+2
|
* add timeouts on ata_xfersdlg2007-03-131-1/+3
|
* stash a pointer to the atascsi instance in ata_port structs. the completiondlg2007-02-281-6/+16
| | | | | | routine will take a pointer to ata_xfer, not a void *. add some states and flags for the xfers, and some values for the hba to return when processing them.
* precomp -> features as per ATA specjsg2007-02-191-2/+2
| | | | ok dlg@
* i think ata_xfers should look more like this. stash the number of the portdlg2007-02-191-8/+25
| | | | in the ata_port struct so a hba can find its own info for that port.
* implement the start of the framework for scsi emulation of ata disksdlg2007-02-191-5/+5
|