Release 4.12 include/linux/sed-opal.h
/*
* Copyright © 2016 Intel Corporation
*
* Authors:
* Rafael Antognolli <rafael.antognolli@intel.com>
* Scott Bauer <scott.bauer@intel.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef LINUX_OPAL_H
#define LINUX_OPAL_H
#include <uapi/linux/sed-opal.h>
#include <linux/kernel.h>
struct opal_dev;
typedef int (sec_send_recv)(void *data, u16 spsp, u8 secp, void *buffer,
size_t len, bool send);
#ifdef CONFIG_BLK_SED_OPAL
void free_opal_dev(struct opal_dev *dev);
bool opal_unlock_from_suspend(struct opal_dev *dev);
struct opal_dev *init_opal_dev(void *data, sec_send_recv *send_recv);
int sed_ioctl(struct opal_dev *dev, unsigned int cmd, void __user *ioctl_ptr);
static inline bool is_sed_ioctl(unsigned int cmd)
{
switch (cmd) {
case IOC_OPAL_SAVE:
case IOC_OPAL_LOCK_UNLOCK:
case IOC_OPAL_TAKE_OWNERSHIP:
case IOC_OPAL_ACTIVATE_LSP:
case IOC_OPAL_SET_PW:
case IOC_OPAL_ACTIVATE_USR:
case IOC_OPAL_REVERT_TPR:
case IOC_OPAL_LR_SETUP:
case IOC_OPAL_ADD_USR_TO_LR:
case IOC_OPAL_ENABLE_DISABLE_MBR:
case IOC_OPAL_ERASE_LR:
case IOC_OPAL_SECURE_ERASE_LR:
return true;
}
return false;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Scott Bauer | 59 | 100.00% | 1 | 100.00% |
Total | 59 | 100.00% | 1 | 100.00% |
#else
static inline void free_opal_dev(struct opal_dev *dev)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Scott Bauer | 11 | 100.00% | 1 | 100.00% |
Total | 11 | 100.00% | 1 | 100.00% |
static inline bool is_sed_ioctl(unsigned int cmd)
{
return false;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Scott Bauer | 14 | 100.00% | 1 | 100.00% |
Total | 14 | 100.00% | 1 | 100.00% |
static inline int sed_ioctl(struct opal_dev *dev, unsigned int cmd,
void __user *ioctl_ptr)
{
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Scott Bauer | 24 | 100.00% | 2 | 100.00% |
Total | 24 | 100.00% | 2 | 100.00% |
static inline bool opal_unlock_from_suspend(struct opal_dev *dev)
{
return false;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Scott Bauer | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
#define init_opal_dev(data, send_recv) NULL
#endif /* CONFIG_BLK_SED_OPAL */
#endif /* LINUX_OPAL_H */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Scott Bauer | 225 | 95.34% | 3 | 75.00% |
Christoph Hellwig | 11 | 4.66% | 1 | 25.00% |
Total | 236 | 100.00% | 4 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.