Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata revert the logic for wdc_wait_for_unbusy() in wd...
details: https://anonhg.NetBSD.org/src/rev/b9bcd53df4e5
branches: trunk
changeset: 356817:b9bcd53df4e5
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Oct 15 11:27:14 2017 +0000
description:
revert the logic for wdc_wait_for_unbusy() in wdc_ata_bio_intr() to pre-NCQ,
wdcintr() and wdctimeout() need that; follows same change
in atapi_wdc.c rev. 1.128
diffstat:
sys/dev/ata/ata_wdc.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r 06d68d20dcb8 -r b9bcd53df4e5 sys/dev/ata/ata_wdc.c
--- a/sys/dev/ata/ata_wdc.c Sun Oct 15 10:58:32 2017 +0000
+++ b/sys/dev/ata/ata_wdc.c Sun Oct 15 11:27:14 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_wdc.c,v 1.107 2017/10/08 13:35:03 christos Exp $ */
+/* $NetBSD: ata_wdc.c,v 1.108 2017/10/15 11:27:14 jdolecek Exp $ */
/*
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer.
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.107 2017/10/08 13:35:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.108 2017/10/15 11:27:14 jdolecek Exp $");
#include "opt_ata.h"
#include "opt_wdc.h"
@@ -618,14 +618,13 @@
}
static int
-wdc_ata_bio_intr(struct ata_channel *chp, struct ata_xfer *xfer, int is)
+wdc_ata_bio_intr(struct ata_channel *chp, struct ata_xfer *xfer, int irq)
{
struct atac_softc *atac = chp->ch_atac;
struct wdc_softc *wdc = CHAN_TO_WDC(chp);
struct ata_bio *ata_bio = &xfer->c_bio;
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive];
int drv_err, tfd;
- bool poll = ((xfer->c_flags & C_POLL) != 0);
ATADEBUG_PRINT(("wdc_ata_bio_intr %s:%d:%d\n",
device_xname(atac->atac_dev), chp->ch_channel, xfer->c_drive),
@@ -659,8 +658,9 @@
#endif
/* Ack interrupt done by wdc_wait_for_unbusy */
- if (wdc_wait_for_unbusy(chp, poll ? ATA_DELAY : 0, AT_POLL, &tfd) < 0) {
- if (!poll && (xfer->c_flags & C_TIMEOU) == 0) {
+ if (wdc_wait_for_unbusy(chp,
+ (irq == 0) ? ATA_DELAY : 0, AT_POLL, &tfd) < 0) {
+ if (irq && (xfer->c_flags & C_TIMEOU) == 0) {
ata_channel_unlock(chp);
return 0; /* IRQ was not for us */
}
Home |
Main Index |
Thread Index |
Old Index