18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright IBM Corp. 2013 48c2ecf20Sopenharmony_ci * Author(s): Ralf Hoppe (rhoppe@de.ibm.com) 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef _SCLP_DIAG_H 88c2ecf20Sopenharmony_ci#define _SCLP_DIAG_H 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include <linux/types.h> 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci/* return codes for Diagnostic Test FTP Service, as indicated in member 138c2ecf20Sopenharmony_ci * sclp_diag_ftp::ldflg 148c2ecf20Sopenharmony_ci */ 158c2ecf20Sopenharmony_ci#define SCLP_DIAG_FTP_OK 0x80U /* success */ 168c2ecf20Sopenharmony_ci#define SCLP_DIAG_FTP_LDFAIL 0x01U /* load failed */ 178c2ecf20Sopenharmony_ci#define SCLP_DIAG_FTP_LDNPERM 0x02U /* not allowed */ 188c2ecf20Sopenharmony_ci#define SCLP_DIAG_FTP_LDRUNS 0x03U /* LD runs */ 198c2ecf20Sopenharmony_ci#define SCLP_DIAG_FTP_LDNRUNS 0x04U /* LD does not run */ 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define SCLP_DIAG_FTP_XPCX 0x80 /* PCX communication code */ 228c2ecf20Sopenharmony_ci#define SCLP_DIAG_FTP_ROUTE 4 /* routing code for new FTP service */ 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci/* 258c2ecf20Sopenharmony_ci * length of Diagnostic Test FTP Service event buffer 268c2ecf20Sopenharmony_ci */ 278c2ecf20Sopenharmony_ci#define SCLP_DIAG_FTP_EVBUF_LEN \ 288c2ecf20Sopenharmony_ci (offsetof(struct sclp_diag_evbuf, mdd) + \ 298c2ecf20Sopenharmony_ci sizeof(struct sclp_diag_ftp)) 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci/** 328c2ecf20Sopenharmony_ci * struct sclp_diag_ftp - Diagnostic Test FTP Service model-dependent data 338c2ecf20Sopenharmony_ci * @pcx: code for PCX communication (should be 0x80) 348c2ecf20Sopenharmony_ci * @ldflg: load flag (see defines above) 358c2ecf20Sopenharmony_ci * @cmd: FTP command 368c2ecf20Sopenharmony_ci * @pgsize: page size (0 = 4kB, 1 = large page size) 378c2ecf20Sopenharmony_ci * @srcflg: source flag 388c2ecf20Sopenharmony_ci * @spare: reserved (zeroes) 398c2ecf20Sopenharmony_ci * @offset: file offset 408c2ecf20Sopenharmony_ci * @fsize: file size 418c2ecf20Sopenharmony_ci * @length: buffer size resp. bytes transferred 428c2ecf20Sopenharmony_ci * @failaddr: failing address 438c2ecf20Sopenharmony_ci * @bufaddr: buffer address, virtual 448c2ecf20Sopenharmony_ci * @asce: region or segment table designation 458c2ecf20Sopenharmony_ci * @fident: file name (ASCII, zero-terminated) 468c2ecf20Sopenharmony_ci */ 478c2ecf20Sopenharmony_cistruct sclp_diag_ftp { 488c2ecf20Sopenharmony_ci u8 pcx; 498c2ecf20Sopenharmony_ci u8 ldflg; 508c2ecf20Sopenharmony_ci u8 cmd; 518c2ecf20Sopenharmony_ci u8 pgsize; 528c2ecf20Sopenharmony_ci u8 srcflg; 538c2ecf20Sopenharmony_ci u8 spare; 548c2ecf20Sopenharmony_ci u64 offset; 558c2ecf20Sopenharmony_ci u64 fsize; 568c2ecf20Sopenharmony_ci u64 length; 578c2ecf20Sopenharmony_ci u64 failaddr; 588c2ecf20Sopenharmony_ci u64 bufaddr; 598c2ecf20Sopenharmony_ci u64 asce; 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci u8 fident[256]; 628c2ecf20Sopenharmony_ci} __packed; 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci/** 658c2ecf20Sopenharmony_ci * struct sclp_diag_evbuf - Diagnostic Test (ET7) Event Buffer 668c2ecf20Sopenharmony_ci * @hdr: event buffer header 678c2ecf20Sopenharmony_ci * @route: diagnostic route 688c2ecf20Sopenharmony_ci * @mdd: model-dependent data (@route dependent) 698c2ecf20Sopenharmony_ci */ 708c2ecf20Sopenharmony_cistruct sclp_diag_evbuf { 718c2ecf20Sopenharmony_ci struct evbuf_header hdr; 728c2ecf20Sopenharmony_ci u16 route; 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci union { 758c2ecf20Sopenharmony_ci struct sclp_diag_ftp ftp; 768c2ecf20Sopenharmony_ci } mdd; 778c2ecf20Sopenharmony_ci} __packed; 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci/** 808c2ecf20Sopenharmony_ci * struct sclp_diag_sccb - Diagnostic Test (ET7) SCCB 818c2ecf20Sopenharmony_ci * @hdr: SCCB header 828c2ecf20Sopenharmony_ci * @evbuf: event buffer 838c2ecf20Sopenharmony_ci */ 848c2ecf20Sopenharmony_cistruct sclp_diag_sccb { 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci struct sccb_header hdr; 878c2ecf20Sopenharmony_ci struct sclp_diag_evbuf evbuf; 888c2ecf20Sopenharmony_ci} __packed; 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci#endif /* _SCLP_DIAG_H */ 91