• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6/drivers/scsi/bfa/include/fcs/
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
18/**
19 *  bfa_fcs_vport.h BFA fcs vport module public interface
20 */
21
22#ifndef __BFA_FCS_VPORT_H__
23#define __BFA_FCS_VPORT_H__
24
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>
30
31struct 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;
40};
41
42#define bfa_fcs_vport_get_port(vport) \
43			((struct bfa_fcs_port_s  *)(&vport->port))
44
45/**
46 * bfa fcs vport public functions
47 */
48bfa_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);
52bfa_status_t bfa_fcs_pbc_vport_create(struct bfa_fcs_vport_s *vport,
53			struct bfa_fcs_s *fcs, uint16_t vf_id,
54			struct bfa_port_cfg_s *port_cfg,
55			struct bfad_vport_s *vport_drv);
56bfa_status_t bfa_fcs_vport_delete(struct bfa_fcs_vport_s *vport);
57bfa_status_t bfa_fcs_vport_start(struct bfa_fcs_vport_s *vport);
58bfa_status_t bfa_fcs_vport_stop(struct bfa_fcs_vport_s *vport);
59void bfa_fcs_vport_get_attr(struct bfa_fcs_vport_s *vport,
60			struct bfa_vport_attr_s *vport_attr);
61void bfa_fcs_vport_get_stats(struct bfa_fcs_vport_s *vport,
62			struct bfa_vport_stats_s *vport_stats);
63void bfa_fcs_vport_clr_stats(struct bfa_fcs_vport_s *vport);
64struct bfa_fcs_vport_s *bfa_fcs_vport_lookup(struct bfa_fcs_s *fcs,
65			u16 vf_id, wwn_t vpwwn);
66
67#endif /* __BFA_FCS_VPORT_H__ */
68