ata_interrupt() does not need to return anything. It is not it's business

to report request completion, expecially when it is not reliable.
This commit is contained in:
Alexander Motin 2009-02-17 21:17:21 +00:00
parent 5d6fbb9900
commit 46a309e292
3 changed files with 8 additions and 6 deletions

View File

@ -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;
}
/*

View File

@ -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);

View File

@ -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;
}
}