x86/amd-iommu: Add per IOMMU reference counting
[linux/fpc-iii.git] / drivers / scsi / bfa / include / fcs / bfa_fcs_vport.h
blobcd33f2cd5c348ee92102b8bcbba7f024a133aca7
1 /*
2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
3 * All rights reserved
4 * www.brocade.com
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
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
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.
18 /**
19 * bfa_fcs_vport.h BFA fcs vport module public interface
22 #ifndef __BFA_FCS_VPORT_H__
23 #define __BFA_FCS_VPORT_H__
25 #include <defs/bfa_defs_status.h>
26 #include <defs/bfa_defs_port.h>
27 #include <defs/bfa_defs_vport.h>
28 #include <fcs/bfa_fcs.h>
29 #include <fcb/bfa_fcb_vport.h>
31 struct bfa_fcs_vport_s {
32 struct list_head qe; /* queue elem */
33 bfa_sm_t sm; /* state machine */
34 bfa_fcs_lport_t lport; /* logical port */
35 struct bfa_timer_s timer; /* general purpose timer */
36 struct bfad_vport_s *vport_drv; /* Driver private */
37 struct bfa_vport_stats_s vport_stats; /* vport statistics */
38 struct bfa_lps_s *lps; /* Lport login service */
39 int fdisc_retries;
42 #define bfa_fcs_vport_get_port(vport) \
43 ((struct bfa_fcs_port_s *)(&vport->port))
45 /**
46 * bfa fcs vport public functions
48 bfa_status_t bfa_fcs_vport_create(struct bfa_fcs_vport_s *vport,
49 struct bfa_fcs_s *fcs, u16 vf_id,
50 struct bfa_port_cfg_s *port_cfg,
51 struct bfad_vport_s *vport_drv);
52 bfa_status_t bfa_fcs_vport_delete(struct bfa_fcs_vport_s *vport);
53 bfa_status_t bfa_fcs_vport_start(struct bfa_fcs_vport_s *vport);
54 bfa_status_t bfa_fcs_vport_stop(struct bfa_fcs_vport_s *vport);
55 void bfa_fcs_vport_get_attr(struct bfa_fcs_vport_s *vport,
56 struct bfa_vport_attr_s *vport_attr);
57 void bfa_fcs_vport_get_stats(struct bfa_fcs_vport_s *vport,
58 struct bfa_vport_stats_s *vport_stats);
59 void bfa_fcs_vport_clr_stats(struct bfa_fcs_vport_s *vport);
60 struct bfa_fcs_vport_s *bfa_fcs_vport_lookup(struct bfa_fcs_s *fcs,
61 u16 vf_id, wwn_t vpwwn);
63 #endif /* __BFA_FCS_VPORT_H__ */