z90crypt.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * linux/drivers/s390/crypto/z90crypt.h
  3. *
  4. * z90crypt 1.3.3 (kernel-private header)
  5. *
  6. * Copyright (C) 2001, 2005 IBM Corporation
  7. * Author(s): Robert Burroughs (burrough@us.ibm.com)
  8. * Eric Rossman (edrossma@us.ibm.com)
  9. *
  10. * Hotplug & misc device support: Jochen Roehrig (roehrig@de.ibm.com)
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License as published by
  14. * the Free Software Foundation; either version 2, or (at your option)
  15. * any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  25. */
  26. #ifndef _Z90CRYPT_H_
  27. #define _Z90CRYPT_H_
  28. #include <asm/z90crypt.h>
  29. /**
  30. * local errno definitions
  31. */
  32. #define ENOBUFF 129 // filp->private_data->...>work_elem_p->buffer is NULL
  33. #define EWORKPEND 130 // user issues ioctl while another pending
  34. #define ERELEASED 131 // user released while ioctl pending
  35. #define EQUIESCE 132 // z90crypt quiescing (no more work allowed)
  36. #define ETIMEOUT 133 // request timed out
  37. #define EUNKNOWN 134 // some unrecognized error occured (retry may succeed)
  38. #define EGETBUFF 135 // Error getting buffer or hardware lacks capability
  39. // (retry in software)
  40. /**
  41. * DEPRECATED STRUCTURES
  42. */
  43. /**
  44. * This structure is DEPRECATED and the corresponding ioctl() has been
  45. * replaced with individual ioctl()s for each piece of data!
  46. * This structure will NOT survive past version 1.3.1, so switch to the
  47. * new ioctl()s.
  48. */
  49. #define MASK_LENGTH 64 // mask length
  50. struct ica_z90_status {
  51. int totalcount;
  52. int leedslitecount; // PCICA
  53. int leeds2count; // PCICC
  54. // int PCIXCCCount; is not in struct for backward compatibility
  55. int requestqWaitCount;
  56. int pendingqWaitCount;
  57. int totalOpenCount;
  58. int cryptoDomain;
  59. // status: 0=not there, 1=PCICA, 2=PCICC, 3=PCIXCC_MCL2, 4=PCIXCC_MCL3,
  60. // 5=CEX2C
  61. unsigned char status[MASK_LENGTH];
  62. // qdepth: # work elements waiting for each device
  63. unsigned char qdepth[MASK_LENGTH];
  64. };
  65. #endif /* _Z90CRYPT_H_ */