2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
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.
19 * bfa_fcb_port.h BFA FCS virtual port driver interfaces
22 #ifndef __BFA_FCB_PORT_H__
23 #define __BFA_FCB_PORT_H__
25 #include <fcb/bfa_fcb_vport.h>
27 * fcs_port_fcb FCS port driver interfaces
31 * Forward declarations
36 * Callback functions from BFA FCS to driver
40 * Call from FCS to driver module when a port is instantiated. The port
41 * can be a base port or a virtual port with in the base fabric or
44 * On this callback, driver is supposed to create scsi_host, scsi_tgt or
45 * network interfaces bases on ports personality/roles.
47 * base port of base fabric: vf_drv == NULL && vp_drv == NULL
48 * vport of base fabric: vf_drv == NULL && vp_drv != NULL
49 * base port of VF: vf_drv != NULL && vp_drv == NULL
50 * vport of VF: vf_drv != NULL && vp_drv != NULL
52 * @param[in] bfad - driver instance
53 * @param[in] port - FCS port instance
54 * @param[in] roles - port roles: IM, TM, IP
55 * @param[in] vf_drv - VF driver instance, NULL if base fabric (no VF)
56 * @param[in] vp_drv - vport driver instance, NULL if base port
60 struct bfad_port_s
*bfa_fcb_port_new(struct bfad_s
*bfad
,
61 struct bfa_fcs_port_s
*port
,
62 enum bfa_port_role roles
, struct bfad_vf_s
*vf_drv
,
63 struct bfad_vport_s
*vp_drv
);
66 * Call from FCS to driver module when a port is deleted. The port
67 * can be a base port or a virtual port with in the base fabric or
70 * @param[in] bfad - driver instance
71 * @param[in] roles - port roles: IM, TM, IP
72 * @param[in] vf_drv - VF driver instance, NULL if base fabric (no VF)
73 * @param[in] vp_drv - vport driver instance, NULL if base port
77 void bfa_fcb_port_delete(struct bfad_s
*bfad
, enum bfa_port_role roles
,
78 struct bfad_vf_s
*vf_drv
, struct bfad_vport_s
*vp_drv
);
81 * Notification when port transitions to ONLINE state.
83 * Online notification is a logical link up for the local port. This
84 * notification is sent after a successfull FLOGI, or a successful
85 * link initialization in proviate-loop or N2N topologies.
87 * @param[in] bfad - driver instance
88 * @param[in] roles - port roles: IM, TM, IP
89 * @param[in] vf_drv - VF driver instance, NULL if base fabric (no VF)
90 * @param[in] vp_drv - vport driver instance, NULL if base port
94 void bfa_fcb_port_online(struct bfad_s
*bfad
, enum bfa_port_role roles
,
95 struct bfad_vf_s
*vf_drv
, struct bfad_vport_s
*vp_drv
);
98 * Notification when port transitions to OFFLINE state.
100 * Offline notification is a logical link down for the local port.
102 * @param[in] bfad - driver instance
103 * @param[in] roles - port roles: IM, TM, IP
104 * @param[in] vf_drv - VF driver instance, NULL if base fabric (no VF)
105 * @param[in] vp_drv - vport driver instance, NULL if base port
109 void bfa_fcb_port_offline(struct bfad_s
*bfad
, enum bfa_port_role roles
,
110 struct bfad_vf_s
*vf_drv
, struct bfad_vport_s
*vp_drv
);
113 #endif /* __BFA_FCB_PORT_H__ */