summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-queue.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2005-03-31 15:05:40 +0000
committersos <sos@FreeBSD.org>2005-03-31 15:05:40 +0000
commit372caa3813e5713c7917cd6f90078a45d2da71dd (patch)
tree0748406e400c9f20fecff6bc5b58c77e39c8beee /sys/dev/ata/ata-queue.c
parent2510e6c031d747c3122063fca085c26d4a13c2cd (diff)
downloadFreeBSD-src-372caa3813e5713c7917cd6f90078a45d2da71dd.zip
FreeBSD-src-372caa3813e5713c7917cd6f90078a45d2da71dd.tar.gz
Change the ata_* methods to use a channel device instead of a
controller device. This helps when there is no controller parent to a channel (PPC port).
Diffstat (limited to 'sys/dev/ata/ata-queue.c')
-rw-r--r--sys/dev/ata/ata-queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c
index 603e85d..f4bdce1 100644
--- a/sys/dev/ata/ata-queue.c
+++ b/sys/dev/ata/ata-queue.c
@@ -172,7 +172,7 @@ ata_start(device_t dev)
if ((request = TAILQ_FIRST(&ch->ata_queue))) {
/* we need the locking function to get the lock for this channel */
- if (ATA_LOCKING(device_get_parent(dev), dev, ATA_LF_LOCK) == ch->unit) {
+ if (ATA_LOCKING(dev, ATA_LF_LOCK) == ch->unit) {
/* check for composite dependencies */
if ((cptr = request->composite)) {
@@ -211,7 +211,7 @@ ata_start(device_t dev)
ch->state = ATA_IDLE;
mtx_unlock(&ch->state_mtx);
mtx_unlock(&ch->queue_mtx);
- ATA_LOCKING(device_get_parent(dev), dev, ATA_LF_UNLOCK);
+ ATA_LOCKING(dev, ATA_LF_UNLOCK);
ata_finish(request);
return;
}
@@ -492,7 +492,7 @@ ata_timeout(struct ata_request *request)
ch->hw.end_transaction(request);
ch->state |= ATA_TIMEOUT;
mtx_unlock(&ch->state_mtx);
- ATA_LOCKING(device_get_parent(ch->dev), ch->dev, ATA_LF_UNLOCK);
+ ATA_LOCKING(ch->dev, ATA_LF_UNLOCK);
ata_finish(request);
}
else {
OpenPOWER on IntegriCloud