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