sclp_diag.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright IBM Corp. 2013
  4. * Author(s): Ralf Hoppe (rhoppe@de.ibm.com)
  5. */
  6. #ifndef _SCLP_DIAG_H
  7. #define _SCLP_DIAG_H
  8. #include <linux/types.h>
  9. /* return codes for Diagnostic Test FTP Service, as indicated in member
  10. * sclp_diag_ftp::ldflg
  11. */
  12. #define SCLP_DIAG_FTP_OK 0x80U /* success */
  13. #define SCLP_DIAG_FTP_LDFAIL 0x01U /* load failed */
  14. #define SCLP_DIAG_FTP_LDNPERM 0x02U /* not allowed */
  15. #define SCLP_DIAG_FTP_LDRUNS 0x03U /* LD runs */
  16. #define SCLP_DIAG_FTP_LDNRUNS 0x04U /* LD does not run */
  17. #define SCLP_DIAG_FTP_XPCX 0x80 /* PCX communication code */
  18. #define SCLP_DIAG_FTP_ROUTE 4 /* routing code for new FTP service */
  19. /*
  20. * length of Diagnostic Test FTP Service event buffer
  21. */
  22. #define SCLP_DIAG_FTP_EVBUF_LEN \
  23. (offsetof(struct sclp_diag_evbuf, mdd) + \
  24. sizeof(struct sclp_diag_ftp))
  25. /**
  26. * struct sclp_diag_ftp - Diagnostic Test FTP Service model-dependent data
  27. * @pcx: code for PCX communication (should be 0x80)
  28. * @ldflg: load flag (see defines above)
  29. * @cmd: FTP command
  30. * @pgsize: page size (0 = 4kB, 1 = large page size)
  31. * @srcflg: source flag
  32. * @spare: reserved (zeroes)
  33. * @offset: file offset
  34. * @fsize: file size
  35. * @length: buffer size resp. bytes transferred
  36. * @failaddr: failing address
  37. * @bufaddr: buffer address, virtual
  38. * @asce: region or segment table designation
  39. * @fident: file name (ASCII, zero-terminated)
  40. */
  41. struct sclp_diag_ftp {
  42. u8 pcx;
  43. u8 ldflg;
  44. u8 cmd;
  45. u8 pgsize;
  46. u8 srcflg;
  47. u8 spare;
  48. u64 offset;
  49. u64 fsize;
  50. u64 length;
  51. u64 failaddr;
  52. u64 bufaddr;
  53. u64 asce;
  54. u8 fident[256];
  55. } __packed;
  56. /**
  57. * struct sclp_diag_evbuf - Diagnostic Test (ET7) Event Buffer
  58. * @hdr: event buffer header
  59. * @route: diagnostic route
  60. * @mdd: model-dependent data (@route dependent)
  61. */
  62. struct sclp_diag_evbuf {
  63. struct evbuf_header hdr;
  64. u16 route;
  65. union {
  66. struct sclp_diag_ftp ftp;
  67. } mdd;
  68. } __packed;
  69. /**
  70. * struct sclp_diag_sccb - Diagnostic Test (ET7) SCCB
  71. * @hdr: SCCB header
  72. * @evbuf: event buffer
  73. */
  74. struct sclp_diag_sccb {
  75. struct sccb_header hdr;
  76. struct sclp_diag_evbuf evbuf;
  77. } __packed;
  78. #endif /* _SCLP_DIAG_H */