PageRenderTime 53ms CodeModel.GetById 23ms app.highlight 16ms RepoModel.GetById 2ms app.codeStats 0ms

/drivers/scsi/bfa/include/bfi/bfi_pport.h

https://bitbucket.org/abioy/linux
C Header | 118 lines | 68 code | 13 blank | 37 comment | 0 complexity | 6904d3c19a0741d178716d84778ac75f MD5 | raw file
Possible License(s): CC-BY-SA-3.0, GPL-2.0, LGPL-2.0, AGPL-1.0
  1/*
  2 * Copyright (c) 2005-2009 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
  9 * under the terms of the GNU General Public License (GPL) Version 2 as
 10 * published by the Free Software Foundation
 11 *
 12 * This program is distributed in the hope that it will be useful, but
 13 * WITHOUT ANY WARRANTY; without even the implied warranty of
 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15 * General Public License for more details.
 16 */
 17#ifndef __BFI_PPORT_H__
 18#define __BFI_PPORT_H__
 19
 20#include <bfi/bfi.h>
 21#include <defs/bfa_defs_pport.h>
 22
 23#pragma pack(1)
 24
 25enum bfi_fcport_h2i {
 26	BFI_FCPORT_H2I_ENABLE_REQ		= (1),
 27	BFI_FCPORT_H2I_DISABLE_REQ		= (2),
 28	BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ	= (3),
 29	BFI_FCPORT_H2I_STATS_GET_REQ		= (4),
 30	BFI_FCPORT_H2I_STATS_CLEAR_REQ		= (5),
 31};
 32
 33enum bfi_fcport_i2h {
 34	BFI_FCPORT_I2H_ENABLE_RSP		= BFA_I2HM(1),
 35	BFI_FCPORT_I2H_DISABLE_RSP		= BFA_I2HM(2),
 36	BFI_FCPORT_I2H_SET_SVC_PARAMS_RSP	= BFA_I2HM(3),
 37	BFI_FCPORT_I2H_STATS_GET_RSP		= BFA_I2HM(4),
 38	BFI_FCPORT_I2H_STATS_CLEAR_RSP		= BFA_I2HM(5),
 39	BFI_FCPORT_I2H_EVENT			= BFA_I2HM(6),
 40};
 41
 42/**
 43 * Generic REQ type
 44 */
 45struct bfi_fcport_req_s {
 46	struct bfi_mhdr_s  mh;		/*  msg header			    */
 47	u32	   msgtag;	/*  msgtag for reply		    */
 48};
 49
 50/**
 51 * Generic RSP type
 52 */
 53struct bfi_fcport_rsp_s {
 54	struct bfi_mhdr_s  mh;		/*  common msg header		    */
 55	u8		   status;	/*  port enable status		    */
 56	u8		   rsvd[3];
 57	u32	   msgtag;	/*  msgtag for reply		    */
 58};
 59
 60/**
 61 * BFI_FCPORT_H2I_ENABLE_REQ
 62 */
 63struct bfi_fcport_enable_req_s {
 64	struct bfi_mhdr_s  mh;		/*  msg header			    */
 65	u32	   rsvd1;
 66	wwn_t		   nwwn;	/*  node wwn of physical port	    */
 67	wwn_t		   pwwn;	/*  port wwn of physical port	    */
 68	struct bfa_pport_cfg_s port_cfg; /*  port configuration	    */
 69	union bfi_addr_u   stats_dma_addr; /*  DMA address for stats	    */
 70	u32	   msgtag;	/*  msgtag for reply		    */
 71	u32	   rsvd2;
 72};
 73
 74/**
 75 * BFI_FCPORT_H2I_SET_SVC_PARAMS_REQ
 76 */
 77struct bfi_fcport_set_svc_params_req_s {
 78	struct bfi_mhdr_s  mh;		/*  msg header */
 79	u16	   tx_bbcredit;	/*  Tx credits */
 80	u16	   rsvd;
 81};
 82
 83/**
 84 * BFI_FCPORT_I2H_EVENT
 85 */
 86struct bfi_fcport_event_s {
 87	struct bfi_mhdr_s 	mh;	/*  common msg header */
 88	struct bfa_pport_link_s	link_state;
 89};
 90
 91/**
 92 * fcport H2I message
 93 */
 94union bfi_fcport_h2i_msg_u {
 95	struct bfi_mhdr_s			*mhdr;
 96	struct bfi_fcport_enable_req_s		*penable;
 97	struct bfi_fcport_req_s			*pdisable;
 98	struct bfi_fcport_set_svc_params_req_s	*psetsvcparams;
 99	struct bfi_fcport_req_s			*pstatsget;
100	struct bfi_fcport_req_s			*pstatsclear;
101};
102
103/**
104 * fcport I2H message
105 */
106union bfi_fcport_i2h_msg_u {
107	struct bfi_msg_s			*msg;
108	struct bfi_fcport_rsp_s			*penable_rsp;
109	struct bfi_fcport_rsp_s			*pdisable_rsp;
110	struct bfi_fcport_rsp_s			*psetsvcparams_rsp;
111	struct bfi_fcport_rsp_s			*pstatsget_rsp;
112	struct bfi_fcport_rsp_s			*pstatsclear_rsp;
113	struct bfi_fcport_event_s		*event;
114};
115
116#pragma pack()
117
118#endif /* __BFI_PPORT_H__ */