diff options
author | Thierry Deval <tdeval@cvs.openbsd.org> | 2002-12-13 22:33:53 +0000 |
---|---|---|
committer | Thierry Deval <tdeval@cvs.openbsd.org> | 2002-12-13 22:33:53 +0000 |
commit | 12fda537764f942d164b05b98e243714ff03ca51 (patch) | |
tree | 4015a992caf47853997a0f1d0e2e557367834c42 /sys/dev | |
parent | 3fa987a853460c1e15a7ec7604d947952d0b2fee (diff) |
Define IEEE1394_MAX_ASYNC(), which gives the maximum (link speed dependent)
asynchronous packet size.
Idea from NetBSD.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ieee1394/ieee1394reg.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ieee1394/ieee1394reg.h b/sys/dev/ieee1394/ieee1394reg.h index fa7e52cd615..d49246e3e06 100644 --- a/sys/dev/ieee1394/ieee1394reg.h +++ b/sys/dev/ieee1394/ieee1394reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee1394reg.h,v 1.2 2002/12/13 02:52:04 tdeval Exp $ */ +/* $OpenBSD: ieee1394reg.h,v 1.3 2002/12/13 22:33:52 tdeval Exp $ */ /* $NetBSD: ieee1394reg.h,v 1.12 2002/02/27 05:07:25 jmc Exp $ */ /* @@ -206,11 +206,12 @@ typedef struct ieee1394_async_nodata { #define CSR_SB_TOPOLOGY_MAP 0x1000 #define CSR_SB_END 0x1400 -#define IEEE1394_MAX_REC(i) ((0x1 << (i + 1))) +#define IEEE1394_MAX_REC(i) (0x1 << ((i) + 1)) +#define IEEE1394_MAX_ASYNC(i) (0x200 << (i)) #define IEEE1394_BUSINFO_LEN 3 -#define IEEE1394_GET_MAX_REC(i) ((i & 0x0000f000) >> 12) -#define IEEE1394_GET_LINK_SPD(i) (i & 0x00000007) +#define IEEE1394_GET_MAX_REC(i) (((i) & 0x0000f000) >> 12) +#define IEEE1394_GET_LINK_SPD(i) ((i) & 0x00000007) /* * XXX. Should be at if_fw level but needed here for constructing the config |