| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
part of a diff from Imre Vadasz via sf@
|
|
|
|
| |
from Imre Vadasz via sf@
|
|
|
|
|
|
|
|
|
|
|
| |
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@)
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
so its now reliable.
|
| |
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
issues. No actual OKs, but general acknowledgement and 'get it in' from several.
|
| |
|
|
|
|
| |
requested by and ok krw@
|
|
|
|
| |
ok dlg@, marco@
|
|
|
|
| |
provisioning bits in read cap 16
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
| |
inquiry against the device up to when the port is probed. this has been
bugging me for ages.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
ever seen one, but the spec describes how to do it.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
as additional argument. This will allow intermediate layers between
scsi devices such as sd and scsi host adapters to take appropriate
action if necessary.
|
| |
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
the midlayer(s) what to do.
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
to clean up the atascsi stuff, and has sili call it when its going away.
tested on an expresscard sili variant by kettenis@
|
|
|
|
|
|
| |
that leave the security set on by default.
"looks sane" grange@, "looks ok" pascoe@, "put it in" dlg@
|
|
|
|
| |
ok dlg@
|
| |
|
|
|
|
| |
definitions of them here. this starts with the SStatus register.
|
|
|
|
|
|
| |
active commands when an error is encountered.
ok dlg@
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
it a bit easier to read. there are variations on this, but they can be
defined later.
|
| |
|
|
|
|
| |
etc, just work.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
of the wdcreg.h include in atascsi.
"feel free to remove" 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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
ok dlg@
|
|
|
|
| |
in the ata_port struct so a hba can find its own info for that port.
|
| |
|