xref: /openbmc/linux/drivers/infiniband/core/agent.h (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
11da177e4SLinus Torvalds /*
21da177e4SLinus Torvalds  * Copyright (c) 2004 Mellanox Technologies Ltd.  All rights reserved.
31da177e4SLinus Torvalds  * Copyright (c) 2004 Infinicon Corporation.  All rights reserved.
41da177e4SLinus Torvalds  * Copyright (c) 2004 Intel Corporation.  All rights reserved.
51da177e4SLinus Torvalds  * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
61da177e4SLinus Torvalds  * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
71da177e4SLinus Torvalds  *
81da177e4SLinus Torvalds  * This software is available to you under a choice of one of two
91da177e4SLinus Torvalds  * licenses.  You may choose to be licensed under the terms of the GNU
101da177e4SLinus Torvalds  * General Public License (GPL) Version 2, available from the file
111da177e4SLinus Torvalds  * COPYING in the main directory of this source tree, or the
121da177e4SLinus Torvalds  * OpenIB.org BSD license below:
131da177e4SLinus Torvalds  *
141da177e4SLinus Torvalds  *     Redistribution and use in source and binary forms, with or
151da177e4SLinus Torvalds  *     without modification, are permitted provided that the following
161da177e4SLinus Torvalds  *     conditions are met:
171da177e4SLinus Torvalds  *
181da177e4SLinus Torvalds  *      - Redistributions of source code must retain the above
191da177e4SLinus Torvalds  *        copyright notice, this list of conditions and the following
201da177e4SLinus Torvalds  *        disclaimer.
211da177e4SLinus Torvalds  *
221da177e4SLinus Torvalds  *      - Redistributions in binary form must reproduce the above
231da177e4SLinus Torvalds  *        copyright notice, this list of conditions and the following
241da177e4SLinus Torvalds  *        disclaimer in the documentation and/or other materials
251da177e4SLinus Torvalds  *        provided with the distribution.
261da177e4SLinus Torvalds  *
271da177e4SLinus Torvalds  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
281da177e4SLinus Torvalds  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
291da177e4SLinus Torvalds  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
301da177e4SLinus Torvalds  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
311da177e4SLinus Torvalds  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
321da177e4SLinus Torvalds  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
331da177e4SLinus Torvalds  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
341da177e4SLinus Torvalds  * SOFTWARE.
351da177e4SLinus Torvalds  */
361da177e4SLinus Torvalds 
371da177e4SLinus Torvalds #ifndef __AGENT_H_
381da177e4SLinus Torvalds #define __AGENT_H_
391da177e4SLinus Torvalds 
402d3c0b7bSAl Viro #include <linux/err.h>
4134816ad9SSean Hefty #include <rdma/ib_mad.h>
421da177e4SLinus Torvalds 
4334816ad9SSean Hefty extern int ib_agent_port_open(struct ib_device *device, int port_num);
441da177e4SLinus Torvalds 
451da177e4SLinus Torvalds extern int ib_agent_port_close(struct ib_device *device, int port_num);
461da177e4SLinus Torvalds 
47c9082e51SIra Weiny extern void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh,
4873cdaaeeSIra Weiny 				const struct ib_wc *wc, const struct ib_device *device,
49*8e4349d1SIra Weiny 				int port_num, int qpn, size_t resp_mad_len, bool opa);
501da177e4SLinus Torvalds 
511da177e4SLinus Torvalds #endif	/* __AGENT_H_ */
52