Deleted Added
full compact
ata-dma.c (67058) ata-dma.c (67067)
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-dma.c 67058 2000-10-13 11:21:27Z sos $
28 * $FreeBSD: head/sys/dev/ata/ata-dma.c 67067 2000-10-13 12:09:23Z sos $
29 */
30
31#include "pci.h"
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/bio.h>
35#include <sys/malloc.h>
36#include <sys/bus.h>

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

494 umode |= (device == ATA_MASTER ? 0x11 : 0x42);
495 pci_write_config(parent, scp->channel ? 0x7b : 0x73, umode, 1);
496 scp->mode[ATA_DEV(device)] = ATA_UDMA2;
497 return;
498 }
499 }
500 /* make sure eventual UDMA mode from the BIOS is disabled */
501 pci_write_config(parent, scp->channel ? 0x7b : 0x73,
29 */
30
31#include "pci.h"
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/bio.h>
35#include <sys/malloc.h>
36#include <sys/bus.h>

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

494 umode |= (device == ATA_MASTER ? 0x11 : 0x42);
495 pci_write_config(parent, scp->channel ? 0x7b : 0x73, umode, 1);
496 scp->mode[ATA_DEV(device)] = ATA_UDMA2;
497 return;
498 }
499 }
500 /* make sure eventual UDMA mode from the BIOS is disabled */
501 pci_write_config(parent, scp->channel ? 0x7b : 0x73,
502 pci_read_config(parent, scp->channel ? 0x7b : 0x73, 1) &
502 pci_read_config(parent, scp->channel ? 0x7b : 0x73, 1)&
503 ~(device == ATA_MASTER ? 0x35 : 0xca), 1);
504 /* FALLTHROUGH */
505
506 case 0x06461095: /* CMD 646 ATA controller */
507 if (wdmamode >= 2 && apiomode >= 4) {
508 error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
509 ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
510 if (bootverbose)

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

1025 }
1026 }
1027 pci_write_config(parent, 0x40 + (devno << 2), (timing & ~0x80000000),4);
1028 }
1029}
1030
1031#else /* NPCI > 0 */
1032
503 ~(device == ATA_MASTER ? 0x35 : 0xca), 1);
504 /* FALLTHROUGH */
505
506 case 0x06461095: /* CMD 646 ATA controller */
507 if (wdmamode >= 2 && apiomode >= 4) {
508 error = ata_command(scp, device, ATA_C_SETFEATURES, 0, 0, 0,
509 ATA_WDMA2, ATA_C_F_SETXFER, ATA_WAIT_READY);
510 if (bootverbose)

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

1025 }
1026 }
1027 pci_write_config(parent, 0x40 + (devno << 2), (timing & ~0x80000000),4);
1028 }
1029}
1030
1031#else /* NPCI > 0 */
1032
1033void *
1034ata_dmaalloc(struct ata_softc *scp, int device)
1035{
1036}
1037
1033void
1034ata_dmainit(struct ata_softc *scp, int device,
1035 int piomode, int wdmamode, int udmamode)
1036{
1037}
1038
1039int
1038void
1039ata_dmainit(struct ata_softc *scp, int device,
1040 int piomode, int wdmamode, int udmamode)
1041{
1042}
1043
1044int
1040ata_dmasetup(struct ata_softc *scp, int device,
1041 int8_t *data, int32_t count, int flags)
1045ata_dmasetup(struct ata_softc *scp, int device, struct ata_dmaentry *dmatab,
1046 caddr_t data, int32_t count)
1042{
1043 return -1;
1044}
1045
1047{
1048 return -1;
1049}
1050
1046void
1047ata_dmastart(struct ata_softc *scp)
1051void
1052ata_dmastart(struct ata_softc *scp, int device,
1053 struct ata_dmaentry *dmatab, int dir)
1048{
1049}
1050
1051int
1052ata_dmadone(struct ata_softc *scp)
1053{
1054 return -1;
1055}
1056
1057int
1058ata_dmastatus(struct ata_softc *scp)
1059{
1060 return -1;
1061}
1062
1063#endif /* NPCI > 0 */
1054{
1055}
1056
1057int
1058ata_dmadone(struct ata_softc *scp)
1059{
1060 return -1;
1061}
1062
1063int
1064ata_dmastatus(struct ata_softc *scp)
1065{
1066 return -1;
1067}
1068
1069#endif /* NPCI > 0 */