Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  *  drivers/s390/net/iucv.h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *    IUCV base support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  *  S390 version
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  *    Copyright 2000, 2006 IBM Corporation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  *    Author(s):Alan Altmark (Alan_Altmark@us.ibm.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  *		Xenia Tkatschow (xenia@us.ibm.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  *    Rewritten for af_iucv:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  *	Martin Schwidefsky <schwidefsky@de.ibm.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)  * Functionality:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)  * To explore any of the IUCV functions, one must first register their
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)  * program using iucv_register(). Once your program has successfully
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)  * completed a register, it can exploit the other functions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)  * For furthur reference on all IUCV functionality, refer to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19)  * CP Programming Services book, also available on the web thru
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)  * www.vm.ibm.com/pubs, manual # SC24-6084
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  * Definition of Return Codes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23)  * - All positive return codes including zero are reflected back
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24)  *   from CP. The definition of each return code can be found in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25)  *   CP Programming Services book.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26)  * - Return Code of:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27)  *   -EINVAL: Invalid value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28)  *   -ENOMEM: storage allocation failed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) #include <linux/types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #include <asm/debug.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36)  * IUCV option flags usable by device drivers:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38)  * IUCV_IPRMDATA  Indicates that your program can handle a message in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39)  *		  parameter list / a message is sent in the parameter list.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40)  *		  Used for iucv_path_accept, iucv_path_connect,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41)  *		  iucv_message_reply, iucv_message_send, iucv_message_send2way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)  * IUCV_IPQUSCE	  Indicates that you do not want to receive messages on this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)  *		  path until an iucv_path_resume is issued.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)  *		  Used for iucv_path_accept, iucv_path_connect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)  * IUCV_IPBUFLST  Indicates that an address list is used for the message data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)  *		  Used for iucv_message_receive, iucv_message_send,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)  *		  iucv_message_send2way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)  * IUCV_IPPRTY	  Specifies that you want to send priority messages.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49)  *		  Used for iucv_path_accept, iucv_path_connect,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50)  *		  iucv_message_reply, iucv_message_send, iucv_message_send2way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51)  * IUCV_IPSYNC	  Indicates a synchronous send request.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)  *		  Used for iucv_message_send, iucv_message_send2way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53)  * IUCV_IPANSLST  Indicates that an address list is used for the reply data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)  *		  Used for iucv_message_reply, iucv_message_send2way.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)  * IUCV_IPLOCAL	  Specifies that the communication partner has to be on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)  *		  local system. If local is specified no target class can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)  *		  specified.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)  *		  Used for iucv_path_connect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)  * All flags are defined in the input field IPFLAGS1 of each function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)  * and can be found in CP Programming Services.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) #define IUCV_IPRMDATA	0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) #define IUCV_IPQUSCE	0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) #define IUCV_IPBUFLST	0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) #define IUCV_IPPRTY	0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) #define IUCV_IPANSLST	0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) #define IUCV_IPSYNC	0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) #define IUCV_IPLOCAL	0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)  * iucv_array : Defines buffer array.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)  * Inside the array may be 31- bit addresses and 31-bit lengths.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)  * Use a pointer to an iucv_array as the buffer, reply or answer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)  * parameter on iucv_message_send, iucv_message_send2way, iucv_message_receive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)  * and iucv_message_reply if IUCV_IPBUFLST or IUCV_IPANSLST are used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) struct iucv_array {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	u32 address;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	u32 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) } __attribute__ ((aligned (8)));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) extern struct bus_type iucv_bus;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) extern struct device *iucv_root;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)  * struct iucv_path
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)  * pathid: 16 bit path identification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89)  * msglim: 16 bit message limit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90)  * flags: properties of the path: IPRMDATA, IPQUSCE, IPPRTY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91)  * handler:  address of iucv handler structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)  * private: private information of the handler associated with the path
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)  * list: list_head for the iucv_handler path list.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) struct iucv_path {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	u16 pathid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	u16 msglim;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	u8  flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	void *private;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	struct iucv_handler *handler;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	struct list_head list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)  * struct iucv_message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)  * id: 32 bit message id
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)  * audit: 32 bit error information of purged or replied messages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)  * class: 32 bit target class of a message (source class for replies)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)  * tag: 32 bit tag to be associated with the message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)  * length: 32 bit length of the message / reply
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)  * reply_size: 32 bit maximum allowed length of the reply
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)  * rmmsg: 8 byte inline message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)  * flags: message properties (IUCV_IPPRTY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) struct iucv_message {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	u32 id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	u32 audit;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	u32 class;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	u32 tag;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	u32 length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	u32 reply_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	u8  rmmsg[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	u8  flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)  * struct iucv_handler
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)  * A vector of functions that handle IUCV interrupts. Each functions gets
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)  * a parameter area as defined by the CP Programming Services and private
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)  * pointer that is provided by the user of the interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) struct iucv_handler {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	 /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	  * The path_pending function is called after an iucv interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	  * type 0x01 has been received. The base code allocates a path
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	  * structure and "asks" the handler if this path belongs to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	  * handler. To accept the path the path_pending function needs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	  * to call iucv_path_accept and return 0. If the callback returns
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	  * a value != 0 the iucv base code will continue with the next
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	  * handler. The order in which the path_pending functions are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	  * called is the order of the registration of the iucv handlers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	  * to the base code.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	int  (*path_pending)(struct iucv_path *, u8 *ipvmid, u8 *ipuser);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	 * The path_complete function is called after an iucv interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	 * type 0x02 has been received for a path that has been established
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	 * for this handler with iucv_path_connect and got accepted by the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	 * peer with iucv_path_accept.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	void (*path_complete)(struct iucv_path *, u8 *ipuser);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	 /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	  * The path_severed function is called after an iucv interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	  * type 0x03 has been received. The communication peer shutdown
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	  * his end of the communication path. The path still exists and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	  * remaining messages can be received until a iucv_path_sever
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	  * shuts down the other end of the path as well.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	void (*path_severed)(struct iucv_path *, u8 *ipuser);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	 * The path_quiesced function is called after an icuv interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	 * type 0x04 has been received. The communication peer has quiesced
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	 * the path. Delivery of messages is stopped until iucv_path_resume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	 * has been called.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	void (*path_quiesced)(struct iucv_path *, u8 *ipuser);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	 * The path_resumed function is called after an icuv interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	 * type 0x05 has been received. The communication peer has resumed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	 * the path.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	void (*path_resumed)(struct iucv_path *, u8 *ipuser);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	 * The message_pending function is called after an icuv interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	 * type 0x06 or type 0x07 has been received. A new message is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	 * available and can be received with iucv_message_receive.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	void (*message_pending)(struct iucv_path *, struct iucv_message *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	 * The message_complete function is called after an icuv interrupt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	 * type 0x08 or type 0x09 has been received. A message send with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	 * iucv_message_send2way has been replied to. The reply can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 	 * received with iucv_message_receive.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	void (*message_complete)(struct iucv_path *, struct iucv_message *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	struct list_head list;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	struct list_head paths;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193)  * iucv_register:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)  * @handler: address of iucv handler structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)  * @smp: != 0 indicates that the handler can deal with out of order messages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)  * Registers a driver with IUCV.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199)  * Returns 0 on success, -ENOMEM if the memory allocation for the pathid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)  * table failed, or -EIO if IUCV_DECLARE_BUFFER failed on all cpus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) int iucv_register(struct iucv_handler *handler, int smp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)  * iucv_unregister
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)  * @handler:  address of iucv handler structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207)  * @smp: != 0 indicates that the handler can deal with out of order messages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)  * Unregister driver from IUCV.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) void iucv_unregister(struct iucv_handler *handle, int smp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)  * iucv_path_alloc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)  * @msglim: initial message limit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)  * @flags: initial flags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)  * @gfp: kmalloc allocation flag
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219)  * Allocate a new path structure for use with iucv_connect.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)  * Returns NULL if the memory allocation failed or a pointer to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222)  * path structure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) static inline struct iucv_path *iucv_path_alloc(u16 msglim, u8 flags, gfp_t gfp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	struct iucv_path *path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 	path = kzalloc(sizeof(struct iucv_path), gfp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	if (path) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 		path->msglim = msglim;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 		path->flags = flags;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 	return path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)  * iucv_path_free
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)  * Frees a path structure.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) static inline void iucv_path_free(struct iucv_path *path)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 	kfree(path);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248)  * iucv_path_accept
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)  * @handler: address of iucv handler structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)  * @userdata: 16 bytes of data reflected to the communication partner
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)  * @private: private data passed to interrupt handlers for this path
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)  * This function is issued after the user received a connection pending
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)  * external interrupt and now wishes to complete the IUCV communication path.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257)  * Returns the result of the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) 		     u8 *userdata, void *private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263)  * iucv_path_connect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265)  * @handler: address of iucv handler structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266)  * @userid: 8-byte user identification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267)  * @system: 8-byte target system identification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)  * @userdata: 16 bytes of data reflected to the communication partner
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269)  * @private: private data passed to interrupt handlers for this path
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)  * This function establishes an IUCV path. Although the connect may complete
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272)  * successfully, you are not able to use the path until you receive an IUCV
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)  * Connection Complete external interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)  * Returns the result of the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 		      u8 *userid, u8 *system, u8 *userdata,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 		      void *private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282)  * iucv_path_quiesce:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)  * @userdata: 16 bytes of data reflected to the communication partner
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)  * This function temporarily suspends incoming messages on an IUCV path.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287)  * You can later reactivate the path by invoking the iucv_resume function.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) int iucv_path_quiesce(struct iucv_path *path, u8 *userdata);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294)  * iucv_path_resume:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296)  * @userdata: 16 bytes of data reflected to the communication partner
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298)  * This function resumes incoming messages on an IUCV path that has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299)  * been stopped with iucv_path_quiesce.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) int iucv_path_resume(struct iucv_path *path, u8 *userdata);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)  * iucv_path_sever
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308)  * @userdata: 16 bytes of data reflected to the communication partner
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310)  * This function terminates an IUCV path.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) int iucv_path_sever(struct iucv_path *path, u8 *userdata);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317)  * iucv_message_purge
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)  * @msg: address of iucv msg structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320)  * @srccls: source class of message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322)  * Cancels a message you have sent.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) int iucv_message_purge(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) 		       u32 srccls);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330)  * iucv_message_receive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332)  * @msg: address of iucv msg structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333)  * @flags: flags that affect how the message is received (IUCV_IPBUFLST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334)  * @buffer: address of data buffer or address of struct iucv_array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335)  * @size: length of data buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336)  * @residual:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)  * This function receives messages that are being sent to you over
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)  * established paths. This function will deal with RMDATA messages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340)  * embedded in struct iucv_message as well.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342)  * Locking:	local_bh_enable/local_bh_disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) int iucv_message_receive(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) 			 u8 flags, void *buffer, size_t size, size_t *residual);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350)  * __iucv_message_receive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352)  * @msg: address of iucv msg structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353)  * @flags: flags that affect how the message is received (IUCV_IPBUFLST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354)  * @buffer: address of data buffer or address of struct iucv_array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355)  * @size: length of data buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356)  * @residual:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358)  * This function receives messages that are being sent to you over
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359)  * established paths. This function will deal with RMDATA messages
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360)  * embedded in struct iucv_message as well.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362)  * Locking:	no locking.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) int __iucv_message_receive(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) 			   u8 flags, void *buffer, size_t size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) 			   size_t *residual);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371)  * iucv_message_reject
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373)  * @msg: address of iucv msg structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375)  * The reject function refuses a specified message. Between the time you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376)  * are notified of a message and the time that you complete the message,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377)  * the message may be rejected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) int iucv_message_reject(struct iucv_path *path, struct iucv_message *msg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384)  * iucv_message_reply
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386)  * @msg: address of iucv msg structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387)  * @flags: how the reply is sent (IUCV_IPRMDATA, IUCV_IPPRTY, IUCV_IPBUFLST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388)  * @reply: address of data buffer or address of struct iucv_array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389)  * @size: length of reply data buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391)  * This function responds to the two-way messages that you receive. You
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392)  * must identify completely the message to which you wish to reply. ie,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393)  * pathid, msgid, and trgcls. Prmmsg signifies the data is moved into
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394)  * the parameter list.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) int iucv_message_reply(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) 		       u8 flags, void *reply, size_t size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402)  * iucv_message_send
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404)  * @msg: address of iucv msg structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405)  * @flags: how the message is sent (IUCV_IPRMDATA, IUCV_IPPRTY, IUCV_IPBUFLST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406)  * @srccls: source class of message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407)  * @buffer: address of data buffer or address of struct iucv_array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408)  * @size: length of send buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410)  * This function transmits data to another application. Data to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411)  * transmitted is in a buffer and this is a one-way message and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412)  * receiver will not reply to the message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414)  * Locking:	local_bh_enable/local_bh_disable
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) int iucv_message_send(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) 		      u8 flags, u32 srccls, void *buffer, size_t size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422)  * __iucv_message_send
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424)  * @msg: address of iucv msg structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425)  * @flags: how the message is sent (IUCV_IPRMDATA, IUCV_IPPRTY, IUCV_IPBUFLST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426)  * @srccls: source class of message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427)  * @buffer: address of data buffer or address of struct iucv_array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428)  * @size: length of send buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430)  * This function transmits data to another application. Data to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431)  * transmitted is in a buffer and this is a one-way message and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432)  * receiver will not reply to the message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434)  * Locking:	no locking.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) int __iucv_message_send(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) 			u8 flags, u32 srccls, void *buffer, size_t size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442)  * iucv_message_send2way
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443)  * @path: address of iucv path structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444)  * @msg: address of iucv msg structure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445)  * @flags: how the message is sent and the reply is received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446)  *	   (IUCV_IPRMDATA, IUCV_IPBUFLST, IUCV_IPPRTY, IUCV_ANSLST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447)  * @srccls: source class of message
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448)  * @buffer: address of data buffer or address of struct iucv_array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449)  * @size: length of send buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450)  * @ansbuf: address of answer buffer or address of struct iucv_array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451)  * @asize: size of reply buffer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453)  * This function transmits data to another application. Data to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454)  * transmitted is in a buffer. The receiver of the send is expected to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455)  * reply to the message and a buffer is provided into which IUCV moves
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456)  * the reply to this message.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458)  * Returns the result from the CP IUCV call.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) int iucv_message_send2way(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) 			  u8 flags, u32 srccls, void *buffer, size_t size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) 			  void *answer, size_t asize, size_t *residual);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) struct iucv_interface {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) 	int (*message_receive)(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466) 		u8 flags, void *buffer, size_t size, size_t *residual);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) 	int (*__message_receive)(struct iucv_path *path,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) 		struct iucv_message *msg, u8 flags, void *buffer, size_t size,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) 		size_t *residual);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) 	int (*message_reply)(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) 		u8 flags, void *reply, size_t size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) 	int (*message_reject)(struct iucv_path *path, struct iucv_message *msg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) 	int (*message_send)(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) 		u8 flags, u32 srccls, void *buffer, size_t size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475) 	int (*__message_send)(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) 		u8 flags, u32 srccls, void *buffer, size_t size);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) 	int (*message_send2way)(struct iucv_path *path,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478) 		struct iucv_message *msg, u8 flags, u32 srccls, void *buffer,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) 		size_t size, void *answer, size_t asize, size_t *residual);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) 	int (*message_purge)(struct iucv_path *path, struct iucv_message *msg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) 		u32 srccls);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) 	int (*path_accept)(struct iucv_path *path, struct iucv_handler *handler,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) 		u8 userdata[16], void *private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) 	int (*path_connect)(struct iucv_path *path,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) 		struct iucv_handler *handler,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) 		u8 userid[8], u8 system[8], u8 userdata[16], void *private);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) 	int (*path_quiesce)(struct iucv_path *path, u8 userdata[16]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) 	int (*path_resume)(struct iucv_path *path, u8 userdata[16]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489) 	int (*path_sever)(struct iucv_path *path, u8 userdata[16]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) 	int (*iucv_register)(struct iucv_handler *handler, int smp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) 	void (*iucv_unregister)(struct iucv_handler *handler, int smp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) 	struct bus_type *bus;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) 	struct device *root;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) extern struct iucv_interface iucv_if;