summaryrefslogtreecommitdiff
path: root/sys/dev/ata
AgeCommit message (Collapse)Author
2011-01-26Add port multiplier support, has been in snaps for a while with no reportedDale Rahn
issues. No actual OKs, but general acknowledgement and 'get it in' from several.
2011-01-13Add new file for upcoming change. ok dlg@ deraadt@Dale Rahn
2011-01-12Reset the state member of the ata_xfer to ATA_S_SETUP before reusing itMark Kettenis
to issue another command, since sili(4) actually checks. Fix a small inaccuracy in a comment while I'm there. ok dlg@
2010-12-31Reintroduce the code that puts the drive into standby in shutdown, butMark Kettenis
only do this if we're going to power down the machine. "My god, it is a 3 line diff. Commit it before it gets bigger!" deraadt@
2010-12-30The NVIDIA MCP89 SATA controller found on the 2010 Apple 13" MacBook ProMark Kettenis
can't address block 0xffffffff in LBA mode, at least in combination with the Hitachi HTS545032B9SA02 and HTS545050B9SA02 drives that Apple ships. So use LBA48 mode from that block onwards. ok marco@, deraadt@, miod@
2010-11-20clean up cases of ;;Theo de Raadt
2010-11-06If the dma_init callback function returns with EINVAL, fall back to PIO.Mark Kettenis
This will be used to work around bugs in certain pciide(4) controllers. From NetBSD. ok jsg@, krw@, deraadt@
2010-10-12Force openings to 1 for devices that can't do tagged i/o, i.e. moreKenneth R Westerback
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@
2010-09-23translate WRITE SAME 16 into DSM TRIM.David Gwynne
2010-09-23commands and bits for data set management.David Gwynne
2010-09-22All users of physio(9) now pass NULL as the buf pointer argument, soMatthew Dempsky
no point in keeping it around. "i like this" thib@ (a while back); ok krw@ and oga@; reminder to update the man page and tweaks jmc@
2010-09-20Use SSD_ERRCODE_CURRENT instead of magic 0x70.Kenneth R Westerback
ok dlg@ matthew@
2010-09-20define and use macros for looking at ncq bits.David Gwynne
requested by and ok krw@
2010-09-20DVACT_ACTIVATE and DVACT_DEACTIVATE do nothing here; removeTheo de Raadt
the false comments.
2010-09-19move the ncq depth calculation into atascsi_probe where it belongs. byDavid Gwynne
default we now only give devices 1 openings unless both the adapter and device support ncq and a queue depth greater than one. tested by josh elsasser, who always seems to get hurt when i change the openings handling in atascsi. ok krw@
2010-09-19check the cdb length on the scsi commands we emulate in atascsi as a way toDavid Gwynne
check that the midlayer is doing the right thing. ok krw@
2010-09-08Introduce a disk_lookup() function which calls device_lookup(), beforeJoel Sing
verifying that the resulting device is present on the disklist. This avoids a race whereby the disk driver can be accessed as soon as the softc has been allocated, but before the disk has completed initialisation and has called disk_attach() (up until this point dk_label is still a null pointer). Cut cd(4), sd(4) and wd(4) across to disk_lookup(). All callers of disk_attach() need to be tested and cut over in due course. ok deraadt@ krw@
2010-09-08Store a struct device pointer within struct disk and populate this whenJoel Sing
disk_attach() is called by the device driver. We will be building on this shortly. ok deraadt@ krw@
2010-09-02the page_length field in the vpd page header is 2 bytes, not 1.David Gwynne
ok krw@ marco@ matthew@
2010-09-01make struct bufq a member of the softc for devices that use it,David Gwynne
rather than it being a pointer to something that needs to be allocated at attach. since all these devices need a bufq to operate, it makes sense to have it allocated as part of the softc and get bufq_init to just initialise all its fields. it also gets rid of the possibility that you wont be able to allocate the bufq struct during attach, which is something you dont want to happen. secondly, it consistently implements a split between wrapper functions and the per discipline implementation of the bufq handlers. it consistently does the locking in the wrappers rather than doing half in the wrappers and the other half in the implementations. it also consistently handles the outstanding bufq bq pointer in the wrappers. this hides most of the implementation inside kern_bufq.c. the only stuff left in buf.h is for the bits each implementation needs to put inside struct buf. tested by thib@ krw@ and me ok thib@ matthew@ no objection from krw@
2010-08-31sort DVACT_ actions in order of useTheo de Raadt
2010-08-28Garbage collect struct dkdriver.Matthew Dempsky
ok miod@; "please go ahead" jsing@
2010-07-27Add scsi_cmd_rw_decode() for decoding any SCSI READ or WRITE command,Matthew Dempsky
and update atascsi(4) to make use of it. (Other HBAs will be updated post-release.) Should allow for use of SATA drives with >2^32 LBAs. ok deraadt@, dlg@, krw@
2010-07-23Manuel Bouyer rescinded clauses 3 and 4 of his license text.Jonathan Gray
2010-07-22Give the drive a little bit more time to complete the STANDBY IMMED command.Mark Kettenis
The ATA spec seems to suggest it may take up to 30s. This seems a little bit long. To quote Theo: "by that time some drives have probably parked their own heads in boredom". But it shouldn't hurt unless your drive is seriously broken. Makes some laptops suspend much better. ok deraadt@
2010-07-22First part of better pciide resume. Wake the channel by performing twoMike Larkin
resets separated by a small delay (a delay intended to offend jsg who will definitely want to fix it by checking for RDY instead) Tested on a variety of amd and i386 hardware by myself and deraadt@ ok deraadt
2010-07-21Garbage collect ata_bio's badsect field.Matthew Dempsky
ok deraadt@
2010-07-20Do not put a data buffer on the stack. It will be dma'd to. UseTheo de Raadt
malloc() for now, but mark it is dma reachable, and we will pick it up on the sweep in a while ok matthew
2010-07-13Do not put a data buffer on the stack; malloc it (we will use dma_allocTheo de Raadt
later, when we trust it) ok matthew
2010-07-03Implement translation of the SCSI START STOP UNIT command.Mark Kettenis
ok dlg@, marco@
2010-06-28Remove all adapter-specific 'struct scsi_device's. They are never used. FirstKenneth R Westerback
step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
2010-06-28Move disk_attach() to the end of the attach functions, at which point theJoel Sing
disk is now ready to handle I/O. ok krw@ dlg@
2010-06-19Remove more splbio/splx pairs from around scsi_done() calls.Kenneth R Westerback
From Matthew Dempsky.
2010-06-07partial backout of 1.81 as invoking standby in shutdownJonathan Gray
breaks at least socppc and armish
2010-05-26Reintroduce bufqs. A few changes since it was backed out after some goodThordur I. Bjornsson
comments from dlg@. No need for a separate bufq.h, keep all of in buf.h; As requested by kittens and deraadt. Only sd(4) and wd(4) for now. The rest of the drivers will be converted soon, also other goodies like heuristics for sd(4) for selecting the bufq type and the death of disksort() are forthcoming. Tested on: i386, amd64, sparc64, macppc, loongson and alpha by myself and phessler. OK art@, beck@, kettenis@, oga@
2010-05-26the addr field in read cap 16 is 8 bytes, not 4. pity, i had really bigDavid Gwynne
disks for a few minutes there.
2010-05-24Flush cache before suspend.Mark Kettenis
ok krw@, marco@
2010-05-23Place drive in standby mode before shutdown. Avoids the loud click heard onMark Kettenis
many laptops when powering them down. ok jsg@, oga@, krw@
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include <sys/dkio.h> to the places that actually want and use the disk ioctls. this became an issue when krw@'s X build failed when he was testing a change to dkio.h. tested by krw@ help from and ok miod@
2010-05-05map the ATA data set management stuff (ie, trim) to the SCSI thinDavid Gwynne
provisioning bits in read cap 16
2010-04-29Revert r1.80, leaving iopools in place. Fixes PR#6365. Why WD3200KS-00PKenneth R Westerback
disks on ATI SBx00 care is mysterious but let's keep them working. Fix tested by Josh Elsasser, submitter of PR#6365. Thanks! ok dlg@
2010-04-23Recycle unused disklabel fields in order to create a disklabel uniqueJoel Sing
identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
2010-04-23the SAT spec from t10.org defines messages for tunnelling ATA commands overDavid Gwynne
SCSI when you're talking to a scsi to ata translation layer (satl). this implements the ata command ioctl handler in scsi_ioctl.c that wraps the ata command requests up in these scsi commands and then issues them against the hardware. this cuts atascsi over to interpreting these scsi commands rather than the ioctls directly. this should allow mpi users (with a relatively recent firmware) to use atactl against their SATA disks. i cant test cos my mpi(4) parts are too old to either support these scsi commands or too old to take recent firmwares. ok marco@ @krw tested by krw@ and me on ahci/atascsi
2010-04-22cut atascsi over to providing and using iopools. this gets rid of NO_CCBDavid Gwynne
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@
2010-04-19move the stupid throwing away of ata_xfers out the run of the first scsiDavid Gwynne
inquiry against the device up to when the port is probed. this has been bugging me for ages.
2010-04-11Send "STANDBY IMMEDIATE" command to ATA disks upon suspend. For this to work,Mark Kettenis
pciide(4) needs to formward DVACT_SUSPEND and DVACT_RESUME events to its children, so do that. Gets rid of the nasty "click" sound from the disk on many laptops. ok marco@, jsg@
2010-04-05fill in the the lowest aligned logical block address field. itDavid Gwynne
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.
2010-04-05populate the logical per physical exponent of the read cap 16 reply byDavid Gwynne
factoring the processing that the limits vpd page does out. this will be easier when i get hold of a disk that does provide values in these ata identify fields.
2010-04-05add support for READ_CAPACITY_16.David Gwynne
2010-04-05add support for ata disks with block sizes other than 512 bytes. i haventDavid Gwynne
ever seen one, but the spec describes how to do it.