struct ap_driver {
struct device_driver driver;
- struct ap_device_id *ids;
- unsigned int flags;
int (*probe)(struct ap_device *);
void (*remove)(struct ap_device *);
*/
void (*on_scan_complete)(struct ap_config_info *new_config_info,
struct ap_config_info *old_config_info);
+
+ struct ap_device_id *ids;
+ unsigned int flags;
};
#define to_ap_drv(x) container_of_const((x), struct ap_driver, driver)
struct ap_card {
struct ap_device ap_dev;
struct ap_tapq_hwinfo hwinfo; /* TAPQ GR2 content */
- int id; /* AP card number. */
+ atomic64_t total_request_count; /* # requests ever for this AP device.*/
unsigned int maxmsgsize; /* AP msg limit for this card */
+ int id; /* AP card number. */
bool config; /* configured state */
bool chkstop; /* checkstop state */
- atomic64_t total_request_count; /* # requests ever for this AP device.*/
};
#define TAPQ_CARD_HWINFO_MASK 0xFFFF0000FFFF0F0FUL
struct hlist_node hnode; /* Node for the ap_queues hashtable */
struct ap_card *card; /* Ptr to assoc. AP card. */
spinlock_t lock; /* Per device lock. */
+ u64 total_request_count; /* # requests ever for this AP device.*/
enum ap_dev_state dev_state; /* queue device state */
- bool config; /* configured state */
- bool chkstop; /* checkstop state */
ap_qid_t qid; /* AP queue id. */
unsigned int se_bstate; /* SE bind state (BS) */
unsigned int assoc_idx; /* SE association index */
int queue_count; /* # messages currently on AP queue. */
int pendingq_count; /* # requests on pendingq list. */
int requestq_count; /* # requests on requestq list. */
- u64 total_request_count; /* # requests ever for this AP device.*/
int request_timeout; /* Request timeout in jiffies. */
struct timer_list timeout; /* Timer for request timeouts. */
struct list_head pendingq; /* List of message sent to AP queue. */
enum ap_sm_state sm_state; /* ap queue state machine state */
int rapq_fbit; /* fbit arg for next rapq invocation */
int last_err_rc; /* last error state response code */
+ bool config; /* configured state */
+ bool chkstop; /* checkstop state */
};
#define to_ap_queue(x) container_of((x), struct ap_queue, ap_dev.device)
void *msg; /* Pointer to message buffer. */
size_t len; /* actual msg len in msg buffer */
size_t bufsize; /* allocated msg buffer size */
- u16 flags; /* Flags, see AP_MSG_FLAG_xxx */
- int rc; /* Return code for this message */
- struct ap_response_type response;
/* receive is called from tasklet context */
void (*receive)(struct ap_queue *, struct ap_message *,
struct ap_message *);
+ struct ap_response_type response;
+ int rc; /* Return code for this message */
+ u16 flags; /* Flags, see AP_MSG_FLAG_xxx */
};
#define AP_MSG_FLAG_SPECIAL 0x0001 /* flag msg as 'special' with NQAP */
struct list_head list; /* Device list. */
struct list_head zqueues; /* List of zcrypt queues */
struct kref refcount; /* device refcounting */
- struct ap_card *card; /* The "real" ap card device. */
int online; /* User online/offline */
-
- int user_space_type; /* User space device id. */
+ struct ap_card *card; /* The "real" ap card device. */
char *type_string; /* User space device name. */
+ int user_space_type; /* User space device id. */
int min_mod_size; /* Min number of bits. */
int max_mod_size; /* Max number of bits. */
int max_exp_bit_length;
const int *speed_rating; /* Speed idx of crypto ops. */
atomic_t load; /* Utilization of the crypto device */
-
int request_count; /* # current requests. */
};
struct zcrypt_queue {
struct list_head list; /* Device list. */
struct kref refcount; /* device refcounting */
+ int online; /* User online/offline */
struct zcrypt_card *zcard;
struct zcrypt_ops *ops; /* Crypto operations. */
struct ap_queue *queue; /* The "real" ap queue device. */
- int online; /* User online/offline */
-
+ struct ap_message reply; /* Per-device reply structure. */
atomic_t load; /* Utilization of the crypto device */
-
int request_count; /* # current requests. */
-
- struct ap_message reply; /* Per-device reply structure. */
};
/* transport layer rescanning */
/* struct to hold info for each CCA queue */
struct cca_info {
- int hwtype; /* one of the defined AP_DEVICE_TYPE_* */
+ u8 new_asym_mkvp[16]; /* verify pattern of new asym master key */
+ u8 cur_asym_mkvp[16]; /* verify pattern of current asym master key */
+ u8 old_asym_mkvp[16]; /* verify pattern of old asym master key */
+ u8 new_aes_mkvp[8]; /* truncated sha256 of new aes master key */
+ u8 cur_aes_mkvp[8]; /* truncated sha256 of current aes master key */
+ u8 old_aes_mkvp[8]; /* truncated sha256 of old aes master key */
+ u8 new_apka_mkvp[8]; /* truncated sha256 of new apka master key */
+ u8 cur_apka_mkvp[8]; /* truncated sha256 of current apka mk */
+ u8 old_apka_mkvp[8]; /* truncated sha256 of old apka mk */
+ char serial[9]; /* serial number (8 ascii numbers + 0x00) */
char new_aes_mk_state; /* '1' empty, '2' partially full, '3' full */
char cur_aes_mk_state; /* '1' invalid, '2' valid */
char old_aes_mk_state; /* '1' invalid, '2' valid */
char new_asym_mk_state; /* '1' empty, '2' partially full, '3' full */
char cur_asym_mk_state; /* '1' invalid, '2' valid */
char old_asym_mk_state; /* '1' invalid, '2' valid */
- u8 new_aes_mkvp[8]; /* truncated sha256 of new aes master key */
- u8 cur_aes_mkvp[8]; /* truncated sha256 of current aes master key */
- u8 old_aes_mkvp[8]; /* truncated sha256 of old aes master key */
- u8 new_apka_mkvp[8]; /* truncated sha256 of new apka master key */
- u8 cur_apka_mkvp[8]; /* truncated sha256 of current apka mk */
- u8 old_apka_mkvp[8]; /* truncated sha256 of old apka mk */
- u8 new_asym_mkvp[16]; /* verify pattern of new asym master key */
- u8 cur_asym_mkvp[16]; /* verify pattern of current asym master key */
- u8 old_asym_mkvp[16]; /* verify pattern of old asym master key */
- char serial[9]; /* serial number (8 ascii numbers + 0x00) */
+ int hwtype; /* one of the defined AP_DEVICE_TYPE_* */
};
/*
/* EP11 card info struct */
struct ep11_card_info {
+ u64 op_mode; /* card operational mode(s) */
+ char serial[16]; /* serial number string (16 ascii, no 0x00 !) */
u32 API_ord_nr; /* API ordinal number */
u16 FW_version; /* Firmware major and minor version */
- char serial[16]; /* serial number string (16 ascii, no 0x00 !) */
- u64 op_mode; /* card operational mode(s) */
};
/* EP11 domain info struct */
struct ep11_domain_info {
- char cur_wk_state; /* '0' invalid, '1' valid */
- char new_wk_state; /* '0' empty, '1' uncommitted, '2' committed */
+ u64 op_mode; /* domain operational mode(s) */
u8 cur_wkvp[32]; /* current wrapping key verification pattern */
u8 new_wkvp[32]; /* new wrapping key verification pattern */
- u64 op_mode; /* domain operational mode(s) */
+ char cur_wk_state; /* '0' invalid, '1' valid */
+ char new_wk_state; /* '0' empty, '1' uncommitted, '2' committed */
};
/*