diff options
| author | Rui Paulo <rpaulo@FreeBSD.org> | 2014-04-12 23:40:54 +0000 |
|---|---|---|
| committer | Rui Paulo <rpaulo@FreeBSD.org> | 2014-04-12 23:40:54 +0000 |
| commit | 48e368909809a00912b21d4876698479dcb69e36 (patch) | |
| tree | 755c32727c7f029647b967f16cb33a214c4cb181 /sys/dev/ata | |
| parent | 4bc38a5ab0217aee0fd1829e4d46e74db344687d (diff) | |
Notes
Diffstat (limited to 'sys/dev/ata')
| -rw-r--r-- | sys/dev/ata/ata-all.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 957dd9543177..b45c868d63f7 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -360,24 +360,23 @@ ata_interrupt(void *data) static void ata_interrupt_locked(void *data) { - struct ata_channel *ch = (struct ata_channel *)data; - struct ata_request *request; + struct ata_channel *ch = (struct ata_channel *)data; + struct ata_request *request; - do { /* ignore interrupt if its not for us */ if (ch->hw.status && !ch->hw.status(ch->dev)) - break; + return; /* do we have a running request */ if (!(request = ch->running)) - break; + return; ATA_DEBUG_RQ(request, "interrupt"); /* safetycheck for the right state */ if (ch->state == ATA_IDLE) { - device_printf(request->dev, "interrupt on idle channel ignored\n"); - break; + device_printf(request->dev, "interrupt on idle channel ignored\n"); + return; } /* @@ -385,13 +384,12 @@ ata_interrupt_locked(void *data) * if it finishes immediately otherwise wait for next interrupt */ if (ch->hw.end_transaction(request) == ATA_OP_FINISHED) { - ch->running = NULL; - if (ch->state == ATA_ACTIVE) - ch->state = ATA_IDLE; - ata_cam_end_transaction(ch->dev, request); - return; + ch->running = NULL; + if (ch->state == ATA_ACTIVE) + ch->state = ATA_IDLE; + ata_cam_end_transaction(ch->dev, request); + return; } - } while (0); } static void |
