Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/drivers/s390/crypto/z90crypt.h |
| 3 | * |
David Woodhouse | 80b9192 | 2006-05-08 15:51:57 +0100 | [diff] [blame] | 4 | * z90crypt 1.3.3 (kernel-private header) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | * |
Eric Rossman | 88fbf18 | 2006-01-06 00:19:25 -0800 | [diff] [blame] | 6 | * Copyright (C) 2001, 2005 IBM Corporation |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 | |
| 27 | #ifndef _Z90CRYPT_H_ |
| 28 | #define _Z90CRYPT_H_ |
| 29 | |
David Woodhouse | 80b9192 | 2006-05-08 15:51:57 +0100 | [diff] [blame] | 30 | #include <asm/z90crypt.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | |
| 32 | /** |
| 33 | * local errno definitions |
| 34 | */ |
| 35 | #define ENOBUFF 129 // filp->private_data->...>work_elem_p->buffer is NULL |
| 36 | #define EWORKPEND 130 // user issues ioctl while another pending |
| 37 | #define ERELEASED 131 // user released while ioctl pending |
| 38 | #define EQUIESCE 132 // z90crypt quiescing (no more work allowed) |
| 39 | #define ETIMEOUT 133 // request timed out |
| 40 | #define EUNKNOWN 134 // some unrecognized error occured (retry may succeed) |
| 41 | #define EGETBUFF 135 // Error getting buffer or hardware lacks capability |
| 42 | // (retry in software) |
| 43 | |
| 44 | /** |
| 45 | * DEPRECATED STRUCTURES |
| 46 | */ |
| 47 | |
| 48 | /** |
| 49 | * This structure is DEPRECATED and the corresponding ioctl() has been |
| 50 | * replaced with individual ioctl()s for each piece of data! |
| 51 | * This structure will NOT survive past version 1.3.1, so switch to the |
| 52 | * new ioctl()s. |
| 53 | */ |
| 54 | #define MASK_LENGTH 64 // mask length |
| 55 | struct ica_z90_status { |
| 56 | int totalcount; |
| 57 | int leedslitecount; // PCICA |
| 58 | int leeds2count; // PCICC |
| 59 | // int PCIXCCCount; is not in struct for backward compatibility |
| 60 | int requestqWaitCount; |
| 61 | int pendingqWaitCount; |
| 62 | int totalOpenCount; |
| 63 | int cryptoDomain; |
| 64 | // status: 0=not there, 1=PCICA, 2=PCICC, 3=PCIXCC_MCL2, 4=PCIXCC_MCL3, |
| 65 | // 5=CEX2C |
| 66 | unsigned char status[MASK_LENGTH]; |
| 67 | // qdepth: # work elements waiting for each device |
| 68 | unsigned char qdepth[MASK_LENGTH]; |
| 69 | }; |
| 70 | |
| 71 | #endif /* _Z90CRYPT_H_ */ |