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 #ifndef BNXE_LOCKS_INLINE
38
BNXE_LOCK_ENTER_INTR(um_device_t * pUM,int idx)39 void BNXE_LOCK_ENTER_INTR (um_device_t * pUM, int idx) { mutex_enter(&pUM->intrMutex[idx]); }
BNXE_LOCK_EXIT_INTR(um_device_t * pUM,int idx)40 void BNXE_LOCK_EXIT_INTR (um_device_t * pUM, int idx) { mutex_exit(&pUM->intrMutex[idx]); }
BNXE_LOCK_ENTER_INTR_FLIP(um_device_t * pUM,int idx)41 void BNXE_LOCK_ENTER_INTR_FLIP (um_device_t * pUM, int idx) { mutex_enter(&pUM->intrFlipMutex[idx]); }
BNXE_LOCK_EXIT_INTR_FLIP(um_device_t * pUM,int idx)42 void BNXE_LOCK_EXIT_INTR_FLIP (um_device_t * pUM, int idx) { mutex_exit(&pUM->intrFlipMutex[idx]); }
BNXE_LOCK_ENTER_TX(um_device_t * pUM,int idx)43 void BNXE_LOCK_ENTER_TX (um_device_t * pUM, int idx) { mutex_enter(&pUM->txq[idx].txMutex); }
BNXE_LOCK_EXIT_TX(um_device_t * pUM,int idx)44 void BNXE_LOCK_EXIT_TX (um_device_t * pUM, int idx) { mutex_exit(&pUM->txq[idx].txMutex); }
BNXE_LOCK_ENTER_FREETX(um_device_t * pUM,int idx)45 void BNXE_LOCK_ENTER_FREETX (um_device_t * pUM, int idx) { mutex_enter(&pUM->txq[idx].freeTxDescMutex);}
BNXE_LOCK_EXIT_FREETX(um_device_t * pUM,int idx)46 void BNXE_LOCK_EXIT_FREETX (um_device_t * pUM, int idx) { mutex_exit(&pUM->txq[idx].freeTxDescMutex); }
BNXE_LOCK_ENTER_RX(um_device_t * pUM,int idx)47 void BNXE_LOCK_ENTER_RX (um_device_t * pUM, int idx) { mutex_enter(&pUM->rxq[idx].rxMutex); }
BNXE_LOCK_EXIT_RX(um_device_t * pUM,int idx)48 void BNXE_LOCK_EXIT_RX (um_device_t * pUM, int idx) { mutex_exit(&pUM->rxq[idx].rxMutex); }
BNXE_LOCK_ENTER_DONERX(um_device_t * pUM,int idx)49 void BNXE_LOCK_ENTER_DONERX (um_device_t * pUM, int idx) { mutex_enter(&pUM->rxq[idx].doneRxMutex); }
BNXE_LOCK_EXIT_DONERX(um_device_t * pUM,int idx)50 void BNXE_LOCK_EXIT_DONERX (um_device_t * pUM, int idx) { mutex_exit(&pUM->rxq[idx].doneRxMutex); }
BNXE_LOCK_ENTER_SB(um_device_t * pUM,int idx)51 void BNXE_LOCK_ENTER_SB (um_device_t * pUM, int idx) { mutex_enter(&pUM->sbMutex[idx]); }
BNXE_LOCK_EXIT_SB(um_device_t * pUM,int idx)52 void BNXE_LOCK_EXIT_SB (um_device_t * pUM, int idx) { mutex_exit(&pUM->sbMutex[idx]); }
BNXE_LOCK_ENTER_ETH_CON(um_device_t * pUM)53 void BNXE_LOCK_ENTER_ETH_CON (um_device_t * pUM) { mutex_enter(&pUM->ethConMutex); }
BNXE_LOCK_EXIT_ETH_CON(um_device_t * pUM)54 void BNXE_LOCK_EXIT_ETH_CON (um_device_t * pUM) { mutex_exit(&pUM->ethConMutex); }
BNXE_LOCK_ENTER_MCP(um_device_t * pUM)55 void BNXE_LOCK_ENTER_MCP (um_device_t * pUM) { mutex_enter(&pUM->mcpMutex); }
BNXE_LOCK_EXIT_MCP(um_device_t * pUM)56 void BNXE_LOCK_EXIT_MCP (um_device_t * pUM) { mutex_exit(&pUM->mcpMutex); }
BNXE_LOCK_ENTER_PHY(um_device_t * pUM)57 void BNXE_LOCK_ENTER_PHY (um_device_t * pUM) { mutex_enter(&pUM->phyMutex); }
BNXE_LOCK_EXIT_PHY(um_device_t * pUM)58 void BNXE_LOCK_EXIT_PHY (um_device_t * pUM) { mutex_exit(&pUM->phyMutex); }
BNXE_LOCK_ENTER_IND(um_device_t * pUM)59 void BNXE_LOCK_ENTER_IND (um_device_t * pUM) { mutex_enter(&pUM->indMutex); }
BNXE_LOCK_EXIT_IND(um_device_t * pUM)60 void BNXE_LOCK_EXIT_IND (um_device_t * pUM) { mutex_exit(&pUM->indMutex); }
BNXE_LOCK_ENTER_CID(um_device_t * pUM)61 void BNXE_LOCK_ENTER_CID (um_device_t * pUM) { mutex_enter(&pUM->cidMutex); }
BNXE_LOCK_EXIT_CID(um_device_t * pUM)62 void BNXE_LOCK_EXIT_CID (um_device_t * pUM) { mutex_exit(&pUM->cidMutex); }
BNXE_LOCK_ENTER_SPQ(um_device_t * pUM)63 void BNXE_LOCK_ENTER_SPQ (um_device_t * pUM) { mutex_enter(&pUM->spqMutex); }
BNXE_LOCK_EXIT_SPQ(um_device_t * pUM)64 void BNXE_LOCK_EXIT_SPQ (um_device_t * pUM) { mutex_exit(&pUM->spqMutex); }
BNXE_LOCK_ENTER_SPREQ(um_device_t * pUM)65 void BNXE_LOCK_ENTER_SPREQ (um_device_t * pUM) { mutex_enter(&pUM->spReqMutex); }
BNXE_LOCK_EXIT_SPREQ(um_device_t * pUM)66 void BNXE_LOCK_EXIT_SPREQ (um_device_t * pUM) { mutex_exit(&pUM->spReqMutex); }
BNXE_LOCK_ENTER_RRREQ(um_device_t * pUM)67 void BNXE_LOCK_ENTER_RRREQ (um_device_t * pUM) { mutex_enter(&pUM->rrReqMutex); }
BNXE_LOCK_EXIT_RRREQ(um_device_t * pUM)68 void BNXE_LOCK_EXIT_RRREQ (um_device_t * pUM) { mutex_exit(&pUM->rrReqMutex); }
BNXE_LOCK_ENTER_ISLES_CONTROL(um_device_t * pUM)69 void BNXE_LOCK_ENTER_ISLES_CONTROL (um_device_t * pUM) { mutex_enter(&pUM->islesCtrlMutex); }
BNXE_LOCK_EXIT_ISLES_CONTROL(um_device_t * pUM)70 void BNXE_LOCK_EXIT_ISLES_CONTROL (um_device_t * pUM) { mutex_exit(&pUM->islesCtrlMutex); }
BNXE_LOCK_ENTER_TOE(um_device_t * pUM)71 void BNXE_LOCK_ENTER_TOE (um_device_t * pUM) { mutex_enter(&pUM->toeMutex); }
BNXE_LOCK_EXIT_TOE(um_device_t * pUM)72 void BNXE_LOCK_EXIT_TOE (um_device_t * pUM) { mutex_exit(&pUM->toeMutex); }
BNXE_LOCK_ENTER_MEM(um_device_t * pUM)73 void BNXE_LOCK_ENTER_MEM (um_device_t * pUM) { mutex_enter(&pUM->memMutex); }
BNXE_LOCK_EXIT_MEM(um_device_t * pUM)74 void BNXE_LOCK_EXIT_MEM (um_device_t * pUM) { mutex_exit(&pUM->memMutex); }
BNXE_LOCK_ENTER_OFFLOAD(um_device_t * pUM)75 void BNXE_LOCK_ENTER_OFFLOAD (um_device_t * pUM) { mutex_enter(&pUM->offloadMutex); }
BNXE_LOCK_EXIT_OFFLOAD(um_device_t * pUM)76 void BNXE_LOCK_EXIT_OFFLOAD (um_device_t * pUM) { mutex_exit(&pUM->offloadMutex); }
BNXE_LOCK_ENTER_HWINIT(um_device_t * pUM)77 void BNXE_LOCK_ENTER_HWINIT (um_device_t * pUM) { mutex_enter(&pUM->hwInitMutex); }
BNXE_LOCK_EXIT_HWINIT(um_device_t * pUM)78 void BNXE_LOCK_EXIT_HWINIT (um_device_t * pUM) { mutex_exit(&pUM->hwInitMutex); }
BNXE_LOCK_ENTER_GLD(um_device_t * pUM)79 void BNXE_LOCK_ENTER_GLD (um_device_t * pUM) { mutex_enter(&pUM->gldMutex); }
BNXE_LOCK_EXIT_GLD(um_device_t * pUM)80 void BNXE_LOCK_EXIT_GLD (um_device_t * pUM) { mutex_exit(&pUM->gldMutex); }
BNXE_LOCK_ENTER_GLDTX(um_device_t * pUM,krw_t rw)81 void BNXE_LOCK_ENTER_GLDTX (um_device_t * pUM, krw_t rw) { rw_enter(&pUM->gldTxMutex, rw); }
BNXE_LOCK_EXIT_GLDTX(um_device_t * pUM)82 void BNXE_LOCK_EXIT_GLDTX (um_device_t * pUM) { rw_exit(&pUM->gldTxMutex); }
BNXE_LOCK_ENTER_TIMER(um_device_t * pUM)83 void BNXE_LOCK_ENTER_TIMER (um_device_t * pUM) { mutex_enter(&pUM->timerMutex); }
BNXE_LOCK_EXIT_TIMER(um_device_t * pUM)84 void BNXE_LOCK_EXIT_TIMER (um_device_t * pUM) { mutex_exit(&pUM->timerMutex); }
BNXE_LOCK_ENTER_STATS(um_device_t * pUM)85 void BNXE_LOCK_ENTER_STATS (um_device_t * pUM) { mutex_enter(&pUM->kstatMutex); }
BNXE_LOCK_EXIT_STATS(um_device_t * pUM)86 void BNXE_LOCK_EXIT_STATS (um_device_t * pUM) { mutex_exit(&pUM->kstatMutex); }
87
88 #endif /* BNXE_LOCKS_INLINE */
89
90