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)  *    SE/HMC Drive FTP Services
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  *    Copyright IBM Corp. 2013
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  *    Author(s): Ralf Hoppe (rhoppe@de.ibm.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #ifndef __HMCDRV_FTP_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #define __HMCDRV_FTP_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/types.h> /* size_t, loff_t */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)  * HMC drive FTP Service max. length of path (w/ EOS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #define HMCDRV_FTP_FIDENT_MAX 192
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)  * enum hmcdrv_ftp_cmdid - HMC drive FTP commands
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)  * @HMCDRV_FTP_NOOP: do nothing (only for probing)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)  * @HMCDRV_FTP_GET: read a file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)  * @HMCDRV_FTP_PUT: (over-) write a file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)  * @HMCDRV_FTP_APPEND: append to a file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)  * @HMCDRV_FTP_DIR: list directory long (ls -l)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)  * @HMCDRV_FTP_NLIST: list files, no directories (name list)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)  * @HMCDRV_FTP_DELETE: delete a file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)  * @HMCDRV_FTP_CANCEL: cancel operation (SCLP/LPAR only)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) enum hmcdrv_ftp_cmdid {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	HMCDRV_FTP_NOOP = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	HMCDRV_FTP_GET = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 	HMCDRV_FTP_PUT = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	HMCDRV_FTP_APPEND = 3,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 	HMCDRV_FTP_DIR = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 	HMCDRV_FTP_NLIST = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 	HMCDRV_FTP_DELETE = 6,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	HMCDRV_FTP_CANCEL = 7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)  * struct hmcdrv_ftp_cmdspec - FTP command specification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)  * @id: FTP command ID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)  * @ofs: offset in file
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)  * @fname: filename (ASCII), null-terminated
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)  * @buf: kernel-space transfer data buffer, 4k aligned
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)  * @len: (max) number of bytes to transfer from/to @buf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) struct hmcdrv_ftp_cmdspec {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 	enum hmcdrv_ftp_cmdid id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 	loff_t ofs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) 	const char *fname;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 	void __kernel *buf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) 	size_t len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) int hmcdrv_ftp_startup(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) void hmcdrv_ftp_shutdown(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) int hmcdrv_ftp_probe(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) ssize_t hmcdrv_ftp_do(const struct hmcdrv_ftp_cmdspec *ftp);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) ssize_t hmcdrv_ftp_cmd(char __kernel *cmd, loff_t offset,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 		       char __user *buf, size_t len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) #endif	 /* __HMCDRV_FTP_H__ */