From 46a309e292e5af41b47faa6b40c69b664299bea5 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Tue, 17 Feb 2009 21:17:21 +0000 Subject: [PATCH] ata_interrupt() does not need to return anything. It is not it's business to report request completion, expecially when it is not reliable. --- sys/dev/ata/ata-all.c | 8 ++++---- sys/dev/ata/ata-all.h | 2 +- sys/dev/ata/ata-queue.c | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 38538c89a52..d50ea873da4 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -147,7 +147,7 @@ ata_attach(device_t dev) return ENXIO; } if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL, - (driver_intr_t *)ata_interrupt, ch, &ch->ih))) { + ata_interrupt, ch, &ch->ih))) { device_printf(dev, "unable to setup interrupt\n"); return error; } @@ -319,7 +319,7 @@ ata_resume(device_t dev) return error; } -int +void ata_interrupt(void *data) { struct ata_channel *ch = (struct ata_channel *)data; @@ -354,11 +354,11 @@ ata_interrupt(void *data) mtx_unlock(&ch->state_mtx); ATA_LOCKING(ch->dev, ATA_LF_UNLOCK); ata_finish(request); - return 1; + return; } } while (0); mtx_unlock(&ch->state_mtx); - return 0; + return; } /* diff --git a/sys/dev/ata/ata-all.h b/sys/dev/ata/ata-all.h index e941433154f..4b7fe82941a 100644 --- a/sys/dev/ata/ata-all.h +++ b/sys/dev/ata/ata-all.h @@ -554,7 +554,7 @@ int ata_detach(device_t dev); int ata_reinit(device_t dev); int ata_suspend(device_t dev); int ata_resume(device_t dev); -int ata_interrupt(void *data); +void ata_interrupt(void *data); int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data); int ata_getparam(struct ata_device *atadev, int init); int ata_identify(device_t dev); diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c index 9a0d0a800b5..439f12a9816 100644 --- a/sys/dev/ata/ata-queue.c +++ b/sys/dev/ata/ata-queue.c @@ -214,8 +214,10 @@ ata_start(device_t dev) if (dumping) { mtx_unlock(&ch->state_mtx); mtx_unlock(&ch->queue_mtx); - while (!ata_interrupt(ch) && ch->running) + while (ch->running) { + ata_interrupt(ch); DELAY(10); + } return; } }