~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/ntb_transport.h

Version: ~ [ linux-5.2-rc4 ] ~ [ linux-5.1.9 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.50 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.125 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.181 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.181 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.68 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * This file is provided under a dual BSD/GPLv2 license.  When using or
  3  *   redistributing this file, you may do so under either license.
  4  *
  5  *   GPL LICENSE SUMMARY
  6  *
  7  *   Copyright(c) 2012 Intel Corporation. All rights reserved.
  8  *   Copyright (C) 2015 EMC Corporation. All Rights Reserved.
  9  *
 10  *   This program is free software; you can redistribute it and/or modify
 11  *   it under the terms of version 2 of the GNU General Public License as
 12  *   published by the Free Software Foundation.
 13  *
 14  *   BSD LICENSE
 15  *
 16  *   Copyright(c) 2012 Intel Corporation. All rights reserved.
 17  *   Copyright (C) 2015 EMC Corporation. All Rights Reserved.
 18  *
 19  *   Redistribution and use in source and binary forms, with or without
 20  *   modification, are permitted provided that the following conditions
 21  *   are met:
 22  *
 23  *     * Redistributions of source code must retain the above copyright
 24  *       notice, this list of conditions and the following disclaimer.
 25  *     * Redistributions in binary form must reproduce the above copy
 26  *       notice, this list of conditions and the following disclaimer in
 27  *       the documentation and/or other materials provided with the
 28  *       distribution.
 29  *     * Neither the name of Intel Corporation nor the names of its
 30  *       contributors may be used to endorse or promote products derived
 31  *       from this software without specific prior written permission.
 32  *
 33  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 34  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 35  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 36  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 37  *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 38  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 39  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 40  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 41  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 42  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 43  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 44  *
 45  * PCIe NTB Transport Linux driver
 46  *
 47  * Contact Information:
 48  * Jon Mason <jon.mason@intel.com>
 49  */
 50 
 51 struct ntb_transport_qp;
 52 
 53 struct ntb_transport_client {
 54         struct device_driver driver;
 55         int (*probe)(struct device *client_dev);
 56         void (*remove)(struct device *client_dev);
 57 };
 58 
 59 int ntb_transport_register_client(struct ntb_transport_client *drvr);
 60 void ntb_transport_unregister_client(struct ntb_transport_client *drvr);
 61 int ntb_transport_register_client_dev(char *device_name);
 62 void ntb_transport_unregister_client_dev(char *device_name);
 63 
 64 struct ntb_queue_handlers {
 65         void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data,
 66                            void *data, int len);
 67         void (*tx_handler)(struct ntb_transport_qp *qp, void *qp_data,
 68                            void *data, int len);
 69         void (*event_handler)(void *data, int status);
 70 };
 71 
 72 unsigned char ntb_transport_qp_num(struct ntb_transport_qp *qp);
 73 unsigned int ntb_transport_max_size(struct ntb_transport_qp *qp);
 74 struct ntb_transport_qp *
 75 ntb_transport_create_queue(void *data, struct device *client_dev,
 76                            const struct ntb_queue_handlers *handlers);
 77 void ntb_transport_free_queue(struct ntb_transport_qp *qp);
 78 int ntb_transport_rx_enqueue(struct ntb_transport_qp *qp, void *cb, void *data,
 79                              unsigned int len);
 80 int ntb_transport_tx_enqueue(struct ntb_transport_qp *qp, void *cb, void *data,
 81                              unsigned int len);
 82 void *ntb_transport_rx_remove(struct ntb_transport_qp *qp, unsigned int *len);
 83 void ntb_transport_link_up(struct ntb_transport_qp *qp);
 84 void ntb_transport_link_down(struct ntb_transport_qp *qp);
 85 bool ntb_transport_link_query(struct ntb_transport_qp *qp);
 86 unsigned int ntb_transport_tx_free_entry(struct ntb_transport_qp *qp);
 87 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp