diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2011-06-25 05:26:25 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-06-30 00:22:26 +0200 |
commit | 51e569aa1f0c10bd71af05e76e4ba0e42c51e4ab (patch) | |
tree | 65ab17fd7da7c3432c04c45269cbd62ee19198c5 /drivers/scsi/bfa/bfi.h | |
parent | [SCSI] bfa: Added support for CEE info and stats query. (diff) | |
download | linux-51e569aa1f0c10bd71af05e76e4ba0e42c51e4ab.tar.xz linux-51e569aa1f0c10bd71af05e76e4ba0e42c51e4ab.zip |
[SCSI] bfa: Added support to obtain SFP info.
- Added SFP sub-module to BFA.
- Added interface to collect sfp media info and sfp speed.
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.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/scsi/bfa/bfi.h b/drivers/scsi/bfa/bfi.h index 037b377668c2..0d249984fd08 100644 --- a/drivers/scsi/bfa/bfi.h +++ b/drivers/scsi/bfa/bfi.h @@ -206,6 +206,7 @@ enum bfi_mclass { BFI_MC_IOIM_IOCOM = 17, /* good IO completion */ BFI_MC_TSKIM = 18, /* Initiator Task management */ BFI_MC_PORT = 21, /* Physical port */ + BFI_MC_SFP = 22, /* SFP module */ BFI_MC_MAX = 32 }; @@ -765,6 +766,54 @@ union bfi_cee_i2h_msg_u { struct bfi_cee_stats_rsp_s stats_rsp; }; +/* + * SFP related + */ + +enum bfi_sfp_h2i_e { + BFI_SFP_H2I_SHOW = 1, + BFI_SFP_H2I_SCN = 2, +}; + +enum bfi_sfp_i2h_e { + BFI_SFP_I2H_SHOW = BFA_I2HM(BFI_SFP_H2I_SHOW), + BFI_SFP_I2H_SCN = BFA_I2HM(BFI_SFP_H2I_SCN), +}; + +/* + * SFP state + */ +enum bfa_sfp_stat_e { + BFA_SFP_STATE_INIT = 0, /* SFP state is uninit */ + BFA_SFP_STATE_REMOVED = 1, /* SFP is removed */ + BFA_SFP_STATE_INSERTED = 2, /* SFP is inserted */ + BFA_SFP_STATE_VALID = 3, /* SFP is valid */ + BFA_SFP_STATE_UNSUPPORT = 4, /* SFP is unsupport */ + BFA_SFP_STATE_FAILED = 5, /* SFP i2c read fail */ +}; + +/* + * SFP memory access type + */ +enum bfi_sfp_mem_e { + BFI_SFP_MEM_ALL = 0x1, /* access all data field */ + BFI_SFP_MEM_DIAGEXT = 0x2, /* access diag ext data field only */ +}; + +struct bfi_sfp_req_s { + struct bfi_mhdr_s mh; + u8 memtype; + u8 rsvd[3]; + struct bfi_alen_s alen; +}; + +struct bfi_sfp_rsp_s { + struct bfi_mhdr_s mh; + u8 status; + u8 state; + u8 rsvd[2]; +}; + #pragma pack() #endif /* __BFI_H__ */ |