summaryrefslogtreecommitdiff
path: root/sys/dev/ata
AgeCommit message (Collapse)Author
2009-06-17Revert bufq's. this is inline with the major midlayer reverts thatThordur I. Bjornsson
have been going on. this appears to bring us back to stable state. lots of testing by oga and ariane and my self.
2009-06-03add a flexible buffer queue (bufq) api, based on the never usedThordur I. Bjornsson
one by tedu@. It doesn't do anything smart yet, it just uses plain old disksort. we also keep the old method of queueing bufs since some miods have crazy MD drivers that need some love. ok beck@, art@ tested by many on many archs.
2009-02-16Extend the scsi_adapter minphys() callback to take a struct scsi_link *Miod Vallat
as additional argument. This will allow intermediate layers between scsi devices such as sd and scsi host adapters to take appropriate action if necessary.
2009-01-21Replace timeout_add(msecs * hz / 1000) with timeout_add_msec(msecs).Alexander Yurchenko
No functional changes. ok krw@ miod@
2008-11-08remove dead stores and newly created unused variables.Charles Longeau
Found by LLVM/Clang Static Analyzer. ok krw@
2008-09-25Initialize 'capacity' to 0 and use tabs to indent. "won't hurt" miod@.Kenneth R Westerback
2008-09-10Convert timeout_add() calls using multiples of hz to timeout_add_sec()Bret Lambert
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
2008-06-27More removal of clauses 3 and 4 from NetBSD licenses.Ray Lai
OK deraadt@ and millert@
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-15Don't bypass partition bounds check for RAW_PART. We now guarantee thatKenneth R Westerback
RAW_PART will always be 0 -> disksize, so the bounds check will always pass for i/o's to valid addresses. Now the i/o will be properly truncated if it goes past the end of the device. This prevents various adverse impacts of issuing i/o's for data past the end of the device. Repeatedly requested by todd@. ok weingart@ deraadt@
2008-05-05Don't set the adaptor template link's flags and quirks when trying toKenneth R Westerback
set the flags and quirks for a device. Should fix weird issues where the device after an ATAPI device gets marked as ATAPI. First reported on misc@ by Daniel Wade, who also provided some useful testing. ok dlg@
2008-03-26plug a mem leak. the array of ports wasnt freed on detach.David Gwynne
2008-02-07enable DMA for 1-sector devices (i.e. most flash devices).Stuart Henderson
from NetBSD ok krw thib henning, tested by many
2008-01-01provide a thing for use with %b to show which xa flags are set.David Gwynne
2007-12-30dont freeze lock or set caching modes on ata devices that arent disks, itsDavid Gwynne
not a good idea. found by simon@ who plugged a sata dvd drive into ahci.
2007-12-29the scsi layer always had function pointers for asking the hba about aDavid Gwynne
device before issuing scsi commands to it, but it was never implemented, never used, and no hba actually filled them in. i came along and added another two function pointers for the same thing. this cleans up the extra pointers. ok krw@ marco@ miod@ deraadt@
2007-12-28provide vpd page 0, which lists which vpd pages we provide.David Gwynne
2007-12-28rename some functions to make it clear theyre used to emulate vpd responsesDavid Gwynne
2007-12-28implement emulation of vpd page 83, the device identification page. if theDavid Gwynne
disk provides a wwn, use it, otherwise do our best to generate an id from the model and serial number.
2007-12-28massage the way vpds are defined. rename the page used for the devicesDavid Gwynne
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@
2007-12-09unify synchronous scsi xfer completion handling. this started out as a fixDavid Gwynne
to the completions for some scsi commands we simply ack in the disk_cmd handler.
2007-12-09remove the nosleep argument to ata_get_xfer. it is a relic from when iDavid Gwynne
used to allocated xfers out of a pool rather than as part of the hbas ccb structure.
2007-12-06Ask for write cache and read look ahead to be turnedJonathan Gray
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@
2007-12-05Switch set features commands to use wdc_exec_command() to allowJonathan Gray
them to be properly polled. Fixes previously problematic machines of form and ckuethe. ok marco@
2007-11-28when we probe a port send an ata inquiry to the device and cacheDavid Gwynne
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.
2007-11-28make ata controllers protect their own command lists so atascsi doesnt haveDavid Gwynne
to continually go to splbio to ensure its safe to work on them. shrinks code a little.
2007-11-26Enable read ahead and write cache enable if supported byJonathan Gray
the disk rather than depending on the disk to have it on. A bunch of people have suggested this should go in.
2007-11-26implement atascsi_probe_dev and atascsi_detach_dev. they let a hba tellDavid Gwynne
the midlayer(s) what to do.
2007-11-26drive port probes from the scsi midlayer now that it will ask the adapterDavid Gwynne
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@
2007-11-23starting bits to implement hotplug of sili controllers. this adds the codeDavid Gwynne
to clean up the atascsi stuff, and has sili call it when its going away. tested on an expresscard sili variant by kettenis@
2007-11-23use copyin and copyout to get the actual ata data in and out of the kernelDavid Gwynne
for the ata ioctl used by atactl. i dont know how this worked before.
2007-11-23implement translation of the scsi vpd page for fetching a disks serialDavid Gwynne
number. lets bioctl against an atascsi disk see the serial number. continually requested by henning@
2007-11-23t10 has a whole spec on doing SCSI to ATA translation called SAT. i wishDavid Gwynne
id known about it when i wrote atascsi. anyway. it says we should claim SPC-3 when we fake INQUIRY.
2007-11-16accept ATA ioctls so tools like atactl work on disks behind the atascsiDavid Gwynne
layer. i intended to write better ways to deal with disks, but i have been too slack. shame on me. this is less code than the equivilent in wdc/pciide, which amuses me greatly.
2007-10-01More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' whereKenneth R Westerback
obvious.
2007-06-20b_cylinder does not need to be set on the callpath down into drivers.Theo de Raadt
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
2007-06-18avoid modification race in DIOCRLDINFO; ok krw miodTheo de Raadt
2007-06-08all drivers should spoof version 1 labelsTheo de Raadt
2007-06-07strncpy -> strlcpy, plus a little spacing line up.Ray Lai
OK deraadt.
2007-06-06now that all partition size/offsets are potentially 64-bit, change theTheo de Raadt
type of all variables to daddr64_t. this includes the APIs for XXsize() and XXdump(), all range checks inside bio drivers, internal variables for disklabel handling, and even uvm's swap offsets. re-read numerous times by otto, miod, krw, thib to look for errors
2007-06-05use six new macros to access & store the 48-bit disklabel fields relatedTheo de Raadt
to size. tested on almost all machines, double checked by miod and krw next comes the type handling surrounding these values
2007-06-01Don't initialize d_partitions[RAW_DISK] just before callingKenneth R Westerback
readdisklabel(), since all readdisklabel()'s do that already. ok deraadt@
2007-05-31Kill old, no longer necessary kludge to try fooling readdisklabel()Kenneth R Westerback
into using DOS geometry by calling it twice. And don't ignore the drive state if readdisklabel() returns a non-NULL value. ok weingart@ grange@
2007-04-28Fix comments above DISKMINOR uses. DISKMINOR provides minor not majorKenneth R Westerback
number (wd.c), and the uses are to find the minimum minor to be detached.
2007-04-27Nuke WDUNIT/WDPART/etc. defines and just use standard DISKUNIT/DISKPART/etc.Kenneth R Westerback
ones. No change to wd.o. ok deraadt@ marco@
2007-04-26Eliminate CPU_BIOS from userland and wd(4) by always using the BIOSKenneth R Westerback
geometry in the disklabel when there is a BIOS geometry to provide. This removes the option to set a disklabel to 'BIOS' geometry via the 'g b' command in the editor. Makes reported geometry more consistant and moves MD code to MD land where it should be. Doc help from jmc@, Feedback from millert@, marco@, weingart@, kettenis@. ok deraadt@
2007-04-22when an ata command returns an error, dont fill dmesg with messages aboutDavid Gwynne
it. returning an error to the scsi midlayer is all we need to do, which in turn will do the right thing.
2007-04-12Do a security freeze lock like we do in wd(4) to deal with systemsJonathan Gray
that leave the security set on by default. "looks sane" grange@, "looks ok" pascoe@, "put it in" dlg@
2007-04-10endian fixes for the read capacity handling.David Gwynne
2007-04-10Sort ATA commands by value.Jonathan Gray
ok dlg@