Tue May 12 12:11:17 2009 UTC ()
struct cfdata * -> cfdata_t, no functional changes intended.


(cegger)
diff -r1.20 -r1.21 src/sys/dev/cardbus/adv_cardbus.c
diff -r1.96 -r1.97 src/sys/dev/cardbus/cardbus.c
diff -r1.47 -r1.48 src/sys/dev/cardbus/cardslot.c
diff -r1.22 -r1.23 src/sys/dev/cardbus/ehci_cardbus.c
diff -r1.26 -r1.27 src/sys/dev/cardbus/fwohci_cardbus.c
diff -r1.32 -r1.33 src/sys/dev/cardbus/if_ath_cardbus.c
diff -r1.37 -r1.38 src/sys/dev/cardbus/if_fxp_cardbus.c
diff -r1.14 -r1.15 src/sys/dev/cardbus/if_ral_cardbus.c
diff -r1.28 -r1.29 src/sys/dev/cardbus/if_rtw_cardbus.c
diff -r1.31 -r1.32 src/sys/dev/cardbus/ohci_cardbus.c
diff -r1.29 -r1.30 src/sys/dev/cardbus/rbus_ppb.c
diff -r1.12 -r1.13 src/sys/dev/cardbus/uhci_cardbus.c

cvs diff -r1.20 -r1.21 src/sys/dev/cardbus/adv_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/adv_cardbus.c 2009/03/14 15:36:16 1.20
+++ src/sys/dev/cardbus/adv_cardbus.c 2009/05/12 12:11:17 1.21
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: adv_cardbus.c,v 1.20 2009/03/14 15:36:16 dsl Exp $ */ 1/* $NetBSD: adv_cardbus.c,v 1.21 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2000 The NetBSD Foundation, Inc. 4 * Copyright (c) 2000 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center. 9 * NASA Ames Research Center.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE. 30 * POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33/* 33/*
34 * this file was brought from ahc_cardbus.c and adv_pci.c 34 * this file was brought from ahc_cardbus.c and adv_pci.c
35 * and modified by YAMAMOTO Takashi. 35 * and modified by YAMAMOTO Takashi.
36 */ 36 */
37 37
38#include <sys/cdefs.h> 38#include <sys/cdefs.h>
39__KERNEL_RCSID(0, "$NetBSD: adv_cardbus.c,v 1.20 2009/03/14 15:36:16 dsl Exp $"); 39__KERNEL_RCSID(0, "$NetBSD: adv_cardbus.c,v 1.21 2009/05/12 12:11:17 cegger Exp $");
40 40
41#include <sys/param.h> 41#include <sys/param.h>
42#include <sys/systm.h> 42#include <sys/systm.h>
43#include <sys/malloc.h> 43#include <sys/malloc.h>
44#include <sys/kernel.h> 44#include <sys/kernel.h>
45#include <sys/queue.h> 45#include <sys/queue.h>
46#include <sys/device.h> 46#include <sys/device.h>
47 47
48#include <sys/bus.h> 48#include <sys/bus.h>
49#include <sys/intr.h> 49#include <sys/intr.h>
50 50
51#include <dev/scsipi/scsi_all.h> 51#include <dev/scsipi/scsi_all.h>
52#include <dev/scsipi/scsipi_all.h> 52#include <dev/scsipi/scsipi_all.h>
@@ -72,35 +72,35 @@ __KERNEL_RCSID(0, "$NetBSD: adv_cardbus. @@ -72,35 +72,35 @@ __KERNEL_RCSID(0, "$NetBSD: adv_cardbus.
72struct adv_cardbus_softc { 72struct adv_cardbus_softc {
73 struct asc_softc sc_adv; /* real ADV */ 73 struct asc_softc sc_adv; /* real ADV */
74 74
75 /* CardBus-specific goo. */ 75 /* CardBus-specific goo. */
76 cardbus_devfunc_t sc_ct; /* our CardBus devfuncs */ 76 cardbus_devfunc_t sc_ct; /* our CardBus devfuncs */
77 cardbus_intr_line_t sc_intrline; /* our interrupt line */ 77 cardbus_intr_line_t sc_intrline; /* our interrupt line */
78 cardbustag_t sc_tag; 78 cardbustag_t sc_tag;
79 79
80 int sc_cbenable; /* what CardBus access type to enable */ 80 int sc_cbenable; /* what CardBus access type to enable */
81 int sc_csr; /* CSR bits */ 81 int sc_csr; /* CSR bits */
82 bus_size_t sc_size; 82 bus_size_t sc_size;
83}; 83};
84 84
85int adv_cardbus_match(struct device *, struct cfdata *, void *); 85int adv_cardbus_match(struct device *, cfdata_t, void *);
86void adv_cardbus_attach(struct device *, struct device *, void *); 86void adv_cardbus_attach(struct device *, struct device *, void *);
87int adv_cardbus_detach(struct device *, int); 87int adv_cardbus_detach(struct device *, int);
88 88
89CFATTACH_DECL(adv_cardbus, sizeof(struct adv_cardbus_softc), 89CFATTACH_DECL(adv_cardbus, sizeof(struct adv_cardbus_softc),
90 adv_cardbus_match, adv_cardbus_attach, adv_cardbus_detach, NULL); 90 adv_cardbus_match, adv_cardbus_attach, adv_cardbus_detach, NULL);
91 91
92int 92int
93adv_cardbus_match(struct device *parent, struct cfdata *match, 93adv_cardbus_match(struct device *parent, cfdata_t match,
94 void *aux) 94 void *aux)
95{ 95{
96 struct cardbus_attach_args *ca = aux; 96 struct cardbus_attach_args *ca = aux;
97 97
98 if (CARDBUS_VENDOR(ca->ca_id) == PCI_VENDOR_ADVSYS && 98 if (CARDBUS_VENDOR(ca->ca_id) == PCI_VENDOR_ADVSYS &&
99 CARDBUS_PRODUCT(ca->ca_id) == PCI_PRODUCT_ADVSYS_ULTRA) 99 CARDBUS_PRODUCT(ca->ca_id) == PCI_PRODUCT_ADVSYS_ULTRA)
100 return (1); 100 return (1);
101 101
102 return (0); 102 return (0);
103} 103}
104 104
105void 105void
106adv_cardbus_attach(struct device *parent, struct device *self, 106adv_cardbus_attach(struct device *parent, struct device *self,

cvs diff -r1.96 -r1.97 src/sys/dev/cardbus/cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/cardbus.c 2009/04/02 00:09:33 1.96
+++ src/sys/dev/cardbus/cardbus.c 2009/05/12 12:11:17 1.97
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cardbus.c,v 1.96 2009/04/02 00:09:33 dyoung Exp $ */ 1/* $NetBSD: cardbus.c,v 1.97 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1997, 1998, 1999 and 2000 4 * Copyright (c) 1997, 1998, 1999 and 2000
5 * HAYAKAWA Koichi. All rights reserved. 5 * HAYAKAWA Koichi. 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.
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 25 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE. 32 * POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.96 2009/04/02 00:09:33 dyoung Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: cardbus.c,v 1.97 2009/05/12 12:11:17 cegger Exp $");
37 37
38#include "opt_cardbus.h" 38#include "opt_cardbus.h"
39 39
40#include <sys/param.h> 40#include <sys/param.h>
41#include <sys/systm.h> 41#include <sys/systm.h>
42#include <sys/device.h> 42#include <sys/device.h>
43#include <sys/malloc.h> 43#include <sys/malloc.h>
44#include <sys/kernel.h> 44#include <sys/kernel.h>
45#include <sys/syslog.h> 45#include <sys/syslog.h>
46#include <sys/proc.h> 46#include <sys/proc.h>
47#include <sys/reboot.h> /* for AB_* needed by bootverbose */ 47#include <sys/reboot.h> /* for AB_* needed by bootverbose */
48 48
49#include <sys/bus.h> 49#include <sys/bus.h>
@@ -61,27 +61,27 @@ __KERNEL_RCSID(0, "$NetBSD: cardbus.c,v  @@ -61,27 +61,27 @@ __KERNEL_RCSID(0, "$NetBSD: cardbus.c,v
61#include "locators.h" 61#include "locators.h"
62 62
63#if defined CARDBUS_DEBUG 63#if defined CARDBUS_DEBUG
64#define STATIC 64#define STATIC
65#define DPRINTF(a) printf a 65#define DPRINTF(a) printf a
66#else 66#else
67#define STATIC static 67#define STATIC static
68#define DPRINTF(a) 68#define DPRINTF(a)
69#endif 69#endif
70 70
71 71
72STATIC void cardbusattach(device_t, device_t, void *); 72STATIC void cardbusattach(device_t, device_t, void *);
73STATIC int cardbusdetach(device_t, int); 73STATIC int cardbusdetach(device_t, int);
74STATIC int cardbusmatch(device_t, struct cfdata *, void *); 74STATIC int cardbusmatch(device_t, cfdata_t, void *);
75int cardbus_rescan(device_t, const char *, const int *); 75int cardbus_rescan(device_t, const char *, const int *);
76void cardbus_childdetached(device_t, device_t); 76void cardbus_childdetached(device_t, device_t);
77static int cardbusprint(void *, const char *); 77static int cardbusprint(void *, const char *);
78 78
79typedef void (*tuple_decode_func)(u_int8_t*, int, void*); 79typedef void (*tuple_decode_func)(u_int8_t*, int, void*);
80 80
81static int decode_tuples(u_int8_t *, int, tuple_decode_func, void*); 81static int decode_tuples(u_int8_t *, int, tuple_decode_func, void*);
82#ifdef CARDBUS_DEBUG 82#ifdef CARDBUS_DEBUG
83static void print_tuple(u_int8_t*, int, void*); 83static void print_tuple(u_int8_t*, int, void*);
84#endif 84#endif
85 85
86static int cardbus_read_tuples(struct cardbus_attach_args *, 86static int cardbus_read_tuples(struct cardbus_attach_args *,
87 cardbusreg_t, u_int8_t *, size_t); 87 cardbusreg_t, u_int8_t *, size_t);
@@ -93,27 +93,27 @@ static bool cardbus_child_register(devic @@ -93,27 +93,27 @@ static bool cardbus_child_register(devic
93 93
94CFATTACH_DECL3_NEW(cardbus, sizeof(struct cardbus_softc), 94CFATTACH_DECL3_NEW(cardbus, sizeof(struct cardbus_softc),
95 cardbusmatch, cardbusattach, cardbusdetach, NULL, 95 cardbusmatch, cardbusattach, cardbusdetach, NULL,
96 cardbus_rescan, cardbus_childdetached, DVF_DETACH_SHUTDOWN); 96 cardbus_rescan, cardbus_childdetached, DVF_DETACH_SHUTDOWN);
97 97
98#ifndef __NetBSD_Version__ 98#ifndef __NetBSD_Version__
99struct cfdriver cardbus_cd = { 99struct cfdriver cardbus_cd = {
100 NULL, "cardbus", DV_DULL 100 NULL, "cardbus", DV_DULL
101}; 101};
102#endif 102#endif
103 103
104 104
105STATIC int 105STATIC int
106cardbusmatch(device_t parent, struct cfdata *cf, void *aux) 106cardbusmatch(device_t parent, cfdata_t cf, void *aux)
107{ 107{
108 108
109 return (1); 109 return (1);
110} 110}
111 111
112STATIC void 112STATIC void
113cardbusattach(device_t parent, device_t self, void *aux) 113cardbusattach(device_t parent, device_t self, void *aux)
114{ 114{
115 struct cardbus_softc *sc = device_private(self); 115 struct cardbus_softc *sc = device_private(self);
116 struct cbslot_attach_args *cba = aux; 116 struct cbslot_attach_args *cba = aux;
117 117
118 sc->sc_dev = self; 118 sc->sc_dev = self;
119 119

cvs diff -r1.47 -r1.48 src/sys/dev/cardbus/cardslot.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/cardslot.c 2009/04/02 00:09:33 1.47
+++ src/sys/dev/cardbus/cardslot.c 2009/05/12 12:11:17 1.48
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cardslot.c,v 1.47 2009/04/02 00:09:33 dyoung Exp $ */ 1/* $NetBSD: cardslot.c,v 1.48 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999 and 2000 4 * Copyright (c) 1999 and 2000
5 * HAYAKAWA Koichi. All rights reserved. 5 * HAYAKAWA Koichi. 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.
@@ -23,27 +23,27 @@ @@ -23,27 +23,27 @@
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 25 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE. 32 * POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.47 2009/04/02 00:09:33 dyoung Exp $"); 36__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.48 2009/05/12 12:11:17 cegger Exp $");
37 37
38#include "opt_cardslot.h" 38#include "opt_cardslot.h"
39 39
40#include <sys/param.h> 40#include <sys/param.h>
41#include <sys/systm.h> 41#include <sys/systm.h>
42#include <sys/device.h> 42#include <sys/device.h>
43#include <sys/malloc.h> 43#include <sys/malloc.h>
44#include <sys/kernel.h> 44#include <sys/kernel.h>
45#include <sys/syslog.h> 45#include <sys/syslog.h>
46#include <sys/kthread.h> 46#include <sys/kthread.h>
47 47
48#include <sys/bus.h> 48#include <sys/bus.h>
49 49
@@ -57,40 +57,40 @@ __KERNEL_RCSID(0, "$NetBSD: cardslot.c,v @@ -57,40 +57,40 @@ __KERNEL_RCSID(0, "$NetBSD: cardslot.c,v
57#if defined CARDSLOT_DEBUG 57#if defined CARDSLOT_DEBUG
58#define STATIC 58#define STATIC
59#define DPRINTF(a) printf a 59#define DPRINTF(a) printf a
60#else 60#else
61#define STATIC static 61#define STATIC static
62#define DPRINTF(a) 62#define DPRINTF(a)
63#endif 63#endif
64 64
65 65
66 66
67STATIC void cardslotattach(struct device *, struct device *, void *); 67STATIC void cardslotattach(struct device *, struct device *, void *);
68STATIC int cardslotdetach(device_t, int); 68STATIC int cardslotdetach(device_t, int);
69 69
70STATIC int cardslotmatch(struct device *, struct cfdata *, void *); 70STATIC int cardslotmatch(struct device *, cfdata_t, void *);
71static void cardslot_event_thread(void *arg); 71static void cardslot_event_thread(void *arg);
72 72
73STATIC int cardslot_cb_print(void *aux, const char *pcic); 73STATIC int cardslot_cb_print(void *aux, const char *pcic);
74static int cardslot_16_print(void *, const char *); 74static int cardslot_16_print(void *, const char *);
75static int cardslot_16_submatch(struct device *, struct cfdata *, 75static int cardslot_16_submatch(struct device *, cfdata_t,
76 const int *, void *); 76 const int *, void *);
77 77
78CFATTACH_DECL3_NEW(cardslot, sizeof(struct cardslot_softc), 78CFATTACH_DECL3_NEW(cardslot, sizeof(struct cardslot_softc),
79 cardslotmatch, cardslotattach, cardslotdetach, NULL, NULL, NULL, 79 cardslotmatch, cardslotattach, cardslotdetach, NULL, NULL, NULL,
80 DVF_DETACH_SHUTDOWN); 80 DVF_DETACH_SHUTDOWN);
81 81
82STATIC int 82STATIC int
83cardslotmatch(struct device *parent, struct cfdata *cf, 83cardslotmatch(struct device *parent, cfdata_t cf,
84 void *aux) 84 void *aux)
85{ 85{
86 struct cardslot_attach_args *caa = aux; 86 struct cardslot_attach_args *caa = aux;
87 87
88 if (caa->caa_cb_attach == NULL && caa->caa_16_attach == NULL) { 88 if (caa->caa_cb_attach == NULL && caa->caa_16_attach == NULL) {
89 /* Neither CardBus nor 16-bit PCMCIA are defined. */ 89 /* Neither CardBus nor 16-bit PCMCIA are defined. */
90 return 0; 90 return 0;
91 } 91 }
92 92
93 return 1; 93 return 1;
94} 94}
95 95
96 96
@@ -194,27 +194,27 @@ cardslot_cb_print(void *aux, const char  @@ -194,27 +194,27 @@ cardslot_cb_print(void *aux, const char
194{ 194{
195 struct cbslot_attach_args *cba = aux; 195 struct cbslot_attach_args *cba = aux;
196 196
197 if (pnp != NULL) { 197 if (pnp != NULL) {
198 aprint_normal("cardbus at %s subordinate bus %d", 198 aprint_normal("cardbus at %s subordinate bus %d",
199 pnp, cba->cba_bus); 199 pnp, cba->cba_bus);
200 } 200 }
201 201
202 return UNCONF; 202 return UNCONF;
203} 203}
204 204
205 205
206static int 206static int
207cardslot_16_submatch(struct device *parent, struct cfdata *cf, 207cardslot_16_submatch(struct device *parent, cfdata_t cf,
208 const int *ldesc, void *aux) 208 const int *ldesc, void *aux)
209{ 209{
210 210
211 if (cf->cf_loc[PCMCIABUSCF_CONTROLLER] != PCMCIABUSCF_CONTROLLER_DEFAULT 211 if (cf->cf_loc[PCMCIABUSCF_CONTROLLER] != PCMCIABUSCF_CONTROLLER_DEFAULT
212 && cf->cf_loc[PCMCIABUSCF_CONTROLLER] != 0) { 212 && cf->cf_loc[PCMCIABUSCF_CONTROLLER] != 0) {
213 return 0; 213 return 0;
214 } 214 }
215 215
216 if ((cf->cf_loc[PCMCIABUSCF_CONTROLLER] == PCMCIABUSCF_CONTROLLER_DEFAULT)) { 216 if ((cf->cf_loc[PCMCIABUSCF_CONTROLLER] == PCMCIABUSCF_CONTROLLER_DEFAULT)) {
217 return (config_match(parent, cf, aux)); 217 return (config_match(parent, cf, aux));
218 } 218 }
219 219
220 return 0; 220 return 0;

cvs diff -r1.22 -r1.23 src/sys/dev/cardbus/ehci_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/ehci_cardbus.c 2008/06/24 19:44:52 1.22
+++ src/sys/dev/cardbus/ehci_cardbus.c 2009/05/12 12:11:17 1.23
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ehci_cardbus.c,v 1.22 2008/06/24 19:44:52 drochner Exp $ */ 1/* $NetBSD: ehci_cardbus.c,v 1.23 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart@augustsson.net) at 8 * by Lennart Augustsson (lennart@augustsson.net) at
9 * Carlstedt Research & Technology. 9 * Carlstedt Research & Technology.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE. 30 * POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.22 2008/06/24 19:44:52 drochner Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: ehci_cardbus.c,v 1.23 2009/05/12 12:11:17 cegger Exp $");
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/kernel.h> 38#include <sys/kernel.h>
39#include <sys/device.h> 39#include <sys/device.h>
40#include <sys/proc.h> 40#include <sys/proc.h>
41 41
42#include <sys/bus.h> 42#include <sys/bus.h>
43 43
44#if defined pciinc 44#if defined pciinc
45#include <dev/pci/pcidevs.h> 45#include <dev/pci/pcidevs.h>
46#endif 46#endif
47 47
@@ -55,51 +55,51 @@ __KERNEL_RCSID(0, "$NetBSD: ehci_cardbus @@ -55,51 +55,51 @@ __KERNEL_RCSID(0, "$NetBSD: ehci_cardbus
55#include <dev/usb/usbdivar.h> 55#include <dev/usb/usbdivar.h>
56#include <dev/usb/usb_mem.h> 56#include <dev/usb/usb_mem.h>
57 57
58#include <dev/usb/ehcireg.h> 58#include <dev/usb/ehcireg.h>
59#include <dev/usb/ehcivar.h> 59#include <dev/usb/ehcivar.h>
60 60
61#ifdef EHCI_DEBUG 61#ifdef EHCI_DEBUG
62#define DPRINTF(x) if (ehcidebug) printf x 62#define DPRINTF(x) if (ehcidebug) printf x
63extern int ehcidebug; 63extern int ehcidebug;
64#else 64#else
65#define DPRINTF(x) 65#define DPRINTF(x)
66#endif 66#endif
67 67
68int ehci_cardbus_match(device_t, struct cfdata *, void *); 68int ehci_cardbus_match(device_t, cfdata_t, void *);
69void ehci_cardbus_attach(device_t, device_t, void *); 69void ehci_cardbus_attach(device_t, device_t, void *);
70int ehci_cardbus_detach(device_t, int); 70int ehci_cardbus_detach(device_t, int);
71 71
72struct ehci_cardbus_softc { 72struct ehci_cardbus_softc {
73 ehci_softc_t sc; 73 ehci_softc_t sc;
74 cardbus_chipset_tag_t sc_cc; 74 cardbus_chipset_tag_t sc_cc;
75 cardbus_function_tag_t sc_cf; 75 cardbus_function_tag_t sc_cf;
76 cardbus_devfunc_t sc_ct; 76 cardbus_devfunc_t sc_ct;
77 void *sc_ih; /* interrupt vectoring */ 77 void *sc_ih; /* interrupt vectoring */
78}; 78};
79 79
80CFATTACH_DECL_NEW(ehci_cardbus, sizeof(struct ehci_cardbus_softc), 80CFATTACH_DECL_NEW(ehci_cardbus, sizeof(struct ehci_cardbus_softc),
81 ehci_cardbus_match, ehci_cardbus_attach, ehci_cardbus_detach, ehci_activate); 81 ehci_cardbus_match, ehci_cardbus_attach, ehci_cardbus_detach, ehci_activate);
82 82
83#define CARDBUS_INTERFACE_EHCI PCI_INTERFACE_EHCI 83#define CARDBUS_INTERFACE_EHCI PCI_INTERFACE_EHCI
84#define CARDBUS_CBMEM PCI_CBMEM 84#define CARDBUS_CBMEM PCI_CBMEM
85#define cardbus_findvendor pci_findvendor 85#define cardbus_findvendor pci_findvendor
86#define cardbus_devinfo pci_devinfo 86#define cardbus_devinfo pci_devinfo
87 87
88static TAILQ_HEAD(, usb_cardbus) ehci_cardbus_alldevs = 88static TAILQ_HEAD(, usb_cardbus) ehci_cardbus_alldevs =
89 TAILQ_HEAD_INITIALIZER(ehci_cardbus_alldevs); 89 TAILQ_HEAD_INITIALIZER(ehci_cardbus_alldevs);
90 90
91int 91int
92ehci_cardbus_match(device_t parent, struct cfdata *match, void *aux) 92ehci_cardbus_match(device_t parent, cfdata_t match, void *aux)
93{ 93{
94 struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux; 94 struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux;
95 95
96 if (CARDBUS_CLASS(ca->ca_class) == CARDBUS_CLASS_SERIALBUS && 96 if (CARDBUS_CLASS(ca->ca_class) == CARDBUS_CLASS_SERIALBUS &&
97 CARDBUS_SUBCLASS(ca->ca_class) == CARDBUS_SUBCLASS_SERIALBUS_USB && 97 CARDBUS_SUBCLASS(ca->ca_class) == CARDBUS_SUBCLASS_SERIALBUS_USB &&
98 CARDBUS_INTERFACE(ca->ca_class) == CARDBUS_INTERFACE_EHCI) 98 CARDBUS_INTERFACE(ca->ca_class) == CARDBUS_INTERFACE_EHCI)
99 return (1); 99 return (1);
100 100
101 return (0); 101 return (0);
102} 102}
103 103
104static bool 104static bool
105ehci_cardbus_suspend(device_t dv PMF_FN_ARGS) 105ehci_cardbus_suspend(device_t dv PMF_FN_ARGS)

cvs diff -r1.26 -r1.27 src/sys/dev/cardbus/fwohci_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/fwohci_cardbus.c 2008/07/11 17:50:45 1.26
+++ src/sys/dev/cardbus/fwohci_cardbus.c 2009/05/12 12:11:17 1.27
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: fwohci_cardbus.c,v 1.26 2008/07/11 17:50:45 kiyohara Exp $ */ 1/* $NetBSD: fwohci_cardbus.c,v 1.27 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas of 3am Software Foundry. 8 * by Matt Thomas of 3am Software Foundry.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: fwohci_cardbus.c,v 1.26 2008/07/11 17:50:45 kiyohara Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: fwohci_cardbus.c,v 1.27 2009/05/12 12:11:17 cegger 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/socket.h> 37#include <sys/socket.h>
38#include <sys/device.h> 38#include <sys/device.h>
39#include <sys/select.h> 39#include <sys/select.h>
40 40
41#include <sys/bus.h> 41#include <sys/bus.h>
42 42
43#if defined pciinc 43#if defined pciinc
44#include <dev/pci/pcidevs.h> 44#include <dev/pci/pcidevs.h>
45#endif 45#endif
46 46
@@ -52,40 +52,40 @@ __KERNEL_RCSID(0, "$NetBSD: fwohci_cardb @@ -52,40 +52,40 @@ __KERNEL_RCSID(0, "$NetBSD: fwohci_cardb
52#include <dev/ieee1394/firewirereg.h> 52#include <dev/ieee1394/firewirereg.h>
53#include <dev/ieee1394/fwdma.h> 53#include <dev/ieee1394/fwdma.h>
54#include <dev/ieee1394/fwohcireg.h> 54#include <dev/ieee1394/fwohcireg.h>
55#include <dev/ieee1394/fwohcivar.h> 55#include <dev/ieee1394/fwohcivar.h>
56 56
57struct fwohci_cardbus_softc { 57struct fwohci_cardbus_softc {
58 struct fwohci_softc sc_sc; 58 struct fwohci_softc sc_sc;
59 cardbus_chipset_tag_t sc_cc; 59 cardbus_chipset_tag_t sc_cc;
60 cardbus_function_tag_t sc_cf; 60 cardbus_function_tag_t sc_cf;
61 cardbus_devfunc_t sc_ct; 61 cardbus_devfunc_t sc_ct;
62 void *sc_ih; 62 void *sc_ih;
63}; 63};
64 64
65static int fwohci_cardbus_match(device_t, struct cfdata *, void *); 65static int fwohci_cardbus_match(device_t, cfdata_t, void *);
66static void fwohci_cardbus_attach(device_t, device_t, void *); 66static void fwohci_cardbus_attach(device_t, device_t, void *);
67static int fwohci_cardbus_detach(device_t, int); 67static int fwohci_cardbus_detach(device_t, int);
68 68
69CFATTACH_DECL_NEW(fwohci_cardbus, sizeof(struct fwohci_cardbus_softc), 69CFATTACH_DECL_NEW(fwohci_cardbus, sizeof(struct fwohci_cardbus_softc),
70 fwohci_cardbus_match, fwohci_cardbus_attach, 70 fwohci_cardbus_match, fwohci_cardbus_attach,
71 fwohci_cardbus_detach, NULL); 71 fwohci_cardbus_detach, NULL);
72 72
73#define CARDBUS_INTERFACE_OHCI PCI_INTERFACE_OHCI 73#define CARDBUS_INTERFACE_OHCI PCI_INTERFACE_OHCI
74#define CARDBUS_OHCI_MAP_REGISTER PCI_OHCI_MAP_REGISTER 74#define CARDBUS_OHCI_MAP_REGISTER PCI_OHCI_MAP_REGISTER
75#define cardbus_devinfo pci_devinfo 75#define cardbus_devinfo pci_devinfo
76 76
77static int 77static int
78fwohci_cardbus_match(device_t parent, struct cfdata *match, void *aux) 78fwohci_cardbus_match(device_t parent, cfdata_t match, void *aux)
79{ 79{
80 struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux; 80 struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux;
81 81
82 if (CARDBUS_CLASS(ca->ca_class) == CARDBUS_CLASS_SERIALBUS && 82 if (CARDBUS_CLASS(ca->ca_class) == CARDBUS_CLASS_SERIALBUS &&
83 CARDBUS_SUBCLASS(ca->ca_class) == 83 CARDBUS_SUBCLASS(ca->ca_class) ==
84 CARDBUS_SUBCLASS_SERIALBUS_FIREWIRE && 84 CARDBUS_SUBCLASS_SERIALBUS_FIREWIRE &&
85 CARDBUS_INTERFACE(ca->ca_class) == CARDBUS_INTERFACE_OHCI) 85 CARDBUS_INTERFACE(ca->ca_class) == CARDBUS_INTERFACE_OHCI)
86 return 1; 86 return 1;
87 87
88 return 0; 88 return 0;
89} 89}
90 90
91static void 91static void

cvs diff -r1.32 -r1.33 src/sys/dev/cardbus/if_ath_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/if_ath_cardbus.c 2008/12/11 05:45:29 1.32
+++ src/sys/dev/cardbus/if_ath_cardbus.c 2009/05/12 12:11:17 1.33
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_ath_cardbus.c,v 1.32 2008/12/11 05:45:29 alc Exp $ */ 1/* $NetBSD: if_ath_cardbus.c,v 1.33 2009/05/12 12:11:17 cegger Exp $ */
2/* 2/*
3 * Copyright (c) 2003 3 * Copyright (c) 2003
4 * Ichiro FUKUHARA <ichiro@ichiro.org>. 4 * Ichiro FUKUHARA <ichiro@ichiro.org>.
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.
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE. 32 * SUCH DAMAGE.
33 */ 33 */
34/* 34/*
35 * CardBus bus front-end for the AR5001 Wireless LAN 802.11a/b/g CardBus. 35 * CardBus bus front-end for the AR5001 Wireless LAN 802.11a/b/g CardBus.
36 */ 36 */
37 37
38#include <sys/cdefs.h> 38#include <sys/cdefs.h>
39__KERNEL_RCSID(0, "$NetBSD: if_ath_cardbus.c,v 1.32 2008/12/11 05:45:29 alc Exp $"); 39__KERNEL_RCSID(0, "$NetBSD: if_ath_cardbus.c,v 1.33 2009/05/12 12:11:17 cegger Exp $");
40 40
41#include "opt_inet.h" 41#include "opt_inet.h"
42#include "bpfilter.h" 42#include "bpfilter.h"
43 43
44#include <sys/param.h> 44#include <sys/param.h>
45#include <sys/systm.h> 45#include <sys/systm.h>
46#include <sys/mbuf.h> 46#include <sys/mbuf.h>
47#include <sys/malloc.h> 47#include <sys/malloc.h>
48#include <sys/kernel.h> 48#include <sys/kernel.h>
49#include <sys/socket.h> 49#include <sys/socket.h>
50#include <sys/ioctl.h> 50#include <sys/ioctl.h>
51#include <sys/errno.h> 51#include <sys/errno.h>
52#include <sys/device.h> 52#include <sys/device.h>
@@ -142,27 +142,27 @@ ath_cardbus_resume(device_t self PMF_FN_ @@ -142,27 +142,27 @@ ath_cardbus_resume(device_t self PMF_FN_
142 csc->sc_ct->ct_cf, csc->sc_intrline, IPL_NET, ath_intr, 142 csc->sc_ct->ct_cf, csc->sc_intrline, IPL_NET, ath_intr,
143 &csc->sc_ath); 143 &csc->sc_ath);
144 144
145 if (csc->sc_ih == NULL) { 145 if (csc->sc_ih == NULL) {
146 aprint_error_dev(self, 146 aprint_error_dev(self,
147 "unable to establish interrupt\n"); 147 "unable to establish interrupt\n");
148 return false; 148 return false;
149 } 149 }
150 150
151 return ath_resume(&csc->sc_ath); 151 return ath_resume(&csc->sc_ath);
152} 152}
153 153
154int 154int
155ath_cardbus_match(device_t parent, struct cfdata *match, void *aux) 155ath_cardbus_match(device_t parent, cfdata_t match, void *aux)
156{ 156{
157 struct cardbus_attach_args *ca = aux; 157 struct cardbus_attach_args *ca = aux;
158 const char *devname; 158 const char *devname;
159 159
160 devname = ath_hal_probe(PCI_VENDOR(ca->ca_id), PCI_PRODUCT(ca->ca_id)); 160 devname = ath_hal_probe(PCI_VENDOR(ca->ca_id), PCI_PRODUCT(ca->ca_id));
161 161
162 if (devname) 162 if (devname)
163 return 1; 163 return 1;
164 164
165 return 0; 165 return 0;
166} 166}
167 167
168void 168void

cvs diff -r1.37 -r1.38 src/sys/dev/cardbus/if_fxp_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/if_fxp_cardbus.c 2009/03/07 15:03:25 1.37
+++ src/sys/dev/cardbus/if_fxp_cardbus.c 2009/05/12 12:11:17 1.38
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_fxp_cardbus.c,v 1.37 2009/03/07 15:03:25 tsutsui Exp $ */ 1/* $NetBSD: if_fxp_cardbus.c,v 1.38 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Johan Danielsson. 8 * by Johan Danielsson.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * CardBus front-end for the Intel i82557 family of Ethernet chips. 33 * CardBus front-end for the Intel i82557 family of Ethernet chips.
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.37 2009/03/07 15:03:25 tsutsui Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.38 2009/05/12 12:11:17 cegger Exp $");
38 38
39#include "opt_inet.h" 39#include "opt_inet.h"
40#include "bpfilter.h" 40#include "bpfilter.h"
41#include "rnd.h" 41#include "rnd.h"
42 42
43#include <sys/param.h> 43#include <sys/param.h>
44#include <sys/systm.h> 44#include <sys/systm.h>
45#include <sys/mbuf.h> 45#include <sys/mbuf.h>
46#include <sys/malloc.h> 46#include <sys/malloc.h>
47#include <sys/kernel.h> 47#include <sys/kernel.h>
48#include <sys/socket.h> 48#include <sys/socket.h>
49#include <sys/ioctl.h> 49#include <sys/ioctl.h>
50#include <sys/errno.h> 50#include <sys/errno.h>
@@ -101,27 +101,27 @@ struct fxp_cardbus_softc { @@ -101,27 +101,27 @@ struct fxp_cardbus_softc {
101 bus_size_t size; 101 bus_size_t size;
102}; 102};
103 103
104CFATTACH_DECL_NEW(fxp_cardbus, sizeof(struct fxp_cardbus_softc), 104CFATTACH_DECL_NEW(fxp_cardbus, sizeof(struct fxp_cardbus_softc),
105 fxp_cardbus_match, fxp_cardbus_attach, fxp_cardbus_detach, fxp_activate); 105 fxp_cardbus_match, fxp_cardbus_attach, fxp_cardbus_detach, fxp_activate);
106 106
107#ifdef CBB_DEBUG 107#ifdef CBB_DEBUG
108#define DPRINTF(X) printf X 108#define DPRINTF(X) printf X
109#else 109#else
110#define DPRINTF(X) 110#define DPRINTF(X)
111#endif 111#endif
112 112
113static int 113static int
114fxp_cardbus_match(struct device *parent, struct cfdata *match, 114fxp_cardbus_match(struct device *parent, cfdata_t match,
115 void *aux) 115 void *aux)
116{ 116{
117 struct cardbus_attach_args *ca = aux; 117 struct cardbus_attach_args *ca = aux;
118 118
119 if (CARDBUS_VENDOR(ca->ca_id) == PCI_VENDOR_INTEL && 119 if (CARDBUS_VENDOR(ca->ca_id) == PCI_VENDOR_INTEL &&
120 CARDBUS_PRODUCT(ca->ca_id) == PCI_PRODUCT_INTEL_82557) 120 CARDBUS_PRODUCT(ca->ca_id) == PCI_PRODUCT_INTEL_82557)
121 return (1); 121 return (1);
122 122
123 return (0); 123 return (0);
124} 124}
125 125
126static void 126static void
127fxp_cardbus_attach(struct device *parent, struct device *self, 127fxp_cardbus_attach(struct device *parent, struct device *self,

cvs diff -r1.14 -r1.15 src/sys/dev/cardbus/if_ral_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/if_ral_cardbus.c 2008/10/12 02:15:02 1.14
+++ src/sys/dev/cardbus/if_ral_cardbus.c 2009/05/12 12:11:17 1.15
@@ -1,38 +1,38 @@ @@ -1,38 +1,38 @@
1/* $NetBSD: if_ral_cardbus.c,v 1.14 2008/10/12 02:15:02 dholland Exp $ */ 1/* $NetBSD: if_ral_cardbus.c,v 1.15 2009/05/12 12:11:17 cegger Exp $ */
2/* $OpenBSD: if_ral_cardbus.c,v 1.6 2006/01/09 20:03:31 damien Exp $ */ 2/* $OpenBSD: if_ral_cardbus.c,v 1.6 2006/01/09 20:03:31 damien Exp $ */
3 3
4/*- 4/*-
5 * Copyright (c) 2005, 2006 5 * Copyright (c) 2005, 2006
6 * Damien Bergamini <damien.bergamini@free.fr> 6 * Damien Bergamini <damien.bergamini@free.fr>
7 * 7 *
8 * Permission to use, copy, modify, and distribute this software for any 8 * Permission to use, copy, modify, and distribute this software for any
9 * purpose with or without fee is hereby granted, provided that the above 9 * purpose with or without fee is hereby granted, provided that the above
10 * copyright notice and this permission notice appear in all copies. 10 * copyright notice and this permission notice appear in all copies.
11 * 11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 17 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 */ 19 */
20 20
21/* 21/*
22 * CardBus front-end for the Ralink RT2560/RT2561/RT2561S/RT2661 driver. 22 * CardBus front-end for the Ralink RT2560/RT2561/RT2561S/RT2661 driver.
23 */ 23 */
24#include <sys/cdefs.h> 24#include <sys/cdefs.h>
25__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.14 2008/10/12 02:15:02 dholland Exp $"); 25__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.15 2009/05/12 12:11:17 cegger Exp $");
26 26
27#include "bpfilter.h" 27#include "bpfilter.h"
28 28
29#include <sys/param.h> 29#include <sys/param.h>
30#include <sys/sockio.h> 30#include <sys/sockio.h>
31#include <sys/mbuf.h> 31#include <sys/mbuf.h>
32#include <sys/kernel.h> 32#include <sys/kernel.h>
33#include <sys/socket.h> 33#include <sys/socket.h>
34#include <sys/systm.h> 34#include <sys/systm.h>
35#include <sys/malloc.h> 35#include <sys/malloc.h>
36#include <sys/callout.h> 36#include <sys/callout.h>
37#include <sys/device.h> 37#include <sys/device.h>
38 38
@@ -83,41 +83,41 @@ struct ral_cardbus_softc { @@ -83,41 +83,41 @@ struct ral_cardbus_softc {
83 } u; 83 } u;
84#define sc_sc u.sc_rt2560 84#define sc_sc u.sc_rt2560
85 85
86 /* cardbus specific goo */ 86 /* cardbus specific goo */
87 struct ral_opns *sc_opns; 87 struct ral_opns *sc_opns;
88 cardbus_devfunc_t sc_ct; 88 cardbus_devfunc_t sc_ct;
89 cardbustag_t sc_tag; 89 cardbustag_t sc_tag;
90 void *sc_ih; 90 void *sc_ih;
91 bus_size_t sc_mapsize; 91 bus_size_t sc_mapsize;
92 pcireg_t sc_bar_val; 92 pcireg_t sc_bar_val;
93 cardbus_intr_line_t sc_intrline; 93 cardbus_intr_line_t sc_intrline;
94}; 94};
95 95
96int ral_cardbus_match(struct device *, struct cfdata *, void *); 96int ral_cardbus_match(struct device *, cfdata_t, void *);
97void ral_cardbus_attach(struct device *, struct device *, void *); 97void ral_cardbus_attach(struct device *, struct device *, void *);
98int ral_cardbus_detach(struct device *, int); 98int ral_cardbus_detach(struct device *, int);
99 99
100CFATTACH_DECL(ral_cardbus, sizeof (struct ral_cardbus_softc), 100CFATTACH_DECL(ral_cardbus, sizeof (struct ral_cardbus_softc),
101 ral_cardbus_match, ral_cardbus_attach, ral_cardbus_detach, NULL); 101 ral_cardbus_match, ral_cardbus_attach, ral_cardbus_detach, NULL);
102 102
103int ral_cardbus_enable(struct rt2560_softc *); 103int ral_cardbus_enable(struct rt2560_softc *);
104void ral_cardbus_disable(struct rt2560_softc *); 104void ral_cardbus_disable(struct rt2560_softc *);
105void ral_cardbus_power(struct rt2560_softc *, int); 105void ral_cardbus_power(struct rt2560_softc *, int);
106void ral_cardbus_setup(struct ral_cardbus_softc *); 106void ral_cardbus_setup(struct ral_cardbus_softc *);
107 107
108int 108int
109ral_cardbus_match(struct device *parent, 109ral_cardbus_match(struct device *parent,
110 struct cfdata *cfdata, void *aux) 110 cfdata_t cfdata, void *aux)
111{ 111{
112 struct cardbus_attach_args *ca = aux; 112 struct cardbus_attach_args *ca = aux;
113 113
114 if (PCI_VENDOR(ca->ca_id) == PCI_VENDOR_RALINK) { 114 if (PCI_VENDOR(ca->ca_id) == PCI_VENDOR_RALINK) {
115 switch (PCI_PRODUCT(ca->ca_id)) { 115 switch (PCI_PRODUCT(ca->ca_id)) {
116 case PCI_PRODUCT_RALINK_RT2560: 116 case PCI_PRODUCT_RALINK_RT2560:
117 case PCI_PRODUCT_RALINK_RT2561: 117 case PCI_PRODUCT_RALINK_RT2561:
118 case PCI_PRODUCT_RALINK_RT2561S: 118 case PCI_PRODUCT_RALINK_RT2561S:
119 case PCI_PRODUCT_RALINK_RT2661: 119 case PCI_PRODUCT_RALINK_RT2661:
120 return 1; 120 return 1;
121 default: 121 default:
122 return 0; 122 return 0;
123 } 123 }

cvs diff -r1.28 -r1.29 src/sys/dev/cardbus/if_rtw_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/if_rtw_cardbus.c 2009/02/06 01:55:19 1.28
+++ src/sys/dev/cardbus/if_rtw_cardbus.c 2009/05/12 12:11:17 1.29
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_rtw_cardbus.c,v 1.28 2009/02/06 01:55:19 dyoung Exp $ */ 1/* $NetBSD: if_rtw_cardbus.c,v 1.29 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2004, 2005 David Young. All rights reserved. 4 * Copyright (c) 2004, 2005 David Young. All rights reserved.
5 * 5 *
6 * Adapted for the RTL8180 by David Young. 6 * Adapted for the RTL8180 by David Young.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -57,27 +57,27 @@ @@ -57,27 +57,27 @@
57 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 57 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
58 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 58 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
59 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 59 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
60 * POSSIBILITY OF SUCH DAMAGE. 60 * POSSIBILITY OF SUCH DAMAGE.
61 */ 61 */
62 62
63/* 63/*
64 * Cardbus front-end for the Realtek RTL8180 802.11 MAC/BBP driver. 64 * Cardbus front-end for the Realtek RTL8180 802.11 MAC/BBP driver.
65 * 65 *
66 * TBD factor with atw, tlp Cardbus front-ends? 66 * TBD factor with atw, tlp Cardbus front-ends?
67 */ 67 */
68 68
69#include <sys/cdefs.h> 69#include <sys/cdefs.h>
70__KERNEL_RCSID(0, "$NetBSD: if_rtw_cardbus.c,v 1.28 2009/02/06 01:55:19 dyoung Exp $"); 70__KERNEL_RCSID(0, "$NetBSD: if_rtw_cardbus.c,v 1.29 2009/05/12 12:11:17 cegger Exp $");
71 71
72#include "opt_inet.h" 72#include "opt_inet.h"
73#include "bpfilter.h" 73#include "bpfilter.h"
74 74
75#include <sys/param.h> 75#include <sys/param.h>
76#include <sys/systm.h> 76#include <sys/systm.h>
77#include <sys/mbuf.h> 77#include <sys/mbuf.h>
78#include <sys/malloc.h> 78#include <sys/malloc.h>
79#include <sys/kernel.h> 79#include <sys/kernel.h>
80#include <sys/socket.h> 80#include <sys/socket.h>
81#include <sys/ioctl.h> 81#include <sys/ioctl.h>
82#include <sys/errno.h> 82#include <sys/errno.h>
83#include <sys/device.h> 83#include <sys/device.h>
@@ -130,27 +130,27 @@ struct rtw_cardbus_softc { @@ -130,27 +130,27 @@ struct rtw_cardbus_softc {
130 cardbus_devfunc_t sc_ct; /* our CardBus devfuncs */ 130 cardbus_devfunc_t sc_ct; /* our CardBus devfuncs */
131 cardbustag_t sc_tag; /* our CardBus tag */ 131 cardbustag_t sc_tag; /* our CardBus tag */
132 int sc_csr; /* CSR bits */ 132 int sc_csr; /* CSR bits */
133 bus_size_t sc_mapsize; /* size of the mapped bus space 133 bus_size_t sc_mapsize; /* size of the mapped bus space
134 * region 134 * region
135 */ 135 */
136 136
137 int sc_bar_reg; /* which BAR to use */ 137 int sc_bar_reg; /* which BAR to use */
138 pcireg_t sc_bar_val; /* value of the BAR */ 138 pcireg_t sc_bar_val; /* value of the BAR */
139 139
140 cardbus_intr_line_t sc_intrline; /* interrupt line */ 140 cardbus_intr_line_t sc_intrline; /* interrupt line */
141}; 141};
142 142
143int rtw_cardbus_match(device_t, struct cfdata *, void *); 143int rtw_cardbus_match(device_t, cfdata_t, void *);
144void rtw_cardbus_attach(device_t, device_t, void *); 144void rtw_cardbus_attach(device_t, device_t, void *);
145int rtw_cardbus_detach(device_t, int); 145int rtw_cardbus_detach(device_t, int);
146 146
147CFATTACH_DECL_NEW(rtw_cardbus, sizeof(struct rtw_cardbus_softc), 147CFATTACH_DECL_NEW(rtw_cardbus, sizeof(struct rtw_cardbus_softc),
148 rtw_cardbus_match, rtw_cardbus_attach, rtw_cardbus_detach, NULL); 148 rtw_cardbus_match, rtw_cardbus_attach, rtw_cardbus_detach, NULL);
149 149
150void rtw_cardbus_setup(struct rtw_cardbus_softc *); 150void rtw_cardbus_setup(struct rtw_cardbus_softc *);
151 151
152bool rtw_cardbus_resume(device_t PMF_FN_PROTO); 152bool rtw_cardbus_resume(device_t PMF_FN_PROTO);
153bool rtw_cardbus_suspend(device_t PMF_FN_PROTO); 153bool rtw_cardbus_suspend(device_t PMF_FN_PROTO);
154 154
155const struct rtw_cardbus_product *rtw_cardbus_lookup( 155const struct rtw_cardbus_product *rtw_cardbus_lookup(
156 const struct cardbus_attach_args *); 156 const struct cardbus_attach_args *);
@@ -176,27 +176,27 @@ const struct rtw_cardbus_product * @@ -176,27 +176,27 @@ const struct rtw_cardbus_product *
176rtw_cardbus_lookup(const struct cardbus_attach_args *ca) 176rtw_cardbus_lookup(const struct cardbus_attach_args *ca)
177{ 177{
178 const struct rtw_cardbus_product *rcp; 178 const struct rtw_cardbus_product *rcp;
179 179
180 for (rcp = rtw_cardbus_products; rcp->rcp_product_name != NULL; rcp++) { 180 for (rcp = rtw_cardbus_products; rcp->rcp_product_name != NULL; rcp++) {
181 if (PCI_VENDOR(ca->ca_id) == rcp->rcp_vendor && 181 if (PCI_VENDOR(ca->ca_id) == rcp->rcp_vendor &&
182 PCI_PRODUCT(ca->ca_id) == rcp->rcp_product) 182 PCI_PRODUCT(ca->ca_id) == rcp->rcp_product)
183 return rcp; 183 return rcp;
184 } 184 }
185 return NULL; 185 return NULL;
186} 186}
187 187
188int 188int
189rtw_cardbus_match(device_t parent, struct cfdata *match, void *aux) 189rtw_cardbus_match(device_t parent, cfdata_t match, void *aux)
190{ 190{
191 struct cardbus_attach_args *ca = aux; 191 struct cardbus_attach_args *ca = aux;
192 192
193 if (rtw_cardbus_lookup(ca) != NULL) 193 if (rtw_cardbus_lookup(ca) != NULL)
194 return 1; 194 return 1;
195 195
196 return 0; 196 return 0;
197} 197}
198 198
199static void 199static void
200rtw_cardbus_funcregen(struct rtw_regs *regs, int enable) 200rtw_cardbus_funcregen(struct rtw_regs *regs, int enable)
201{ 201{
202 u_int32_t reg; 202 u_int32_t reg;

cvs diff -r1.31 -r1.32 src/sys/dev/cardbus/ohci_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/ohci_cardbus.c 2008/07/11 20:57:51 1.31
+++ src/sys/dev/cardbus/ohci_cardbus.c 2009/05/12 12:11:17 1.32
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ohci_cardbus.c,v 1.31 2008/07/11 20:57:51 dyoung Exp $ */ 1/* $NetBSD: ohci_cardbus.c,v 1.32 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart@augustsson.net) at 8 * by Lennart Augustsson (lennart@augustsson.net) at
9 * Carlstedt Research & Technology. 9 * Carlstedt Research & Technology.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -28,27 +28,27 @@ @@ -28,27 +28,27 @@
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE. 30 * POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33/* 33/*
34 * USB Open Host Controller driver. 34 * USB Open Host Controller driver.
35 * 35 *
36 * OHCI spec: http://www.intel.com/design/usb/ohci11d.pdf 36 * OHCI spec: http://www.intel.com/design/usb/ohci11d.pdf
37 * USB spec: http://www.teleport.com/cgi-bin/mailmerge.cgi/~usb/cgiform.tpl 37 * USB spec: http://www.teleport.com/cgi-bin/mailmerge.cgi/~usb/cgiform.tpl
38 */ 38 */
39 39
40#include <sys/cdefs.h> 40#include <sys/cdefs.h>
41__KERNEL_RCSID(0, "$NetBSD: ohci_cardbus.c,v 1.31 2008/07/11 20:57:51 dyoung Exp $"); 41__KERNEL_RCSID(0, "$NetBSD: ohci_cardbus.c,v 1.32 2009/05/12 12:11:17 cegger Exp $");
42 42
43#include "ehci_cardbus.h" 43#include "ehci_cardbus.h"
44 44
45#include <sys/param.h> 45#include <sys/param.h>
46#include <sys/systm.h> 46#include <sys/systm.h>
47#include <sys/kernel.h> 47#include <sys/kernel.h>
48#include <sys/device.h> 48#include <sys/device.h>
49#include <sys/proc.h> 49#include <sys/proc.h>
50 50
51#include <sys/bus.h> 51#include <sys/bus.h>
52 52
53#if defined pciinc 53#if defined pciinc
54#include <dev/pci/pcidevs.h> 54#include <dev/pci/pcidevs.h>
@@ -57,51 +57,51 @@ __KERNEL_RCSID(0, "$NetBSD: ohci_cardbus @@ -57,51 +57,51 @@ __KERNEL_RCSID(0, "$NetBSD: ohci_cardbus
57#include <dev/cardbus/cardbusvar.h> 57#include <dev/cardbus/cardbusvar.h>
58#include <dev/pci/pcidevs.h> 58#include <dev/pci/pcidevs.h>
59 59
60#include <dev/cardbus/usb_cardbus.h> 60#include <dev/cardbus/usb_cardbus.h>
61 61
62#include <dev/usb/usb.h> 62#include <dev/usb/usb.h>
63#include <dev/usb/usbdi.h> 63#include <dev/usb/usbdi.h>
64#include <dev/usb/usbdivar.h> 64#include <dev/usb/usbdivar.h>
65#include <dev/usb/usb_mem.h> 65#include <dev/usb/usb_mem.h>
66 66
67#include <dev/usb/ohcireg.h> 67#include <dev/usb/ohcireg.h>
68#include <dev/usb/ohcivar.h> 68#include <dev/usb/ohcivar.h>
69 69
70int ohci_cardbus_match(device_t, struct cfdata *, void *); 70int ohci_cardbus_match(device_t, cfdata_t, void *);
71void ohci_cardbus_attach(device_t, device_t, void *); 71void ohci_cardbus_attach(device_t, device_t, void *);
72int ohci_cardbus_detach(device_t, int); 72int ohci_cardbus_detach(device_t, int);
73 73
74struct ohci_cardbus_softc { 74struct ohci_cardbus_softc {
75 ohci_softc_t sc; 75 ohci_softc_t sc;
76#if NEHCI_CARDBUS > 0 76#if NEHCI_CARDBUS > 0
77 struct usb_cardbus sc_cardbus; 77 struct usb_cardbus sc_cardbus;
78#endif 78#endif
79 cardbus_chipset_tag_t sc_cc; 79 cardbus_chipset_tag_t sc_cc;
80 cardbus_function_tag_t sc_cf; 80 cardbus_function_tag_t sc_cf;
81 cardbus_devfunc_t sc_ct; 81 cardbus_devfunc_t sc_ct;
82 void *sc_ih; /* interrupt vectoring */ 82 void *sc_ih; /* interrupt vectoring */
83}; 83};
84 84
85CFATTACH_DECL_NEW(ohci_cardbus, sizeof(struct ohci_cardbus_softc), 85CFATTACH_DECL_NEW(ohci_cardbus, sizeof(struct ohci_cardbus_softc),
86 ohci_cardbus_match, ohci_cardbus_attach, ohci_cardbus_detach, ohci_activate); 86 ohci_cardbus_match, ohci_cardbus_attach, ohci_cardbus_detach, ohci_activate);
87 87
88#define CARDBUS_INTERFACE_OHCI PCI_INTERFACE_OHCI 88#define CARDBUS_INTERFACE_OHCI PCI_INTERFACE_OHCI
89#define CARDBUS_CBMEM PCI_CBMEM 89#define CARDBUS_CBMEM PCI_CBMEM
90#define cardbus_findvendor pci_findvendor 90#define cardbus_findvendor pci_findvendor
91#define cardbus_devinfo pci_devinfo 91#define cardbus_devinfo pci_devinfo
92 92
93int 93int
94ohci_cardbus_match(device_t parent, struct cfdata *match, void *aux) 94ohci_cardbus_match(device_t parent, cfdata_t match, void *aux)
95{ 95{
96 struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux; 96 struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux;
97 97
98 if (CARDBUS_CLASS(ca->ca_class) == CARDBUS_CLASS_SERIALBUS && 98 if (CARDBUS_CLASS(ca->ca_class) == CARDBUS_CLASS_SERIALBUS &&
99 CARDBUS_SUBCLASS(ca->ca_class) == CARDBUS_SUBCLASS_SERIALBUS_USB && 99 CARDBUS_SUBCLASS(ca->ca_class) == CARDBUS_SUBCLASS_SERIALBUS_USB &&
100 CARDBUS_INTERFACE(ca->ca_class) == CARDBUS_INTERFACE_OHCI) 100 CARDBUS_INTERFACE(ca->ca_class) == CARDBUS_INTERFACE_OHCI)
101 return (1); 101 return (1);
102 102
103 return (0); 103 return (0);
104} 104}
105 105
106void 106void
107ohci_cardbus_attach(device_t parent, device_t self, void *aux) 107ohci_cardbus_attach(device_t parent, device_t self, void *aux)

cvs diff -r1.29 -r1.30 src/sys/dev/cardbus/rbus_ppb.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/rbus_ppb.c 2009/03/18 16:00:17 1.29
+++ src/sys/dev/cardbus/rbus_ppb.c 2009/05/12 12:11:17 1.30
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: rbus_ppb.c,v 1.29 2009/03/18 16:00:17 cegger Exp $ */ 1/* $NetBSD: rbus_ppb.c,v 1.30 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Michael Richardson <mcr@sandelman.ottawa.on.ca> 8 * by Michael Richardson <mcr@sandelman.ottawa.on.ca>
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * CardBus front-end for the Intel/Digital DECchip 21152 PCI-PCI bridge 33 * CardBus front-end for the Intel/Digital DECchip 21152 PCI-PCI bridge
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.29 2009/03/18 16:00:17 cegger Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v 1.30 2009/05/12 12:11:17 cegger Exp $");
38 38
39#include <sys/param.h> 39#include <sys/param.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/mbuf.h> 41#include <sys/mbuf.h>
42#include <sys/malloc.h> 42#include <sys/malloc.h>
43#include <sys/kernel.h> 43#include <sys/kernel.h>
44#include <sys/socket.h> 44#include <sys/socket.h>
45#include <sys/ioctl.h> 45#include <sys/ioctl.h>
46#include <sys/errno.h> 46#include <sys/errno.h>
47#include <sys/device.h> 47#include <sys/device.h>
48 48
49#if NRND > 0 49#if NRND > 0
50#include <sys/rnd.h> 50#include <sys/rnd.h>
@@ -65,27 +65,27 @@ __KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v @@ -65,27 +65,27 @@ __KERNEL_RCSID(0, "$NetBSD: rbus_ppb.c,v
65#include <dev/pci/pccbbreg.h> 65#include <dev/pci/pccbbreg.h>
66#include <dev/pci/pccbbvar.h> 66#include <dev/pci/pccbbvar.h>
67 67
68#include <dev/cardbus/cardbusvar.h> 68#include <dev/cardbus/cardbusvar.h>
69#include <dev/pci/pcidevs.h> 69#include <dev/pci/pcidevs.h>
70 70
71#include <x86/pci/pci_addr_fixup.h> 71#include <x86/pci/pci_addr_fixup.h>
72#include <x86/pci/pci_bus_fixup.h> 72#include <x86/pci/pci_bus_fixup.h>
73#include <i386/pci/pci_intr_fixup.h> 73#include <i386/pci/pci_intr_fixup.h>
74#include <i386/pci/pcibios.h> 74#include <i386/pci/pcibios.h>
75 75
76struct ppb_softc; 76struct ppb_softc;
77 77
78static int ppb_cardbus_match(struct device *, struct cfdata *, void *); 78static int ppb_cardbus_match(struct device *, cfdata_t, void *);
79static void ppb_cardbus_attach(struct device *, struct device *, void *); 79static void ppb_cardbus_attach(struct device *, struct device *, void *);
80static int ppb_cardbus_detach(struct device * self, int flags); 80static int ppb_cardbus_detach(struct device * self, int flags);
81/*static*/ void ppb_cardbus_setup(struct ppb_softc * sc); 81/*static*/ void ppb_cardbus_setup(struct ppb_softc * sc);
82/*static*/ int ppb_cardbus_enable(struct ppb_softc * sc); 82/*static*/ int ppb_cardbus_enable(struct ppb_softc * sc);
83/*static*/ void ppb_cardbus_disable(struct ppb_softc * sc); 83/*static*/ void ppb_cardbus_disable(struct ppb_softc * sc);
84static int ppb_activate(struct device *, enum devact); 84static int ppb_activate(struct device *, enum devact);
85int rppbprint(void *, const char *); 85int rppbprint(void *, const char *);
86int rbus_intr_fixup(pci_chipset_tag_t, int, int, int); 86int rbus_intr_fixup(pci_chipset_tag_t, int, int, int);
87void rbus_do_header_fixup(pci_chipset_tag_t, pcitag_t, void *); 87void rbus_do_header_fixup(pci_chipset_tag_t, pcitag_t, void *);
88 88
89static void rbus_pci_phys_allocate(pci_chipset_tag_t, pcitag_t, void *); 89static void rbus_pci_phys_allocate(pci_chipset_tag_t, pcitag_t, void *);
90 90
91static int rbus_do_phys_allocate(pci_chipset_tag_t, pcitag_t, int, 91static int rbus_do_phys_allocate(pci_chipset_tag_t, pcitag_t, int,
@@ -106,27 +106,27 @@ struct ppb_cardbus_softc { @@ -106,27 +106,27 @@ struct ppb_cardbus_softc {
106}; 106};
107 107
108CFATTACH_DECL_NEW(rbus_ppb, sizeof(struct ppb_cardbus_softc), 108CFATTACH_DECL_NEW(rbus_ppb, sizeof(struct ppb_cardbus_softc),
109 ppb_cardbus_match, ppb_cardbus_attach, ppb_cardbus_detach, ppb_activate); 109 ppb_cardbus_match, ppb_cardbus_attach, ppb_cardbus_detach, ppb_activate);
110 110
111#ifdef CBB_DEBUG 111#ifdef CBB_DEBUG
112int rbus_ppb_debug = 0; /* hack with kdb */ 112int rbus_ppb_debug = 0; /* hack with kdb */
113#define DPRINTF(X) if(rbus_ppb_debug) printf X 113#define DPRINTF(X) if(rbus_ppb_debug) printf X
114#else 114#else
115#define DPRINTF(X) 115#define DPRINTF(X)
116#endif 116#endif
117 117
118static int 118static int
119ppb_cardbus_match(struct device *parent, struct cfdata *match, void *aux) 119ppb_cardbus_match(struct device *parent, cfdata_t match, void *aux)
120{ 120{
121 struct cardbus_attach_args *ca = aux; 121 struct cardbus_attach_args *ca = aux;
122 122
123 if (CARDBUS_VENDOR(ca->ca_id) == PCI_VENDOR_DEC && 123 if (CARDBUS_VENDOR(ca->ca_id) == PCI_VENDOR_DEC &&
124 CARDBUS_PRODUCT(ca->ca_id) == PCI_PRODUCT_DEC_21152) 124 CARDBUS_PRODUCT(ca->ca_id) == PCI_PRODUCT_DEC_21152)
125 return (1); 125 return (1);
126 126
127 if(PCI_CLASS(ca->ca_class) == PCI_CLASS_BRIDGE && 127 if(PCI_CLASS(ca->ca_class) == PCI_CLASS_BRIDGE &&
128 PCI_SUBCLASS(ca->ca_class) == PCI_SUBCLASS_BRIDGE_PCI) { 128 PCI_SUBCLASS(ca->ca_class) == PCI_SUBCLASS_BRIDGE_PCI) {
129 /* XXX */ 129 /* XXX */
130 printf("recognizing generic bridge chip\n"); 130 printf("recognizing generic bridge chip\n");
131 } 131 }
132 132

cvs diff -r1.12 -r1.13 src/sys/dev/cardbus/uhci_cardbus.c (expand / switch to unified diff)

--- src/sys/dev/cardbus/uhci_cardbus.c 2008/07/11 21:02:53 1.12
+++ src/sys/dev/cardbus/uhci_cardbus.c 2009/05/12 12:11:17 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: uhci_cardbus.c,v 1.12 2008/07/11 21:02:53 dyoung Exp $ */ 1/* $NetBSD: uhci_cardbus.c,v 1.13 2009/05/12 12:11:17 cegger Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998-2005 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998-2005 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart@augustsson.net) at 8 * by Lennart Augustsson (lennart@augustsson.net) at
9 * Carlstedt Research & Technology. 9 * Carlstedt Research & Technology.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE. 30 * POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.12 2008/07/11 21:02:53 dyoung Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: uhci_cardbus.c,v 1.13 2009/05/12 12:11:17 cegger Exp $");
35 35
36#include "ehci_cardbus.h" 36#include "ehci_cardbus.h"
37 37
38#include <sys/param.h> 38#include <sys/param.h>
39#include <sys/systm.h> 39#include <sys/systm.h>
40#include <sys/kernel.h> 40#include <sys/kernel.h>
41#include <sys/device.h> 41#include <sys/device.h>
42#include <sys/proc.h> 42#include <sys/proc.h>
43#include <sys/queue.h> 43#include <sys/queue.h>
44 44
45#include <sys/bus.h> 45#include <sys/bus.h>
46 46
47#include <dev/cardbus/cardbusvar.h> 47#include <dev/cardbus/cardbusvar.h>
@@ -57,40 +57,40 @@ __KERNEL_RCSID(0, "$NetBSD: uhci_cardbus @@ -57,40 +57,40 @@ __KERNEL_RCSID(0, "$NetBSD: uhci_cardbus
57 57
58struct uhci_cardbus_softc { 58struct uhci_cardbus_softc {
59 uhci_softc_t sc; 59 uhci_softc_t sc;
60#if NEHCI_CARDBUS > 0 60#if NEHCI_CARDBUS > 0
61 struct usb_cardbus sc_cardbus; 61 struct usb_cardbus sc_cardbus;
62#endif 62#endif
63 cardbus_chipset_tag_t sc_cc; 63 cardbus_chipset_tag_t sc_cc;
64 cardbus_function_tag_t sc_cf; 64 cardbus_function_tag_t sc_cf;
65 cardbus_devfunc_t sc_ct; 65 cardbus_devfunc_t sc_ct;
66 cardbustag_t sc_tag; 66 cardbustag_t sc_tag;
67 void *sc_ih; /* interrupt vectoring */ 67 void *sc_ih; /* interrupt vectoring */
68}; 68};
69 69
70static int uhci_cardbus_match(device_t, struct cfdata *, void *); 70static int uhci_cardbus_match(device_t, cfdata_t, void *);
71static void uhci_cardbus_attach(device_t, device_t, void *); 71static void uhci_cardbus_attach(device_t, device_t, void *);
72static int uhci_cardbus_detach(device_t, int); 72static int uhci_cardbus_detach(device_t, int);
73 73
74CFATTACH_DECL_NEW(uhci_cardbus, sizeof(struct uhci_cardbus_softc), 74CFATTACH_DECL_NEW(uhci_cardbus, sizeof(struct uhci_cardbus_softc),
75 uhci_cardbus_match, uhci_cardbus_attach, uhci_cardbus_detach, uhci_activate); 75 uhci_cardbus_match, uhci_cardbus_attach, uhci_cardbus_detach, uhci_activate);
76 76
77#define CARDBUS_INTERFACE_UHCI PCI_INTERFACE_UHCI 77#define CARDBUS_INTERFACE_UHCI PCI_INTERFACE_UHCI
78#define CARDBUS_CBIO PCI_CBIO 78#define CARDBUS_CBIO PCI_CBIO
79#define cardbus_findvendor pci_findvendor 79#define cardbus_findvendor pci_findvendor
80#define cardbus_devinfo pci_devinfo 80#define cardbus_devinfo pci_devinfo
81 81
82static int 82static int
83uhci_cardbus_match(device_t parent, struct cfdata *match, void *aux) 83uhci_cardbus_match(device_t parent, cfdata_t match, void *aux)
84{ 84{
85 struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux; 85 struct cardbus_attach_args *ca = (struct cardbus_attach_args *)aux;
86 86
87 if (CARDBUS_CLASS(ca->ca_class) == CARDBUS_CLASS_SERIALBUS && 87 if (CARDBUS_CLASS(ca->ca_class) == CARDBUS_CLASS_SERIALBUS &&
88 CARDBUS_SUBCLASS(ca->ca_class) == CARDBUS_SUBCLASS_SERIALBUS_USB && 88 CARDBUS_SUBCLASS(ca->ca_class) == CARDBUS_SUBCLASS_SERIALBUS_USB &&
89 CARDBUS_INTERFACE(ca->ca_class) == CARDBUS_INTERFACE_UHCI) 89 CARDBUS_INTERFACE(ca->ca_class) == CARDBUS_INTERFACE_UHCI)
90 return (1); 90 return (1);
91 91
92 return (0); 92 return (0);
93} 93}
94 94
95static void 95static void
96uhci_cardbus_attach(device_t parent, device_t self, 96uhci_cardbus_attach(device_t parent, device_t self,