| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: wstsc.c,v 1.34 2014/01/22 00:25:16 christos Exp $ */ | | 1 | /* $NetBSD: wstsc.c,v 1.35 2019/02/06 04:07:31 mrg Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1982, 1990 The Regents of the University of California. | | 4 | * Copyright (c) 1982, 1990 The Regents of the University of California. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -48,27 +48,27 @@ | | | @@ -48,27 +48,27 @@ |
48 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 48 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
49 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | | 49 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
50 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | | 50 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
51 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 51 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
52 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 52 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
53 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 53 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
54 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | | 54 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
55 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 55 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
56 | * | | 56 | * |
57 | * @(#)supradma.c | | 57 | * @(#)supradma.c |
58 | */ | | 58 | */ |
59 | | | 59 | |
60 | #include <sys/cdefs.h> | | 60 | #include <sys/cdefs.h> |
61 | __KERNEL_RCSID(0, "$NetBSD: wstsc.c,v 1.34 2014/01/22 00:25:16 christos Exp $"); | | 61 | __KERNEL_RCSID(0, "$NetBSD: wstsc.c,v 1.35 2019/02/06 04:07:31 mrg Exp $"); |
62 | | | 62 | |
63 | #include <sys/param.h> | | 63 | #include <sys/param.h> |
64 | #include <sys/systm.h> | | 64 | #include <sys/systm.h> |
65 | #include <sys/kernel.h> | | 65 | #include <sys/kernel.h> |
66 | #include <sys/device.h> | | 66 | #include <sys/device.h> |
67 | #include <dev/scsipi/scsi_all.h> | | 67 | #include <dev/scsipi/scsi_all.h> |
68 | #include <dev/scsipi/scsipi_all.h> | | 68 | #include <dev/scsipi/scsipi_all.h> |
69 | #include <dev/scsipi/scsiconf.h> | | 69 | #include <dev/scsipi/scsiconf.h> |
70 | #include <amiga/amiga/device.h> | | 70 | #include <amiga/amiga/device.h> |
71 | #include <amiga/amiga/isr.h> | | 71 | #include <amiga/amiga/isr.h> |
72 | #include <amiga/dev/scireg.h> | | 72 | #include <amiga/dev/scireg.h> |
73 | #include <amiga/dev/scivar.h> | | 73 | #include <amiga/dev/scivar.h> |
74 | #include <amiga/dev/zbusvar.h> | | 74 | #include <amiga/dev/zbusvar.h> |
| @@ -395,27 +395,27 @@ wstsc_dma_xfer_in2(struct sci_softc *dev | | | @@ -395,27 +395,27 @@ wstsc_dma_xfer_in2(struct sci_softc *dev |
395 | if (!(*sci_csr & SCI_CSR_PHASE_MATCH) | | 395 | if (!(*sci_csr & SCI_CSR_PHASE_MATCH) |
396 | || !(*dev->sci_bus_csr & SCI_BUS_BSY) | | 396 | || !(*dev->sci_bus_csr & SCI_BUS_BSY) |
397 | || --wait < 0) { | | 397 | || --wait < 0) { |
398 | #ifdef DEBUG | | 398 | #ifdef DEBUG |
399 | if (sci_debug | 1) | | 399 | if (sci_debug | 1) |
400 | printf("supradma1_in2 fail: l%d i%x w%d\n", | | 400 | printf("supradma1_in2 fail: l%d i%x w%d\n", |
401 | len, *dev->sci_bus_csr, wait); | | 401 | len, *dev->sci_bus_csr, wait); |
402 | #endif | | 402 | #endif |
403 | *dev->sci_mode &= ~SCI_MODE_DMA; | | 403 | *dev->sci_mode &= ~SCI_MODE_DMA; |
404 | return 0; | | 404 | return 0; |
405 | } | | 405 | } |
406 | } | | 406 | } |
407 | #else | | 407 | #else |
408 | while (!(*sci_csr * SCI_CSR_DREQ)) | | 408 | while (!(*sci_csr & SCI_CSR_DREQ)) |
409 | ; | | 409 | ; |
410 | #endif | | 410 | #endif |
411 | | | 411 | |
412 | *buf++ = *sci_dma; | | 412 | *buf++ = *sci_dma; |
413 | len -= 2; | | 413 | len -= 2; |
414 | } | | 414 | } |
415 | | | 415 | |
416 | QPRINTF(("supradma_in2 {%d} %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", | | 416 | QPRINTF(("supradma_in2 {%d} %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", |
417 | len, obp[0], obp[1], obp[2], obp[3], obp[4], obp[5], | | 417 | len, obp[0], obp[1], obp[2], obp[3], obp[4], obp[5], |
418 | obp[6], obp[7], obp[8], obp[9])); | | 418 | obp[6], obp[7], obp[8], obp[9])); |
419 | | | 419 | |
420 | *dev->sci_irecv = 0; | | 420 | *dev->sci_irecv = 0; |
421 | *dev->sci_mode = 0; | | 421 | *dev->sci_mode = 0; |