| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: aic_pcmcia.c,v 1.37 2008/04/05 21:31:23 cegger Exp $ */ | | 1 | /* $NetBSD: aic_pcmcia.c,v 1.37.14.1 2008/11/20 02:56:40 snj Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1997 Marc Horowitz. All rights reserved. | | 4 | * Copyright (c) 1997 Marc Horowitz. All rights reserved. |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | | 10 | * notice, this list of conditions and the following disclaimer. |
11 | * 2. Redistributions in binary form must reproduce the above copyright | | 11 | * 2. Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the | | 12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. | | 13 | * documentation and/or other materials provided with the distribution. |
14 | * 3. All advertising materials mentioning features or use of this software | | 14 | * 3. All advertising materials mentioning features or use of this software |
| @@ -20,27 +20,27 @@ | | | @@ -20,27 +20,27 @@ |
20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | | 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
21 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | | 21 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
23 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | | 23 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
24 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | | 24 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
25 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 25 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 26 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 27 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | | 28 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
29 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 29 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | #include <sys/cdefs.h> | | 32 | #include <sys/cdefs.h> |
33 | __KERNEL_RCSID(0, "$NetBSD: aic_pcmcia.c,v 1.37 2008/04/05 21:31:23 cegger Exp $"); | | 33 | __KERNEL_RCSID(0, "$NetBSD: aic_pcmcia.c,v 1.37.14.1 2008/11/20 02:56:40 snj Exp $"); |
34 | | | 34 | |
35 | #include <sys/param.h> | | 35 | #include <sys/param.h> |
36 | #include <sys/systm.h> | | 36 | #include <sys/systm.h> |
37 | #include <sys/select.h> | | 37 | #include <sys/select.h> |
38 | #include <sys/device.h> | | 38 | #include <sys/device.h> |
39 | | | 39 | |
40 | #include <sys/cpu.h> | | 40 | #include <sys/cpu.h> |
41 | #include <sys/bus.h> | | 41 | #include <sys/bus.h> |
42 | #include <sys/intr.h> | | 42 | #include <sys/intr.h> |
43 | | | 43 | |
44 | #include <dev/scsipi/scsipi_all.h> | | 44 | #include <dev/scsipi/scsipi_all.h> |
45 | #include <dev/scsipi/scsipiconf.h> | | 45 | #include <dev/scsipi/scsipiconf.h> |
46 | #include <dev/scsipi/scsi_all.h> | | 46 | #include <dev/scsipi/scsi_all.h> |
| @@ -94,26 +94,29 @@ aic_pcmcia_match(struct device *parent, | | | @@ -94,26 +94,29 @@ aic_pcmcia_match(struct device *parent, |
94 | sizeof(aic_pcmcia_products[0]), NULL)) | | 94 | sizeof(aic_pcmcia_products[0]), NULL)) |
95 | return (1); | | 95 | return (1); |
96 | return (0); | | 96 | return (0); |
97 | } | | 97 | } |
98 | | | 98 | |
99 | int | | 99 | int |
100 | aic_pcmcia_validate_config(cfe) | | 100 | aic_pcmcia_validate_config(cfe) |
101 | struct pcmcia_config_entry *cfe; | | 101 | struct pcmcia_config_entry *cfe; |
102 | { | | 102 | { |
103 | if (cfe->iftype != PCMCIA_IFTYPE_IO || | | 103 | if (cfe->iftype != PCMCIA_IFTYPE_IO || |
104 | cfe->num_memspace != 0 || | | 104 | cfe->num_memspace != 0 || |
105 | cfe->num_iospace != 1) | | 105 | cfe->num_iospace != 1) |
106 | return (EINVAL); | | 106 | return (EINVAL); |
| | | 107 | /* XXX Below line is a hack to get around an rbus resource allocation */ |
| | | 108 | /* XXX problem. It should be removed when the problem is fixed. */ |
| | | 109 | cfe->iomask = 0; |
107 | return (0); | | 110 | return (0); |
108 | } | | 111 | } |
109 | | | 112 | |
110 | void | | 113 | void |
111 | aic_pcmcia_attach(struct device *parent, struct device *self, | | 114 | aic_pcmcia_attach(struct device *parent, struct device *self, |
112 | void *aux) | | 115 | void *aux) |
113 | { | | 116 | { |
114 | struct aic_pcmcia_softc *psc = (void *)self; | | 117 | struct aic_pcmcia_softc *psc = (void *)self; |
115 | struct aic_softc *sc = &psc->sc_aic; | | 118 | struct aic_softc *sc = &psc->sc_aic; |
116 | struct pcmcia_attach_args *pa = aux; | | 119 | struct pcmcia_attach_args *pa = aux; |
117 | struct pcmcia_config_entry *cfe; | | 120 | struct pcmcia_config_entry *cfe; |
118 | struct pcmcia_function *pf = pa->pf; | | 121 | struct pcmcia_function *pf = pa->pf; |
119 | int error; | | 122 | int error; |