sclp_diag.h 2.1 KB

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