aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfi.h
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2011-06-24 20:24:08 -0700
committerJames Bottomley <JBottomley@Parallels.com>2011-06-29 17:02:28 -0500
commit3fd459804ff8e002db2671900debd0fc6dc6c443 (patch)
tree34d71220521bedb451182ae98a32c16906881503 /drivers/scsi/bfa/bfi.h
parent[SCSI] bfa: Brocade-1860 Fabric Adapter PLL init fixes. (diff)
downloadlinux-dev-3fd459804ff8e002db2671900debd0fc6dc6c443.tar.xz
linux-dev-3fd459804ff8e002db2671900debd0fc6dc6c443.zip
[SCSI] bfa: Brocade-1860 Fabric Adapter vHBA support.
- Introduced partitioning of the BFA resources. - Added h/w queue ID in CPE messages, firmware uses h/w queue ID from messages to pick a matching RME queue. - Added message header to bfa_reqq_produce(). h/w queue ID is set in the message header and firmware modules use h/w queue ID from message header instead of from cpqe event. - Made changes to allow using all 256 queues of Brocade-1860 asic. Previously only a single queue per queue group was used. - Added function tag to BFI message header. Only used by FC BFI messages. Used to translate host tag to firmware tag. bfa_lpuid() is changed to bfa_fn_lpu() that encodes both PCI function and port ID in BFI message header. Signed-off-by: Krishna Gudipati <kgudipat@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfi.h')
-rw-r--r--drivers/scsi/bfa/bfi.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/bfa/bfi.h b/drivers/scsi/bfa/bfi.h
index 3fb2e8315323..40002f4ea008 100644
--- a/drivers/scsi/bfa/bfi.h
+++ b/drivers/scsi/bfa/bfi.h
@@ -38,18 +38,20 @@ struct bfi_mhdr_s {
union {
struct {
u8 qid;
- u8 lpu_id; /* msg destination */
+ u8 fn_lpu; /* msg destination */
} h2i;
u16 i2htok; /* token in msgs to host */
} mtag;
};
-#define bfi_mhdr_2_qid(_mh) ((_mh)->mtag.h2i.qid)
+#define bfi_fn_lpu(__fn, __lpu) ((__fn) << 1 | (__lpu))
+#define bfi_mhdr_2_fn(_mh) ((_mh)->mtag.h2i.fn_lpu >> 1)
+#define bfi_mhdr_2_qid(_m) ((_mh)->mtag.h2i.qid)
-#define bfi_h2i_set(_mh, _mc, _op, _lpuid) do { \
+#define bfi_h2i_set(_mh, _mc, _op, _fn_lpu) do { \
(_mh).msg_class = (_mc); \
(_mh).msg_id = (_op); \
- (_mh).mtag.h2i.lpu_id = (_lpuid); \
+ (_mh).mtag.h2i.fn_lpu = (_fn_lpu); \
} while (0)
#define bfi_i2h_set(_mh, _mc, _op, _i2htok) do { \