1 /* 2 * Copyright (c) 2014, Cisco Systems, Inc. All rights reserved. 3 * 4 * LICENSE_BEGIN 5 * 6 * This software is available to you under a choice of one of two 7 * licenses. You may choose to be licensed under the terms of the GNU 8 * General Public License (GPL) Version 2, available from the file 9 * COPYING in the main directory of this source tree, or the 10 * BSD license below: 11 * 12 * Redistribution and use in source and binary forms, with or 13 * without modification, are permitted provided that the following 14 * conditions are met: 15 * 16 * - Redistributions of source code must retain the above 17 * copyright notice, this list of conditions and the following 18 * disclaimer. 19 * 20 * - Redistributions in binary form must reproduce the above 21 * copyright notice, this list of conditions and the following 22 * disclaimer in the documentation and/or other materials 23 * provided with the distribution. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 28 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 29 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 30 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 31 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 32 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 33 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 35 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 * POSSIBILITY OF SUCH DAMAGE. 37 * 38 * LICENSE_END 39 * 40 * 41 */ 42 43 #ifndef _USD_IB_SYSFS_ 44 #define _USD_IB_SYSFS_ 45 46 #include <sys/param.h> 47 48 /* 49 * Forward structure defs 50 */ 51 struct usd_device; 52 53 /* 54 * Definition of a usnic IB entry 55 */ 56 struct usd_ib_dev { 57 char id_name[80]; 58 char id_usnic_name[USD_MAX_DEVNAME]; 59 char id_dev_path[PATH_MAX]; /* path to IB dev */ 60 char id_class_path[PATH_MAX]; /* path to IB class info */ 61 62 struct usd_ib_dev *id_next; 63 }; 64 65 int usd_ib_get_devlist(struct usd_ib_dev **dev_list); 66 int usd_get_mac(struct usd_device *dev, uint8_t * mac); 67 int usd_get_iface(struct usd_device *dev); 68 int usd_get_usnic_config(struct usd_device *dev); 69 int usd_get_firmware(struct usd_device *dev); 70 int usd_read_cap_ver(struct usd_device *dev, char *cap_name, int *vers_o); 71 #endif /* _USD_IB_SYSFS_ */ 72