FreeBSD kernel pms device code
lxencrypt.h
Go to the documentation of this file.
1/*******************************************************************************
2*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved.
3*
4*Redistribution and use in source and binary forms, with or without modification, are permitted provided
5*that the following conditions are met:
6*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
7*following disclaimer.
8*2. Redistributions in binary form must reproduce the above copyright notice,
9*this list of conditions and the following disclaimer in the documentation and/or other materials provided
10*with the distribution.
11*
12*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
20*
21* $FreeBSD$
22*
23*******************************************************************************/
24/*******************************************************************************
25**
26** Version Control Information:
27**
28** $Revision: 114125 $
29** $Author: lindfors $
30** $Date: 2012-01-06 17:12:27 -0800 (Fri, 06 Jan 2012) $
31** $Id: lxencrypt.h 112360 2012-01-07 01:12:27Z mcleanda $
32**
33*******************************************************************************/
34
35//#ifndef __LXENCRYPT_H__
36//#define __LXENCRYPT_H__
37
38
48#include <sys/param.h> //zone allocation
49#include <sys/queue.h> //zone allocation
50#include <vm/uma.h> //zone allocation
51
52
53#ifndef __LXENCRYPT_H__
54#define __LXENCRYPT_H__
55
56#define IOERR_QUEUE_DEPTH_MAX 1024
57
58enum {
75
76typedef struct ag_encrypt_ioerr_s {
77 struct list_head *list;
79
81#ifdef ENCRYPT_ENHANCE
82
83
84ssize_t set_dek_table_entry0(struct device *dev, struct device_attribute *attr, const char *buf, size_t len);
85ssize_t show_dek_table_entry0(struct device *dev, struct device_attribute *attr, char *buf);
86ssize_t set_dek_table_entry1(struct device *dev, struct device_attribute *attr, const char *buf, size_t len);
87ssize_t show_dek_table_entry1(struct device *dev, struct device_attribute *attr, char *buf);
88ssize_t show_kek_table(struct device *dev, struct device_attribute *attr, char *buf);
89ssize_t show_dek_kek_map0(struct device *dev, struct device_attribute *attr, char *buf);
90ssize_t show_dek_kek_map1(struct device *dev, struct device_attribute *attr, char *buf);
91ssize_t show_target_dek_map(struct device *dev, struct device_attribute *attr, char *buf);
92
93#endif
98int agtiapi_SetupEncryptedIO(struct agtiapi_softc *pCard, ccb_t *pccb, unsigned long long block);
101
102#endif
103
bit32 device
Definition: encrypt_ioctl.h:2
@ E_NO_LBA_MAP
Definition: lxencrypt.h:72
@ E_DEK_TABLE
Definition: lxencrypt.h:61
@ E_NOT_FOUND
Definition: lxencrypt.h:73
@ E_KEK_INDEX
Definition: lxencrypt.h:62
@ E_BAD_CIPHER_MODE
Definition: lxencrypt.h:70
@ E_CHANNEL_INDEX
Definition: lxencrypt.h:63
@ E_FLAGS
Definition: lxencrypt.h:68
@ E_NO_TARGET_MAP
Definition: lxencrypt.h:71
@ E_MEMPOOL_ALLOC
Definition: lxencrypt.h:67
@ E_DEVICE_INDEX
Definition: lxencrypt.h:64
@ E_DEK_INDEX
Definition: lxencrypt.h:60
@ E_ENCRYPTION_DISABLED
Definition: lxencrypt.h:69
@ E_SUCCESS
Definition: lxencrypt.h:59
@ E_LUN_INDEX
Definition: lxencrypt.h:65
@ E_LBA_RANGE
Definition: lxencrypt.h:66
struct ag_encrypt_ioerr_s ag_encrypt_ioerr_t
void agtiapi_CleanupEncryptedIO(struct agtiapi_softc *pCard, ccb_t *pccb)
int agtiapi_SetupEncryptionPools(struct agtiapi_softc *pCard)
enum @0 encrypt_error_e
struct agtiapi_softc * pCard
Definition: lxencrypt.h:80
void agtiapi_HandleEncryptedIOFailure(ag_device_t *pDev, ccb_t *pccb)
Definition: agtiapi.c:4218
void agtiapi_CleanupEncryption(struct agtiapi_softc *pCard)
int agtiapi_SetupEncryptedIO(struct agtiapi_softc *pCard, ccb_t *pccb, unsigned long long block)
int agtiapi_SetupEncryption(struct agtiapi_softc *pCard)
void agtiapi_CleanupEncryptionPools(struct agtiapi_softc *pCard)
Definition: agtiapi.h:70
struct list_head * list
Definition: lxencrypt.h:77