Deleted Added
full compact
ata-all.c (111473) ata-all.c (111748)
1/*-
2 * Copyright (c) 1998 - 2003 S�ren Schmidt <sos@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1998 - 2003 S�ren Schmidt <sos@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/dev/ata/ata-all.c 111473 2003-02-25 08:22:01Z sos $
28 * $FreeBSD: head/sys/dev/ata/ata-all.c 111748 2003-03-02 16:54:40Z des $
29 */
30
31#include "opt_ata.h"
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/ata.h>
35#include <sys/kernel.h>
36#include <sys/conf.h>

--- 587 unchanged lines hidden (view full) ---

624#if DEV_ATAPIALL
625 case ATA_ACTIVE_ATAPI:
626 if (!ch->running || atapi_interrupt(ch->running) == ATA_OP_CONTINUES)
627 return;
628 break;
629#endif
630 default:
631 if (ch->active & ATA_WAIT_INTR)
29 */
30
31#include "opt_ata.h"
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/ata.h>
35#include <sys/kernel.h>
36#include <sys/conf.h>

--- 587 unchanged lines hidden (view full) ---

624#if DEV_ATAPIALL
625 case ATA_ACTIVE_ATAPI:
626 if (!ch->running || atapi_interrupt(ch->running) == ATA_OP_CONTINUES)
627 return;
628 break;
629#endif
630 default:
631 if (ch->active & ATA_WAIT_INTR)
632 wakeup((caddr_t)ch);
632 wakeup(ch);
633 }
634
635 if (ch->active & ATA_CONTROL) {
636 ATA_FORCELOCK_CH(ch, ATA_CONTROL);
637 return;
638 }
639
640 if (ch->active & ATA_WAIT_INTR) {

--- 467 unchanged lines hidden (view full) ---

1108 case ATA_WAIT_INTR:
1109 atadev->channel->active |= ATA_WAIT_INTR;
1110 ATA_OUTB(atadev->channel->r_io, ATA_CMD, command);
1111
1112 /* enable interrupt */
1113 if (atadev->channel->flags & ATA_QUEUED)
1114 ATA_OUTB(atadev->channel->r_altio, ATA_ALTSTAT, ATA_A_4BIT);
1115
633 }
634
635 if (ch->active & ATA_CONTROL) {
636 ATA_FORCELOCK_CH(ch, ATA_CONTROL);
637 return;
638 }
639
640 if (ch->active & ATA_WAIT_INTR) {

--- 467 unchanged lines hidden (view full) ---

1108 case ATA_WAIT_INTR:
1109 atadev->channel->active |= ATA_WAIT_INTR;
1110 ATA_OUTB(atadev->channel->r_io, ATA_CMD, command);
1111
1112 /* enable interrupt */
1113 if (atadev->channel->flags & ATA_QUEUED)
1114 ATA_OUTB(atadev->channel->r_altio, ATA_ALTSTAT, ATA_A_4BIT);
1115
1116 if (tsleep((caddr_t)atadev->channel, PRIBIO, "atacmd", 10 * hz)) {
1116 if (tsleep(atadev->channel, PRIBIO, "atacmd", 10 * hz)) {
1117 ata_prtdev(atadev, "timeout waiting for interrupt\n");
1118 atadev->channel->active &= ~ATA_WAIT_INTR;
1119 error = -1;
1120 }
1121 break;
1122
1123 case ATA_WAIT_READY:
1124 atadev->channel->active |= ATA_WAIT_READY;

--- 462 unchanged lines hidden ---
1117 ata_prtdev(atadev, "timeout waiting for interrupt\n");
1118 atadev->channel->active &= ~ATA_WAIT_INTR;
1119 error = -1;
1120 }
1121 break;
1122
1123 case ATA_WAIT_READY:
1124 atadev->channel->active |= ATA_WAIT_READY;

--- 462 unchanged lines hidden ---