xref: /illumos-gate/usr/src/uts/common/io/bnxe/bnxe_mm_l5.c (revision 8c69cc8fbe729fa7b091e901c4b50508ccc6bb33)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2014 QLogic Corporation
24  * The contents of this file are subject to the terms of the
25  * QLogic End User License (the "License").
26  * You may not use this file except in compliance with the License.
27  *
28  * You can obtain a copy of the License at
29  * http://www.qlogic.com/Resources/Documents/DriverDownloadHelp/
30  * QLogic_End_User_Software_License.txt
31  * See the License for the specific language governing permissions
32  * and limitations under the License.
33  */
34 
35 #include "bnxe.h"
36 
37 
38 lm_status_t
39 mm_sc_comp_l5_request(
40         IN struct _lm_device_t *pdev,
41         IN struct iscsi_kcqe *kcqes,
42         IN u32_t num_kcqes
43         )
44 {
45     BnxeDbgBreak((um_device_t *)pdev);
46     return 0;
47 }
48 
49 
50 lm_status_t
51 mm_fc_comp_request(
52     IN struct _lm_device_t          *pdev,
53     IN struct fcoe_kcqe             *kcqes,
54     IN u32_t                        num_kcqes)
55 {
56     return (!BnxeFcoeCompRequestCqe((um_device_t *)pdev, kcqes, num_kcqes)) ?
57                LM_STATUS_FAILURE : LM_STATUS_SUCCESS;
58 }
59 
60 
61 lm_status_t mm_sc_complete_init_request(lm_device_t *pdev, struct iscsi_kcqe *kcqe)
62 {
63     BnxeDbgBreak((um_device_t *)pdev);
64     return 0;
65 }
66 
67 
68 u8_t
69 mm_sc_is_omgr_enabled(struct _lm_device_t *_pdev)
70 {
71     BnxeDbgBreak((um_device_t *)_pdev);
72     return 0;
73 }
74 
75 
76 lm_status_t
77 mm_sc_omgr_flush_rx(
78     IN struct _lm_device_t      *_pdev,
79     IN struct iscsi_kcqe        *kcqe_recv,
80     IN u32_t                     cid)
81 {
82     BnxeDbgBreak((um_device_t *)_pdev);
83     return 0;
84 }
85 
86 
87 lm_status_t mm_sc_complete_update_request(lm_device_t *pdev, struct iscsi_kcqe *kcqe)
88 {
89     BnxeDbgBreak((um_device_t *)pdev);
90     return 0;
91 }
92 
93 
94 lm_status_t
95 mm_fc_complete_init_request(
96     IN    lm_device_t               *pdev,
97     IN    struct fcoe_kcqe          *kcqe)
98 {
99     return (!BnxeFcoeInitCqe((um_device_t *)pdev, kcqe)) ?
100                LM_STATUS_FAILURE : LM_STATUS_SUCCESS;
101 }
102 
103 
104 lm_status_t
105 mm_fc_complete_destroy_request(
106     IN    lm_device_t               *pdev,
107     IN    struct fcoe_kcqe          *kcqe)
108 {
109     return (!BnxeFcoeDestroyCqe((um_device_t *)pdev, kcqe)) ?
110                LM_STATUS_FAILURE : LM_STATUS_SUCCESS;
111 }
112 
113 
114 lm_status_t
115 mm_fc_complete_ofld_request(
116     IN    lm_device_t               *pdev,
117     IN    lm_fcoe_state_t           *fcoe,
118     IN    struct fcoe_kcqe          *kcqe)
119 {
120     return (!BnxeFcoeOffloadConnCqe((um_device_t *)pdev,
121                                     (BnxeFcoeState *)fcoe,
122                                     kcqe)) ?
123                LM_STATUS_FAILURE : LM_STATUS_SUCCESS;
124 }
125 
126 
127 lm_status_t
128 mm_fc_complete_enable_request(
129     IN    lm_device_t               *pdev,
130     IN    lm_fcoe_state_t           *fcoe,
131     IN    struct fcoe_kcqe          *kcqe)
132 {
133     return (!BnxeFcoeEnableConnCqe((um_device_t *)pdev,
134                                    (BnxeFcoeState *)fcoe,
135                                    kcqe)) ?
136                LM_STATUS_FAILURE : LM_STATUS_SUCCESS;
137 }
138 
139 
140 lm_status_t
141 mm_fc_complete_stat_request(
142     IN    lm_device_t               *pdev,
143     IN    struct fcoe_kcqe          *kcqe)
144 {
145     return (!BnxeFcoeStatCqe((um_device_t *)pdev, kcqe)) ?
146                LM_STATUS_FAILURE : LM_STATUS_SUCCESS;
147 }
148 
149 
150 lm_status_t
151 mm_fc_complete_disable_request(
152     IN    lm_device_t               *pdev,
153     IN    lm_fcoe_state_t           *fcoe,
154     IN    struct fcoe_kcqe          *kcqe)
155 {
156     return (!BnxeFcoeDisableConnCqe((um_device_t *)pdev,
157                                     (BnxeFcoeState *)fcoe,
158                                     kcqe)) ?
159                LM_STATUS_FAILURE : LM_STATUS_SUCCESS;
160 }
161 
162 
163 lm_status_t
164 mm_fc_complete_terminate_request(
165     IN    lm_device_t               *pdev,
166     IN    lm_fcoe_state_t           *fcoe,
167     IN    struct fcoe_kcqe          *kcqe)
168 {
169     return (!BnxeFcoeDestroyConnCqe((um_device_t *)pdev,
170                                     (BnxeFcoeState *)fcoe,
171                                     kcqe)) ?
172                LM_STATUS_FAILURE : LM_STATUS_SUCCESS;
173 }
174 
175 
176 lm_status_t mm_sc_complete_offload_request(
177     IN    lm_device_t                *pdev,
178     IN    lm_iscsi_state_t           *iscsi,
179     IN    lm_status_t                 comp_status
180     )
181 {
182     BnxeDbgBreak((um_device_t *)pdev);
183     return 0;
184 }
185 
186