Deleted Added
full compact
firewire.c (124145) firewire.c (124169)
1/*
2 * Copyright (c) 2003 Hidetoshi Shimokawa
3 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
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
32 * POSSIBILITY OF SUCH DAMAGE.
33 *
1/*
2 * Copyright (c) 2003 Hidetoshi Shimokawa
3 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
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
32 * POSSIBILITY OF SUCH DAMAGE.
33 *
34 * $FreeBSD: head/sys/dev/firewire/firewire.c 124145 2004-01-05 14:21:18Z simokawa $
34 * $FreeBSD: head/sys/dev/firewire/firewire.c 124169 2004-01-06 14:30:47Z simokawa $
35 *
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/types.h>
41
42#include <sys/kernel.h>

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

75
76MALLOC_DEFINE(M_FW, "firewire", "FireWire");
77MALLOC_DEFINE(M_FWXFER, "fw_xfer", "XFER/FireWire");
78
79#define FW_MAXASYRTY 4
80
81devclass_t firewire_devclass;
82
35 *
36 */
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/types.h>
41
42#include <sys/kernel.h>

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

75
76MALLOC_DEFINE(M_FW, "firewire", "FireWire");
77MALLOC_DEFINE(M_FWXFER, "fw_xfer", "XFER/FireWire");
78
79#define FW_MAXASYRTY 4
80
81devclass_t firewire_devclass;
82
83static int firewire_match __P((device_t));
84static int firewire_attach __P((device_t));
85static int firewire_detach __P((device_t));
86static int firewire_resume __P((device_t));
83static int firewire_match (device_t);
84static int firewire_attach (device_t);
85static int firewire_detach (device_t);
86static int firewire_resume (device_t);
87#if 0
87#if 0
88static int firewire_shutdown __P((device_t));
88static int firewire_shutdown (device_t);
89#endif
89#endif
90static device_t firewire_add_child __P((device_t, int, const char *, int));
91static void fw_try_bmr __P((void *));
92static void fw_try_bmr_callback __P((struct fw_xfer *));
93static void fw_asystart __P((struct fw_xfer *));
94static int fw_get_tlabel __P((struct firewire_comm *, struct fw_xfer *));
95static void fw_bus_probe __P((struct firewire_comm *));
96static void fw_bus_explore __P((struct firewire_comm *));
97static void fw_bus_explore_callback __P((struct fw_xfer *));
98static void fw_attach_dev __P((struct firewire_comm *));
90static device_t firewire_add_child (device_t, int, const char *, int);
91static void fw_try_bmr (void *);
92static void fw_try_bmr_callback (struct fw_xfer *);
93static void fw_asystart (struct fw_xfer *);
94static int fw_get_tlabel (struct firewire_comm *, struct fw_xfer *);
95static void fw_bus_probe (struct firewire_comm *);
96static void fw_bus_explore (struct firewire_comm *);
97static void fw_bus_explore_callback (struct fw_xfer *);
98static void fw_attach_dev (struct firewire_comm *);
99#ifdef FW_VMACCESS
99#ifdef FW_VMACCESS
100static void fw_vmaccess __P((struct fw_xfer *));
100static void fw_vmaccess (struct fw_xfer *);
101#endif
101#endif
102struct fw_xfer *asyreqq __P((struct firewire_comm *, u_int8_t, u_int8_t, u_int8_t,
103 u_int32_t, u_int32_t, void (*)__P((struct fw_xfer *))));
104static int fw_bmr __P((struct firewire_comm *));
102struct fw_xfer *asyreqq (struct firewire_comm *, u_int8_t, u_int8_t, u_int8_t,
103 u_int32_t, u_int32_t, void (*)(struct fw_xfer *));
104static int fw_bmr (struct firewire_comm *);
105
106static device_method_t firewire_methods[] = {
107 /* Device interface */
108 DEVMETHOD(device_probe, firewire_match),
109 DEVMETHOD(device_attach, firewire_attach),
110 DEVMETHOD(device_detach, firewire_detach),
111 DEVMETHOD(device_suspend, bus_generic_suspend),
112 DEVMETHOD(device_resume, firewire_resume),

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

1388 return;
1389
1390}
1391
1392/* Portable Async. request read quad */
1393struct fw_xfer *
1394asyreqq(struct firewire_comm *fc, u_int8_t spd, u_int8_t tl, u_int8_t rt,
1395 u_int32_t addr_hi, u_int32_t addr_lo,
105
106static device_method_t firewire_methods[] = {
107 /* Device interface */
108 DEVMETHOD(device_probe, firewire_match),
109 DEVMETHOD(device_attach, firewire_attach),
110 DEVMETHOD(device_detach, firewire_detach),
111 DEVMETHOD(device_suspend, bus_generic_suspend),
112 DEVMETHOD(device_resume, firewire_resume),

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

1388 return;
1389
1390}
1391
1392/* Portable Async. request read quad */
1393struct fw_xfer *
1394asyreqq(struct firewire_comm *fc, u_int8_t spd, u_int8_t tl, u_int8_t rt,
1395 u_int32_t addr_hi, u_int32_t addr_lo,
1396 void (*hand) __P((struct fw_xfer*)))
1396 void (*hand) (struct fw_xfer*))
1397{
1398 struct fw_xfer *xfer;
1399 struct fw_pkt *fp;
1400 int err;
1401
1402 xfer = fw_xfer_alloc(M_FWXFER);
1403 if (xfer == NULL)
1404 return NULL;

--- 817 unchanged lines hidden ---
1397{
1398 struct fw_xfer *xfer;
1399 struct fw_pkt *fp;
1400 int err;
1401
1402 xfer = fw_xfer_alloc(M_FWXFER);
1403 if (xfer == NULL)
1404 return NULL;

--- 817 unchanged lines hidden ---