bfi.h (10a07379247078448c076690657a076076bf89aa) bfi.h (3fd459804ff8e002db2671900debd0fc6dc6c443)
1/*
2 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
3 * All rights reserved
4 * www.brocade.com
5 *
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
7 *
8 * This program is free software; you can redistribute it and/or modify it

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

33 * Msg header common to all msgs
34 */
35struct bfi_mhdr_s {
36 u8 msg_class; /* @ref bfi_mclass_t */
37 u8 msg_id; /* msg opcode with in the class */
38 union {
39 struct {
40 u8 qid;
1/*
2 * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
3 * All rights reserved
4 * www.brocade.com
5 *
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
7 *
8 * This program is free software; you can redistribute it and/or modify it

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

33 * Msg header common to all msgs
34 */
35struct bfi_mhdr_s {
36 u8 msg_class; /* @ref bfi_mclass_t */
37 u8 msg_id; /* msg opcode with in the class */
38 union {
39 struct {
40 u8 qid;
41 u8 lpu_id; /* msg destination */
41 u8 fn_lpu; /* msg destination */
42 } h2i;
43 u16 i2htok; /* token in msgs to host */
44 } mtag;
45};
46
42 } h2i;
43 u16 i2htok; /* token in msgs to host */
44 } mtag;
45};
46
47#define bfi_mhdr_2_qid(_mh) ((_mh)->mtag.h2i.qid)
47#define bfi_fn_lpu(__fn, __lpu) ((__fn) << 1 | (__lpu))
48#define bfi_mhdr_2_fn(_mh) ((_mh)->mtag.h2i.fn_lpu >> 1)
49#define bfi_mhdr_2_qid(_m) ((_mh)->mtag.h2i.qid)
48
50
49#define bfi_h2i_set(_mh, _mc, _op, _lpuid) do { \
51#define bfi_h2i_set(_mh, _mc, _op, _fn_lpu) do { \
50 (_mh).msg_class = (_mc); \
51 (_mh).msg_id = (_op); \
52 (_mh).msg_class = (_mc); \
53 (_mh).msg_id = (_op); \
52 (_mh).mtag.h2i.lpu_id = (_lpuid); \
54 (_mh).mtag.h2i.fn_lpu = (_fn_lpu); \
53} while (0)
54
55#define bfi_i2h_set(_mh, _mc, _op, _i2htok) do { \
56 (_mh).msg_class = (_mc); \
57 (_mh).msg_id = (_op); \
58 (_mh).mtag.i2htok = (_i2htok); \
59} while (0)
60

--- 626 unchanged lines hidden ---
55} while (0)
56
57#define bfi_i2h_set(_mh, _mc, _op, _i2htok) do { \
58 (_mh).msg_class = (_mc); \
59 (_mh).msg_id = (_op); \
60 (_mh).mtag.i2htok = (_i2htok); \
61} while (0)
62

--- 626 unchanged lines hidden ---