summaryrefslogtreecommitdiff
path: root/sys/dev/ata
AgeCommit message (Collapse)Author
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@
2007-04-08Use CMD_OK instead of 0, no binary change, from mickeyPedro Martelletto
2007-04-05device signatures appear to be common to sata controllers too.David Gwynne
2007-04-04some registers are shared amongst various sata controllers, so stickDavid Gwynne
definitions of them here. this starts with the SStatus register.
2007-04-02Read log page 10h to determine the NCQ error, instead of aborting allChristopher Pascoe
active commands when an error is encountered. ok dlg@
2007-03-27OK, I understand why jsg wanted the disk_unbusy() in wdretry(), and heTheo de Raadt
was right. There is another path that ends up avoiding the disk_unbusy call I inserted.... tested by robert too
2007-03-25wdc retries (including after suspends) caused a disk to remain busy whenTheo de Raadt
it should not; ok dlg problem spotted using zaurus soft-drive-led diff which is pending i think i convinced jsg now that this fix is better than putting it in wdrestart
2007-03-25kill extra space in output with diskerr(); ok jsgTheo de Raadt
2007-03-24Complete the right scsi_xfer when processing a disk sync request.Christopher Pascoe
2007-03-23Track the ATA xfer's state more closely - may help us identify why someChristopher Pascoe
are seeing a panic at halt time.
2007-03-23Really clear the device register on the flush cache command. Last commitChristopher Pascoe
adjusted the packet and identify commands.
2007-03-23Clear the device register on the flush cache command, in case somethingChristopher Pascoe
that shouldn't care about don't care bits does care.
2007-03-23Catch timed out disk commands.Christopher Pascoe
2007-03-22Let atascsi issue NCQ commands if the controller supports it.Christopher Pascoe
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.
2007-03-21A polled xfer has completed and been put by the time ata_cmd returns, soChristopher Pascoe
don't use xa->flags afterwards.
2007-03-21Add support for issuing NCQ commands via AHCI.Christopher Pascoe
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.
2007-03-21atascsi sends h2d fis's, not d2h.David Gwynne
2007-03-21replace the array of u_int8_ts for the fis/registers with a struct to makeDavid Gwynne
it a bit easier to read. there are variations on this, but they can be defined later.
2007-03-20Be sure to reset ata_xfer flags for all PACKET transfers, otherwise weChristopher Pascoe
could pick up a previous ATA_F_POLL from a previous non-data command.
2007-03-20add missing FLUSH_CACHE commands.David Gwynne
2007-03-20Basic FLUSH CACHE support.Christopher Pascoe
Note that the ATA spec says we're should retry after error until we see no more errors. This is not (yet) implemented.
2007-03-20Tag ATAPI transfers that have no data phase correctly, otherwise the commandChristopher Pascoe
isn't sent to the device.
2007-03-20Oops, remove some unused variables and unmangle a command name.Christopher Pascoe
2007-03-20Cap the device size we present to 2TB, just in case someone attachesChristopher Pascoe
something really big. The SCSI layer isn't yet ready for it.
2007-03-20Move common completion handling into ata_exec itself. Removes a double freeChristopher Pascoe
in the inquiry error paths, as the HBA will have already completed the ata_xfer with an error. Reminder and ok dlg@
2007-03-20Add support for ATA PACKET commands. This should make ATAPI cdrom drives,Christopher Pascoe
etc, just work.
2007-03-20move ata command definitions from atascsi.c to atascsi.hDavid Gwynne
2007-03-20reorder slightly. ata bits before atascsiDavid Gwynne
2007-03-20Add timeout handling for ATA commands.Christopher Pascoe
2007-03-20nothing from wdc, wd, or any of the existing ata stuff pls. this gets ridDavid Gwynne
of the wdcreg.h include in atascsi. "feel free to remove" pascoe@
2007-03-20Request "descriptor processed" interrupts only for PIO requests (inquiry,Christopher Pascoe
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.
2007-03-20Calculate the residual and copy it back to the scsi_xfer, so that RW actuallyChristopher Pascoe
works. From dlg@
2007-03-20Add support for issuing sector read/write commands.Christopher Pascoe
2007-03-20Instead of having a copy of every register that we will issue in the ata_cmd,Christopher Pascoe
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.
2007-03-20Change API for struct ata_xfer allocation to move it into the device thatChristopher Pascoe
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.