Pull ticket4byte into release branch
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / scsi / bfa / include / fcb / bfa_fcb_rport.h
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_fcb_rport.h BFA FCS rport driver interfaces
20  */
21
22 #ifndef __BFA_FCB_RPORT_H__
23 #define __BFA_FCB_RPORT_H__
24
25 /**
26  *  fcs_rport_fcb Remote port driver interfaces
27  */
28
29
30 struct bfad_rport_s;
31
32 /*
33  * Callback functions from BFA FCS to driver
34  */
35
36 /**
37  *      Completion callback for bfa_fcs_rport_add().
38  *
39  * @param[in] rport_drv - driver instance of rport
40  *
41  * @return None
42  */
43 void bfa_fcb_rport_add(struct bfad_rport_s *rport_drv);
44
45 /**
46  *      Completion callback for bfa_fcs_rport_remove().
47  *
48  * @param[in] rport_drv - driver instance of rport
49  *
50  * @return None
51  */
52 void bfa_fcb_rport_remove(struct bfad_rport_s *rport_drv);
53
54 /**
55  *              Call to allocate a rport instance.
56  *
57  * @param[in] bfad - driver instance
58  * @param[out] rport - BFA FCS instance of rport
59  * @param[out] rport_drv - driver instance of rport
60  *
61  * @retval BFA_STATUS_OK - successfully allocated
62  * @retval BFA_STATUS_ENOMEM - cannot allocate
63  */
64 bfa_status_t bfa_fcb_rport_alloc(struct bfad_s *bfad,
65                         struct bfa_fcs_rport_s **rport,
66                         struct bfad_rport_s **rport_drv);
67
68 /**
69  *      Call to free rport memory resources.
70  *
71  * @param[in] bfad - driver instance
72  * @param[in] rport_drv - driver instance of rport
73  *
74  * @return None
75  */
76 void bfa_fcb_rport_free(struct bfad_s *bfad, struct bfad_rport_s **rport_drv);
77
78
79
80 #endif /* __BFA_FCB_RPORT_H__ */