/* * Copyright (C) 2004,2007,2008 IBM Corporation * * Authors: * Leendert van Doorn * Dave Safford * Reiner Sailer * Kylene Hall * Debora Velarde * * Maintained by: * * Device driver for TCG/TCPA TPM (trusted platform module). * Specifications at www.trustedcomputinggroup.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation, version 2 of the * License. * */ #ifndef __LINUX_TPM_H__ #define __LINUX_TPM_H__ #define TPM_DIGEST_SIZE 20 /* Max TPM v1.2 PCR size */ struct tpm_chip; struct trusted_key_payload; struct trusted_key_options; enum TPM_OPS_FLAGS { TPM_OPS_AUTO_STARTUP = BIT(0), }; struct tpm_class_ops { unsigned int flags; const u8 req_complete_mask; const u8 req_complete_val; bool (*req_canceled)(struct tpm_chip *chip, u8 status); int (*recv) (struct tpm_chip *chip, u8 *buf, size_t len); int (*send) (struct tpm_chip *chip, u8 *buf, size_t len); void (*cancel) (struct tpm_chip *chip); u8 (*status) (struct tpm_chip *chip); bool (*update_timeouts)(struct tpm_chip *chip, unsigned long *timeout_cap); int (*go_idle)(struct tpm_chip *chip); int (*cmd_ready)(struct tpm_chip *chip); int (*request_locality)(struct tpm_chip *chip, int loc); int (*relinquish_locality)(struct tpm_chip *chip, int loc); void (*clk_enable)(struct tpm_chip *chip, bool value); }; #if defined(CONFIG_TCG_TPM) || defined(CONFIG_TCG_TPM_MODULE) extern int tpm_is_tpm2(struct tpm_chip *chip); extern int tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf); extern int tpm_pcr_extend(struct tpm_chip *chip, int pcr_idx, const u8 *hash); extern int tpm_send(struct tpm_chip *chip, void *cmd, size_t buflen); extern int tpm_get_random(struct tpm_chip *chip, u8 *data, size_t max); extern int tpm_seal_trusted(struct tpm_chip *chip, struct trusted_key_payload *payload, struct trusted_key_options *options); extern int tpm_unseal_trusted(struct tpm_chip *chip, struct trusted_key_payload *payload, struct trusted_key_options *options); extern struct tpm_chip *tpm_default_chip(void); #else static inline int tpm_is_tpm2(struct tpm_chip *chip) { return -ENODEV; } static inline int tpm_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf) { return -ENODEV; } static inline int tpm_pcr_extend(struct tpm_chip *chip, int pcr_idx, const u8 *hash) { return -ENODEV; } static inline int tpm_send(struct tpm_chip *chip, void *cmd, size_t buflen) { return -ENODEV; } static inline int tpm_get_random(struct tpm_chip *chip, u8 *data, size_t max) { return -ENODEV; } static inline int tpm_seal_trusted(struct tpm_chip *chip, struct trusted_key_payload *payload, struct trusted_key_options *options) { return -ENODEV; } static inline int tpm_unseal_trusted(struct tpm_chip *chip, struct trusted_key_payload *payload, struct trusted_key_options *options) { return -ENODEV; } static inline struct tpm_chip *tpm_default_chip(void) { return NULL; } #endif #endif '/cgit/git.armlinux.org.uk/linux-net-next.git/commit/drivers/net/ethernet?id=f1733b273724207a2c650ee94799d2ec752e50c7'>net: mvneta: use resolved link config in mac_link_up()Russell King 2020-02-26net: macb: use resolved link config in mac_link_up()Russell King 2020-02-26net: dpaa2-mac: use resolved link config in mac_link_up()Russell King 2020-02-26net: axienet: use resolved link config in mac_link_up()Russell King 2020-02-26net: phylink: propagate resolved link config via mac_link_up()Russell King 2020-02-24net: ethernet: stmmac: don't warn about missing optional wakeup IRQAhmad Fatoum 2020-02-24net: ethernet: stmmac: demote warnings about missing optional clocksAhmad Fatoum 2020-02-24net: bcmgenet: reduce severity of missing clock warningsJeremy Linton 2020-02-24net: bcmgenet: Fetch MAC address from the adapterJeremy Linton 2020-02-24net: bcmgenet: Initial bcmgenet ACPI supportJeremy Linton 2020-02-24net: bcmgenet: enable automatic phy discoveryJeremy Linton 2020-02-24net: bcmgenet: refactor phy mode configurationJeremy Linton 2020-02-24freescale: Replace zero-length array with flexible-array memberGustavo A. R. Silva 2020-02-24intel: Replace zero-length array with flexible-array memberGustavo A. R. Silva 2020-02-24netronome: Replace zero-length array with flexible-array memberGustavo A. R. Silva 2020-02-24toshiba: Replace zero-length array with flexible-array memberGustavo A. R. Silva 2020-02-24chelsio: Replace zero-length array with flexible-array memberGustavo A. R. Silva 2020-02-24mlxsw: spectrum_trap: Add ACL devlink-trap supportJiri Pirko 2020-02-24mlxsw: spectrum_trap: Introduce dummy group with thin policerJiri Pirko 2020-02-24mlxsw: core: Extend MLXSW_RXL_DIS to register disabled trap groupJiri Pirko 2020-02-24mlxsw: core: Allow to enable/disable rx_listener for trapJiri Pirko 2020-02-24mlxsw: acl_flex_actions: Trap all ACL dropped packets to DISCARD_*_ACL trapsJiri Pirko 2020-02-24mlxsw: spectrum_acl: Pass the ingress indication down to flex actionJiri Pirko 2020-02-24mlxsw: spectrum_flower: Disable mixed bound blocks to contain action dropJiri Pirko 2020-02-24mlxsw: spectrum_acl: Track ingress and egress block bindingsJiri Pirko 2020-02-24mlxsw: spectrum_trap: Prepare mlxsw_core_trap_action_set() to handle not only...Jiri Pirko 2020-02-24mlxsw: spectrum_trap: Use listener->en/dis_action instead of hard-coded valuesJiri Pirko 2020-02-24mlxsw: core: Allow to register disabled traps using MLXSW_RXL_DISJiri Pirko 2020-02-24mlxsw: spectrum_trap: Set unreg_action to be SET_FW_DEFAULTJiri Pirko 2020-02-24net/atheros: Clean atheros code from driver versionLeon Romanovsky