diff options
author | mjacob <mjacob@FreeBSD.org> | 2004-01-23 23:22:35 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2004-01-23 23:22:35 +0000 |
commit | b8527c05c486b6e8cd9a2d7220ab421508be9f33 (patch) | |
tree | 1212a73cf92980d6ee2fa0fd2646479d4346dd4c /sys/dev/isp/ispmbox.h | |
parent | ec1bdb4850889fa117bd8d1003aeda729451b246 (diff) | |
download | FreeBSD-src-b8527c05c486b6e8cd9a2d7220ab421508be9f33.zip FreeBSD-src-b8527c05c486b6e8cd9a2d7220ab421508be9f33.tar.gz |
add MAKE_WWN_FROM_NODE_NAME macro
Diffstat (limited to 'sys/dev/isp/ispmbox.h')
-rw-r--r-- | sys/dev/isp/ispmbox.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/isp/ispmbox.h b/sys/dev/isp/ispmbox.h index ac8d89e..77aeb00 100644 --- a/sys/dev/isp/ispmbox.h +++ b/sys/dev/isp/ispmbox.h @@ -702,6 +702,16 @@ typedef struct isp_icb { array[ICB_NNM6] = (u_int8_t) ((wwn >> 48) & 0xff), \ array[ICB_NNM7] = (u_int8_t) ((wwn >> 56) & 0xff) +#define MAKE_WWN_FROM_NODE_NAME(wwn, array) \ + wwn = ((u_int64_t) array[ICB_NNM0]) | \ + ((u_int64_t) array[ICB_NNM1] << 8) | \ + ((u_int64_t) array[ICB_NNM2] << 16) | \ + ((u_int64_t) array[ICB_NNM3] << 24) | \ + ((u_int64_t) array[ICB_NNM4] << 32) | \ + ((u_int64_t) array[ICB_NNM5] << 40) | \ + ((u_int64_t) array[ICB_NNM6] << 48) | \ + ((u_int64_t) array[ICB_NNM7] << 56) + /* * FC-AL Position Map * |