summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-queue.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2003-10-14 16:53:13 +0000
committersos <sos@FreeBSD.org>2003-10-14 16:53:13 +0000
commit3d089cc2b594349c1d3b6763c39890284e17d9aa (patch)
treef8650db94bce8148d9cefb0619e59cf1652aab16 /sys/dev/ata/ata-queue.c
parent3d011c684cbc09c3e7bfac3def70572bace7f8ea (diff)
downloadFreeBSD-src-3d089cc2b594349c1d3b6763c39890284e17d9aa.zip
FreeBSD-src-3d089cc2b594349c1d3b6763c39890284e17d9aa.tar.gz
Reintroduce the "recovered from lost interrupt" code, but in a new
(hopefully) panic safe way. Why the interrupts are lost is still a mystery, to me at least.
Diffstat (limited to 'sys/dev/ata/ata-queue.c')
-rw-r--r--sys/dev/ata/ata-queue.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/ata/ata-queue.c b/sys/dev/ata/ata-queue.c
index deb0514..aa3390d 100644
--- a/sys/dev/ata/ata-queue.c
+++ b/sys/dev/ata/ata-queue.c
@@ -315,20 +315,21 @@ ata_completed(void *context, int pending)
static void
ata_timeout(struct ata_request *request)
{
+ struct ata_channel *ch = request->device->channel;
+ int quiet = request->flags & ATA_R_QUIET;
+
/* clear timeout etc */
request->timeout_handle.callout = NULL;
-#if 0
- /* call interrupt to try finish up the command */
- request->device->channel->hw.interrupt(request->device->channel);
- if (request->device->channel->running == NULL) {
- if (!(request->flags & ATA_R_QUIET))
+ /* call hw.interrupt to try finish up the command */
+ ch->hw.interrupt(request->device->channel);
+ if (ch->running != request) {
+ if (!quiet)
ata_prtdev(request->device,
"WARNING - %s recovered from missing interrupt\n",
ata_cmd2str(request));
return;
}
-#endif
/* if this was a DMA request stop the engine to be on the safe side */
if (request->flags & ATA_R_DMA) {
OpenPOWER on IntegriCloud