aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa/bfi.h
diff options
context:
space:
mode:
authorKrishna Gudipati <kgudipat@brocade.com>2011-06-13 18:42:10 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-06-29 16:25:57 -0400
commitd37779f8d98a1d7c5ba904982958167d988f01dd (patch)
tree8d73314ba2894c322494d3cfa06f3273b7ff1c35 /drivers/scsi/bfa/bfi.h
parent85ce928dbb87585042e7dfebe513f724eadebd5e (diff)
[SCSI] bfa: Introduce IOC event notification mechanism.
Introduced a generic event notification callback function that receives IOC_ENABLED, IOC_DISABLED, IOC_FAILED events and notifies the modules registered for these events. 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.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/scsi/bfa/bfi.h b/drivers/scsi/bfa/bfi.h
index 6ef1ba50ecf9..d57522dd949b 100644
--- a/drivers/scsi/bfa/bfi.h
+++ b/drivers/scsi/bfa/bfi.h
@@ -43,13 +43,15 @@ struct bfi_mhdr_s {
43 u8 msg_id; /* msg opcode with in the class */ 43 u8 msg_id; /* msg opcode with in the class */
44 union { 44 union {
45 struct { 45 struct {
46 u8 rsvd; 46 u8 qid;
47 u8 lpu_id; /* msg destination */ 47 u8 lpu_id; /* msg destination */
48 } h2i; 48 } h2i;
49 u16 i2htok; /* token in msgs to host */ 49 u16 i2htok; /* token in msgs to host */
50 } mtag; 50 } mtag;
51}; 51};
52 52
53#define bfi_mhdr_2_qid(_mh) (_mh)->mtag.h2i.qid
54
53#define bfi_h2i_set(_mh, _mc, _op, _lpuid) do { \ 55#define bfi_h2i_set(_mh, _mc, _op, _lpuid) do { \
54 (_mh).msg_class = (_mc); \ 56 (_mh).msg_class = (_mc); \
55 (_mh).msg_id = (_op); \ 57 (_mh).msg_id = (_op); \
@@ -157,6 +159,14 @@ struct bfi_mbmsg_s {
157}; 159};
158 160
159/* 161/*
162 * Supported PCI function class codes (personality)
163 */
164enum bfi_pcifn_class {
165 BFI_PCIFN_CLASS_FC = 0x0c04,
166 BFI_PCIFN_CLASS_ETH = 0x0200,
167};
168
169/*
160 * Message Classes 170 * Message Classes
161 */ 171 */
162enum bfi_mclass { 172enum bfi_mclass {
@@ -353,8 +363,8 @@ enum {
353 */ 363 */
354struct bfi_ioc_ctrl_req_s { 364struct bfi_ioc_ctrl_req_s {
355 struct bfi_mhdr_s mh; 365 struct bfi_mhdr_s mh;
356 u8 ioc_class; 366 u16 clscode;
357 u8 rsvd[3]; 367 u16 rsvd;
358 u32 tv_sec; 368 u32 tv_sec;
359}; 369};
360#define bfi_ioc_enable_req_t struct bfi_ioc_ctrl_req_s; 370#define bfi_ioc_enable_req_t struct bfi_ioc_ctrl_req_s;