Deleted Added
full compact
ata-all.c (60041) ata-all.c (60829)
1/*-
2 * Copyright (c) 1998,1999,2000 S�ren Schmidt
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,1999,2000 S�ren Schmidt
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 60041 2000-05-05 09:59:14Z phk $
28 * $FreeBSD: head/sys/dev/ata/ata-all.c 60829 2000-05-23 19:05:56Z sos $
29 */
30
31#include "ata.h"
32#include "isa.h"
33#include "card.h"
34#include "pci.h"
35#include "atadisk.h"
36#include "atapicd.h"

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

1100 if (!(inl(rman_get_start(sc->bmio) + 0x1c) &
1101 ((scp->unit) ? 0x00004000 : 0x00000400)))
1102 return;
1103 }
1104 /* FALLTHROUGH */
1105#endif
1106 default:
1107 if (scp->flags & ATA_DMA_ACTIVE) {
29 */
30
31#include "ata.h"
32#include "isa.h"
33#include "card.h"
34#include "pci.h"
35#include "atadisk.h"
36#include "atapicd.h"

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

1100 if (!(inl(rman_get_start(sc->bmio) + 0x1c) &
1101 ((scp->unit) ? 0x00004000 : 0x00000400)))
1102 return;
1103 }
1104 /* FALLTHROUGH */
1105#endif
1106 default:
1107 if (scp->flags & ATA_DMA_ACTIVE) {
1108 if (!(dmastat = ata_dmastatus(scp)) & ATA_BMSTAT_INTERRUPT)
1108 if (!((dmastat = ata_dmastatus(scp)) & ATA_BMSTAT_INTERRUPT))
1109 return;
1110 else
1111 outb(scp->bmaddr+ATA_BMSTAT_PORT, dmastat|ATA_BMSTAT_INTERRUPT);
1112 }
1113 }
1114 DELAY(1);
1115
1116 /* get status, if drive is busy it didn't interrupt so return */

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

1508 return -1;
1509}
1510
1511int
1512ata_umode(struct ata_params *ap)
1513{
1514 if (ap->atavalid & ATA_FLAG_88) {
1515 if (ap->udmamodes & 0x10)
1109 return;
1110 else
1111 outb(scp->bmaddr+ATA_BMSTAT_PORT, dmastat|ATA_BMSTAT_INTERRUPT);
1112 }
1113 }
1114 DELAY(1);
1115
1116 /* get status, if drive is busy it didn't interrupt so return */

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

1508 return -1;
1509}
1510
1511int
1512ata_umode(struct ata_params *ap)
1513{
1514 if (ap->atavalid & ATA_FLAG_88) {
1515 if (ap->udmamodes & 0x10)
1516 return (ap->cblid ? 4 : 2);
1516 return 4;
1517 if (ap->udmamodes & 0x08)
1517 if (ap->udmamodes & 0x08)
1518 return (ap->cblid ? 3 : 2);
1518 return 3;
1519 if (ap->udmamodes & 0x04)
1520 return 2;
1521 if (ap->udmamodes & 0x02)
1522 return 1;
1523 if (ap->udmamodes & 0x01)
1524 return 0;
1525 }
1526 return -1;

--- 159 unchanged lines hidden ---
1519 if (ap->udmamodes & 0x04)
1520 return 2;
1521 if (ap->udmamodes & 0x02)
1522 return 1;
1523 if (ap->udmamodes & 0x01)
1524 return 0;
1525 }
1526 return -1;

--- 159 unchanged lines hidden ---