firewire.h (e340a7ac14789672a8e08990fc4992e394d2fe50) firewire.h (6bfa9a2d66dd0e00182017d6741d44e54d0b2cca)
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:

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

412#define FWMAXNDMA 0x100 /* 8 bits DMA channel id. in device No. */
413
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) \
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:

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

412#define FWMAXNDMA 0x100 /* 8 bits DMA channel id. in device No. */
413
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))
420 ((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
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