162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved. 362306a36Sopenharmony_ci * Copyright (c) 2004 Infinicon Corporation. All rights reserved. 462306a36Sopenharmony_ci * Copyright (c) 2004 Intel Corporation. All rights reserved. 562306a36Sopenharmony_ci * Copyright (c) 2004 Topspin Corporation. All rights reserved. 662306a36Sopenharmony_ci * Copyright (c) 2004 Voltaire Corporation. All rights reserved. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * This software is available to you under a choice of one of two 962306a36Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 1062306a36Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 1162306a36Sopenharmony_ci * COPYING in the main directory of this source tree, or the 1262306a36Sopenharmony_ci * OpenIB.org BSD license below: 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or 1562306a36Sopenharmony_ci * without modification, are permitted provided that the following 1662306a36Sopenharmony_ci * conditions are met: 1762306a36Sopenharmony_ci * 1862306a36Sopenharmony_ci * - Redistributions of source code must retain the above 1962306a36Sopenharmony_ci * copyright notice, this list of conditions and the following 2062306a36Sopenharmony_ci * disclaimer. 2162306a36Sopenharmony_ci * 2262306a36Sopenharmony_ci * - Redistributions in binary form must reproduce the above 2362306a36Sopenharmony_ci * copyright notice, this list of conditions and the following 2462306a36Sopenharmony_ci * disclaimer in the documentation and/or other materials 2562306a36Sopenharmony_ci * provided with the distribution. 2662306a36Sopenharmony_ci * 2762306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 2862306a36Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2962306a36Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 3062306a36Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 3162306a36Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 3262306a36Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 3362306a36Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 3462306a36Sopenharmony_ci * SOFTWARE. 3562306a36Sopenharmony_ci */ 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#ifndef __AGENT_H_ 3862306a36Sopenharmony_ci#define __AGENT_H_ 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci#include <linux/err.h> 4162306a36Sopenharmony_ci#include <rdma/ib_mad.h> 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ciextern int ib_agent_port_open(struct ib_device *device, int port_num); 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ciextern int ib_agent_port_close(struct ib_device *device, int port_num); 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ciextern void agent_send_response(const struct ib_mad_hdr *mad_hdr, const struct ib_grh *grh, 4862306a36Sopenharmony_ci const struct ib_wc *wc, const struct ib_device *device, 4962306a36Sopenharmony_ci int port_num, int qpn, size_t resp_mad_len, bool opa); 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#endif /* __AGENT_H_ */ 52