Deleted Added
full compact
firewire.h (122216) firewire.h (127468)
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.h 122216 2003-11-07 09:01:41Z simokawa $
34 * $FreeBSD: head/sys/dev/firewire/firewire.h 127468 2004-03-26 23:17:10Z simokawa $
35 *
36 */
37
38#ifndef _FIREWIRE_H
39#define _FIREWIRE_H 1
40
41#define DEV_DEF 0
42#define DEV_DV 2

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

406#define FWOHCI_WRPHYREG _IOWR('S', 83, struct fw_reg_req_t)
407
408#define DUMPDMA _IOWR('S', 82, u_int32_t)
409
410#ifdef _KERNEL
411
412#define FWMAXNDMA 0x100 /* 8 bits DMA channel id. in device No. */
413
35 *
36 */
37
38#ifndef _FIREWIRE_H
39#define _FIREWIRE_H 1
40
41#define DEV_DEF 0
42#define DEV_DV 2

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

406#define FWOHCI_WRPHYREG _IOWR('S', 83, struct fw_reg_req_t)
407
408#define DUMPDMA _IOWR('S', 82, u_int32_t)
409
410#ifdef _KERNEL
411
412#define FWMAXNDMA 0x100 /* 8 bits DMA channel id. in device No. */
413
414#if __FreeBSD_version < 500000
414#if defined(__DragonFly__) || __FreeBSD_version < 500000
415#define dev2unit(x) ((minor(x) & 0xff) | (minor(x) >> 8))
416#define unit2minor(x) (((x) & 0xff) | (((x) << 8) & ~0xffff))
417#endif
418
419#define MAKEMINOR(f, u, s) \
420 unit2minor((f) | (((u) & 0xff) << 8) | (s & 0xff))
421#define DEV2UNIT(x) ((dev2unit(x) & 0xff00) >> 8)
422#define DEV2SUB(x) (dev2unit(x) & 0xff)
423
424#define FWMEM_FLAG 0x10000
425#define DEV_FWMEM(x) (dev2unit(x) & FWMEM_FLAG)
426#endif
427#endif
415#define dev2unit(x) ((minor(x) & 0xff) | (minor(x) >> 8))
416#define unit2minor(x) (((x) & 0xff) | (((x) << 8) & ~0xffff))
417#endif
418
419#define MAKEMINOR(f, u, s) \
420 unit2minor((f) | (((u) & 0xff) << 8) | (s & 0xff))
421#define DEV2UNIT(x) ((dev2unit(x) & 0xff00) >> 8)
422#define DEV2SUB(x) (dev2unit(x) & 0xff)
423
424#define FWMEM_FLAG 0x10000
425#define DEV_FWMEM(x) (dev2unit(x) & FWMEM_FLAG)
426#endif
427#endif