Implement circular buffer protocol over receive dma
buffer. Add extension to the mei message header that holds
length of the buffer on the dma buffer.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
drivers/misc/mei/client.c| 2 +-
drivers/misc/mei/dma-ring.c | 61
The DMA ring control block contains write and read
indices for host and device circular buffers.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
drivers/misc/mei/dma-ring.c | 20
drivers/misc/mei/hbm.c | 2 ++
drivers/misc/mei/hw.h | 23
From: Alexander Usyskin
Bump HBM version to 2.1 to indicate DMA transfer support.
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/hw.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h
index
DMA ring is allocated upon HBM handshake and the ring parameters are set
via dedicated HBM_DMA_SETUP request command. The firmware will perform
its setup and respond with a status. On failure the DMA buffers are
released.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
on the TX
DMA circular buffer and later, returns the number of empty slots on the
TX DMA circular buffer.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
drivers/misc/mei/client.c | 64 --
drivers/misc/mei/dma-ring.c | 89
From: Alexander Usyskin
MEI enables writes of complete messages only
while read can be performed in parts, hence
write should not update the file offset to
not break interleaving partial reads with writes.
Cc:
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/misc
quot;)
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/bus-fixup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c
index 65e28be3c8cc..4c232f0eae90 100644
--- a/drivers/misc/mei/bus-fixup.c
+++ b/drivers/misc/mei/b
The first patch is a rebase of Dan's patch over misc-next version
of the driver. It should go also to the stable.
Second one fixes a same issue introduced in next cycle:
"mei: expose fw version to sysfs"
Dan Carpenter (1):
mei: bus: type promotion bug in mei_nfc_if_version()
T
d treated as success.
Cc:
Fixes: 582ab27a063a ("mei: bus: fix received data size check in NFC fixup")
Signed-off-by: Dan Carpenter
Signed-off-by: Tomas Winkler
---
V2: rebase
drivers/misc/mei/bus-fixup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/
only after granting
locality)
Cc: sta...@vger.kernel.org
Fixes: 888d867df441 (tpm: cmd_ready command can be issued only after granting
locality)
Signed-off-by: Tomas Winkler
---
V2-3:resent
V4: 1. Use tpm_pm_suspend/resume in tpm_crb
2. Drop cmd_ready/go_idle around tpm_chip_register, as the
Define new a type: uc_string_id for easier string
handling and less casting. Reduce number or string
copies in price of a dynamic allocation.
Signed-off-by: Tomas Winkler
---
drivers/scsi/ufs/ufs-sysfs.c | 20 ++---
drivers/scsi/ufs/ufs.h | 2 +-
drivers/scsi/ufs/ufshcd.c| 164
From: Alexander Usyskin
single_recv_buf member of struct mei_client_properties has a boolean
value and can be represented in on bit, to free other 7 bits
for another usage.
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/hw.h | 3 ++-
1 file changed, 2
command.
Last, fix the wrong 'goto out', that jumped back instead of forward.
Cc: sta...@vger.kernel.org
Fixes: 627448e85c76 ("tpm: separate cmd_ready/go_idle from runtime_pm")
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-interface.c | 15 ---
1 file changed
ust the kdoc to the new standard.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
drivers/char/tpm/st33zp24/st33zp24.c | 2 +-
drivers/char/tpm/tpm-interface.c | 24
drivers/char/tpm/tpm.h | 1 +
drivers/c
struct tpm_input_header pcrextend_header = {
^~~~
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Reviewed-by: Nayna Jain
Tested-by: Nayna Jain
---
V2-V3: Rebase
V4: Remove defines.
V5: Resend
V6: Add Tested-by:
drivers/char/tpm/tpm
Make the tpm Makefile a bit more in order by putting
objects in one column.
Signed-off-by: Tomas Winkler
Tested-by: Jarkko Sakkinen
Reviewed-by: Jarkko Sakkinen
---
V2: 1. back to tpm-y notation
2. Partially sort files alphanumerically.
V3: Rebase
V4: Remove redunant sentence in commit
kdoc comments for tpm2_calc_ordinal_duration().
Signed-off-by: Tomas Winkler
Tested-by: Jarkko Sakkinen
---
V2-V3: Rebase.
V4: 1. Fix kdoc
2. Rename tpm2_ordinal_duration() to tpm2_ordinal_duration_index()
3. Move the two functions close to each other in the file.
V5: Adjust the kdoc to
x27;s platforms.
V6: 1. Dropping tpm: move pcr extend code to tpm2-cmd.c and rebasing code over
that change
2. Trivial fixes in kdoc and header
Tomas Winkler (21):
tpm2: add new tpm2 commands according to TCG 1.36
tpm: sort objects in the Makefile
tpm: factor out tpm 1.x duration calcul
Factor out TPM 1.x commands calculation into tpm1-cmd.c file.
and change the prefix from tpm_ to tpm1_.
No functional change is done here.
Signed-off-by: Tomas Winkler
Tested-by: Jarkko Sakkinen
---
V2-V3: Rebase
V4: 1. Remove the licence statement it's already covered by SPDX.
2. Add
Add wrapper tpm_auto_startup() to tpm-interface.c
instead of open coded decision between TPM 1.x and TPM 2.x
in tpm-chip.c
Signed-off-by: Tomas Winkler
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4: Fix the commit message.
V5-V6: Resend.
drivers/char/tpm/tpm-chip.c | 11
Factor out tpm_get_timeouts() into tpm2_get_timeouts()
and tpm1_get_timeouts()
V2-V3: Rebase
V4: Fix the commit message.
V5: Resend.
V6: Remove tpm1_auto_startup() declaration.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
drivers/char/tpm/tpm
t;TSC_MAX_ORDINAL" is not used
[-Wunused-macros]
tpm-interface.c:38:0: warning: macro "TPM_CONNECTION_COMMAND" is not used
[-Wunused-macros]
Fixes: f72864300139 ("tpm_tis: further simplify calculation of ordinal
duration")
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkk
1. Use tpm_buf in tpm1_get_random()
2. Fix comment in tpm_get_random() so it is clear that
the function is expected to return number of random bytes.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4: Resend.
V5: A small
Factor out get random implementation from tpm-interface.c
into tpm1_get_random function in tpm1-cmd.c.
No functional changes.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkine
---
V2-V3: Rebase
V4-V8: Resend
drivers/char/tpm/tpm-interface.c | 58
Move the tpm1 selftest code functions to tpm1-cmd.c
and adjust callers to use the new function names.
1. tpm_pcr_read_dev() to tpm1_pcr_read_dev().
2. tpm_continue_selftest() to tpm1_continue_selftest().
3. tpm_do_selftest() to tpm1_do_selftest()
Signed-off-by: Tomas Winkler
Tested-by: Jarkko
Remove unneeded semicolon in tpm2_map_response_header()
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
---
V3: New in the series.
V4-V6: Resend.
drivers/char/tpm/tpm2-space.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm2-space.c b/drivers
Rename tpm1_pcr_read_dev to tpm1_pcr_read() to match
the counterpart tpm2_pcr_read().
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
---
V4: New in the series
V5-V6: Resend.
drivers/char/tpm/tpm-interface.c | 2 +-
drivers/char/tpm/tpm-sysfs.c | 2 +-
drivers/char/tpm/tpm.h
Implement tpm1_pcr_read_dev() using tpm_buf and remove
now unneeded structures from tpm.h
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4-V6: Resend.
drivers/char/tpm/tpm.h | 18 ++
drivers/char/tpm/tpm1
Factor out TPM 1.x suspend flow from tpm-interface.c into a new function
tpm1_pm_suspend() in tpm1-cmd.c
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase
V4: 1. Add kdoc for tpm1_pm_suspend().
2. Fix commit message.
V5: Adjust the kdoc to the new standard.
V6: Rebase
drivers/char/tpm/tpm
TPM manual startup is used only from within TPM 1.x or TPM 2.x
code, hence remove tpm_startup() function from tpm-interface.c
and add two static functions implementations tpm1_startup()
and tpm2_startup() into to tpm1-cmd.c and tpm2-cmd.c respectively.
Signed-off-by: Tomas Winkler
Tested-by
Reimplement tpm1_continue_selftest() using tpm_buf structure.
This is the last command using the old tpm_cmd_t structure
and now the structure can be removed.
Cc: Nayna Jain
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4
PCR related
functions.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
---
V3: New in the series.
V4: Separate unrelated change to another patches.
V5: Fix the commit message.
V6: Rebased.
drivers/char/tpm/tpm-interface.c| 6 +++---
drivers/char/tpm/tpm-sysfs.c| 2
In tpm1_pm_suspend() function reimplement,
TPM_ORD_SAVESTATE comamnd using tpm_buf.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4-V6: Resend
drivers/char/tpm/tpm1-cmd.c | 22 --
1 file changed, 12
used [-Wunused-const-variable=]
static const struct tpm_input_header tpm_getcap_header = {
^
3. Drop unused TPM_DIGEST_SIZE. It's already defined in
include/linux/tpm.h
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Test
tpm_i2c_nuvoton calculated commands duration using TPM 1.x
values via tpm_calc_ordinal_duration() also for TPM 2.x chips.
Call tpm2_calc_ordinal_duration() for retrieving ordinal
duration for TPM 2.X chips.
Cc: Nayna Jain
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm_i2c_nuvoton.c | 11
kdoc for tpm2_flush_context_cmd() was off.
Fixes: commit 9aa36b399a50 ("tpm: export tpm2_flush_context_cmd")'
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm2-cmd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/char/tpm/tpm2-cmd.c b/driver
Drop BUG() from the hbm handler in order not to crash the whole
kernel on faulty firmware implementation. Instead of it, just return
an error resulting into link reset.
There is no any known issue of faulty firmware in this matter,
the change is just to ease the development.
Signed-off-by: Tomas
: Tomas Winkler
---
drivers/misc/mei/client.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index ee58561ceb08..1fe9426ce48b 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -1357,7 +1357,9
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/client.c | 21 ++---
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index ebdcf0b450e2..ee58561ceb08 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei
t;tpm: separate cmd_ready/go_idle from runtime_pm")
Signed-off-by: Tomas Winkler
---
drivers/char/tpm/tpm-interface.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 129f640424b7..f69c711bf74a 10
kdoc for tpm2_flush_context_cmd() was off.
Fixes: 9aa36b399a50 ("tpm: export tpm2_flush_context_cmd")'
Signed-off-by: Tomas Winkler
---
V2: drop 'commit' from Fixes:
drivers/char/tpm/tpm2-cmd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dr
kdoc for tpm2_flush_context_cmd() was off.
Fixes: 9aa36b399a50 ("tpm: export tpm2_flush_context_cmd")'
Signed-off-by: Tomas Winkler
---
V2: drop 'commit' from Fixes:
V3: Align arguments with tab.
drivers/char/tpm/tpm2-cmd.c | 7 +++
1 file changed, 3 insertions
Remove redundant lines in the kdoc:
Fixes kdoc warnings:
drivers/char/tpm/tpm_ibmvtpm.c:42: warning: Cannot understand *
on line 42 - I thought it was a doc line
drivers/char/tpm/tpm_ibmvtpm.c:57: warning: Cannot understand *
on line 57 - I thought it was a doc line
Signed-off-by: Tomas
Add convenient wrapper for ordinal duration computation
to remove boiler plate if else statement over TPM2.
if (chip->flags & TPM_CHIP_FLAG_TPM2)
tpm2_calc_ordinal_duration(chip, ordinal);
else
tpm1_calc_ordinal_duration(chip, ordinal);
Signed-off-by: Tomas Winkler
Revi
x27;s platforms.
V6: 1. Dropping tpm: move pcr extend code to tpm2-cmd.c and rebasing code over
that change
2. Trivial fixes in kdoc and header
V7: 1. Add backportable patch for nuvoton duration calculation
2. Rebase durations patches over it.
3. Fix notorious typo tmp->tpm
Tomas
Factor out TPM 1.x commands calculation into tpm1-cmd.c file.
and change the prefix from tpm_ to tpm1_.
No functional change is done here.
Signed-off-by: Tomas Winkler
Tested-by: Jarkko Sakkinen
---
V2-V3: Rebase
V4: 1. Remove the licence statement it's already covered by SPDX.
2. Add
Factor out tpm_get_timeouts() into tpm2_get_timeouts()
and tpm1_get_timeouts()
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V2-V3: Rebase
V4: Fix the commit message.
V5: Resend.
V6: Remove tpm1_auto_startup() declaration.
V7: Resend.
drivers/char
Factor out get random implementation from tpm-interface.c
into tpm1_get_random function in tpm1-cmd.c.
No functional changes.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkine
---
V2-V3: Rebase
V4-V7: Resend
drivers/char/tpm/tpm-interface.c | 58
Move the tpm1 selftest code functions to tpm1-cmd.c
and adjust callers to use the new function names.
1. tpm_pcr_read_dev() to tpm1_pcr_read_dev().
2. tpm_continue_selftest() to tpm1_continue_selftest().
3. tpm_do_selftest() to tpm1_do_selftest()
Signed-off-by: Tomas Winkler
Tested-by: Jarkko
used [-Wunused-const-variable=]
static const struct tpm_input_header tpm_getcap_header = {
^
3. Drop unused TPM_DIGEST_SIZE. It's already defined in
include/linux/tpm.h
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Test
struct tpm_input_header pcrextend_header = {
^~~~
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Reviewed-by: Nayna Jain
Tested-by: Nayna Jain
---
V2-V3: Rebase
V4: Remove defines.
V5: Resend
V6: Add Tested-by:
V7: Resend.
drivers
tpm_i2c_nuvoton calculated commands duration using TPM 1.x
values via tpm_calc_ordinal_duration() also for TPM 2.x chips.
Call tpm2_calc_ordinal_duration() for retrieving ordinal
duration for TPM 2.X chips.
Cc: sta...@vger.kernel.org
Cc: Nayna Jain
Signed-off-by: Tomas Winkler
Reviewed-by
Remove unneeded semicolon in tpm2_map_response_header()
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
---
V3: New in the series.
V4-V7: Resend.
drivers/char/tpm/tpm2-space.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm2-space.c b/drivers
In tpm1_pm_suspend() function reimplement,
TPM_ORD_SAVESTATE comamnd using tpm_buf.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4-V7: Resend
drivers/char/tpm/tpm1-cmd.c | 22 --
1 file changed, 12
Rename tpm1_pcr_read_dev to tpm1_pcr_read() to match
the counterpart tpm2_pcr_read().
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
---
V4: New in the series
V5: Resend.
V6: Resend.
V7: Fix typo tmp->tpm
drivers/char/tpm/tpm-interface.c | 2 +-
drivers/char/tpm/tpm-sysfs.c
1. Use tpm_buf in tpm1_get_random()
2. Fix comment in tpm_get_random() so it is clear that
the function is expected to return number of random bytes.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4: Resend.
V5: A small
TPM manual startup is used only from within TPM 1.x or TPM 2.x
code, hence remove tpm_startup() function from tpm-interface.c
and add two static functions implementations tpm1_startup()
and tpm2_startup() into to tpm1-cmd.c and tpm2-cmd.c respectively.
Signed-off-by: Tomas Winkler
Tested-by
t;TSC_MAX_ORDINAL" is not used
[-Wunused-macros]
tpm-interface.c:38:0: warning: macro "TPM_CONNECTION_COMMAND" is not used
[-Wunused-macros]
Fixes: f72864300139 ("tpm_tis: further simplify calculation of ordinal
duration")
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkk
Implement tpm1_pcr_read_dev() using tpm_buf and remove
now unneeded structures from tpm.h
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4-V7: Resend.
drivers/char/tpm/tpm.h | 18 ++
drivers/char/tpm/tpm1
Factor out TPM 1.x suspend flow from tpm-interface.c into a new function
tpm1_pm_suspend() in tpm1-cmd.c
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase.
V4: 1. Add kdoc for tpm1_pm_suspend().
2. Fix commit message.
V5: Adjust the kdoc to the new standard.
V6: Rebase.
V7: Resend.
drivers
Add wrapper tpm_auto_startup() to tpm-interface.c
instead of open coded decision between TPM 1.x and TPM 2.x
in tpm-chip.c
Signed-off-by: Tomas Winkler
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4: Fix the commit message.
V5-7: Resend.
drivers/char/tpm/tpm-chip.c | 11
PCR related
functions.
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
---
V3: New in the series.
V4: Separate unrelated change to another patches.
V5: Fix the commit message.
V6: Rebased.
V7: Resend.
drivers/char/tpm/tpm-interface.c| 6 +++---
drivers/char/tpm/tpm-sysfs.c
Reimplement tpm1_continue_selftest() using tpm_buf structure.
This is the last command using the old tpm_cmd_t structure
and now the structure can be removed.
Cc: Nayna Jain
Signed-off-by: Tomas Winkler
Reviewed-by: Jarkko Sakkinen
Tested-by: Jarkko Sakkinen
---
V3: New in the series.
V4
kdoc comments for tpm2_calc_ordinal_duration().
Signed-off-by: Tomas Winkler
Tested-by: Jarkko Sakkinen
---
V2-V3: Rebase.
V4: 1. Fix kdoc
2. Rename tpm2_ordinal_duration() to tpm2_ordinal_duration_index()
3. Move the two functions close to each other in the file.
V5: Adjust the kdoc to
Make the tpm Makefile a bit more in order by putting
objects in one column.
Signed-off-by: Tomas Winkler
Tested-by: Jarkko Sakkinen
Reviewed-by: Jarkko Sakkinen
---
V2: 1. back to tpm-y notation
2. Partially sort files alphanumerically.
V3: Rebase
V4: Remove redunant sentence in commit
x27;s platforms.
Tomas Winkler (20):
tpm2: add new tpm2 commands according to TCG 1.36
tpm: sort objects in the Makefile
tpm: factor out tpm 1.x duration calculation to tpm1-cmd.c
tpm: add tpm_calc_ordinal_duration wrapper
tpm: factor out tpm_get_timeouts
tpm: move tpm1_pcr_extend to
tpm1_pcr_extend() function.
Signed-off-by: Tomas Winkler
---
V3: new in the series
drivers/char/tpm/tpm-interface.c| 4 ++--
drivers/char/tpm/tpm-sysfs.c| 4 ++--
drivers/char/tpm/tpm.h | 10 +-
drivers/char/tpm/tpm1-cmd.c | 14 ++
drivers/char/tpm
Factor out tpm_get_timeouts into tpm2_get_timeouts
and tpm1_get_timeouts.
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase
drivers/char/tpm/tpm-interface.c | 127 ++-
drivers/char/tpm/tpm.h | 5 +-
drivers/char/tpm/tpm1-cmd.c | 106
Reimplement tpm1_continue_selftest() using tpm_buf structure.
This is the last command using the old tpm_cmd_t structure
and now the structure can be removed.
Signed-off-by: Tomas Winkler
---
V3: new in the series
drivers/char/tpm/tpm.h | 9 -
drivers/char/tpm/tpm1-cmd.c | 16
Move the tpm1 selftest code functions to tpm1-cmd.c
and adjust callers to use the new function names.
1. tpm_pcr_read_dev to tpm1_pcr_read_dev
2. tpm_continue_selftest to tpm1_continue_selftest
3. tpm_do_selftest to tpm1_do_selftest
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase
drivers
Factor out tpm 1.x commands calculation into tpm1-cmd.c file.
and change the prefix from tpm_ to tpm1_.
No functional change is done here.
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase
drivers/char/tpm/Makefile| 1 +
drivers/char/tpm/st33zp24/st33zp24.c | 2 +-
drivers/char/tpm
Make the tpm Makefile a bit more in order by putting
objects in one column and group together tpm2 modules
Signed-off-by: Tomas Winkler
---
V2: 1. back to tpm-y notation
2. Partially sort files alphanumerically.
V3: Rebase
drivers/char/tpm/Makefile | 15 ---
1 file changed, 12
1. Use tpm_buf in tpm1_get_random()
2. Fix comment in tpm_get_random() so it is clear that
the function is expected to return number of random bytes.
Signed-off-by: Tomas Winkler
---
V3: new in the series
drivers/char/tpm/tpm-interface.c | 2 +-
drivers/char/tpm/tpm.h | 11
Remove unneeded semicolon in tpm2_map_response_header()
Signed-off-by: Tomas Winkler
---
V3: new in the series
drivers/char/tpm/tpm2-space.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm2-space.c b/drivers/char/tpm/tpm2-space.c
index d2e101b32482
1. TPM2_CC_LAST has moved from 182 to 193
2. Convert tpm2_ordinal_duration from an array into a switch statement,
as there are not so many commands that require special duration
relative to a number of commands.
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase.
drivers/char/tpm/tpm.h
In tpm1_pm_suspend() function reimplement,
TPM_ORD_SAVESTATE comamnd using tpm_buf.
Signed-off-by: Tomas Winkler
---
V3: new in the series
drivers/char/tpm/tpm1-cmd.c | 22 --
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/drivers/char/tpm/tpm1-cmd.c b
Implement tpm1_pcr_read_dev() using tpm_buf and remove
now unneeded structures from tpm.h
Signed-off-by: Tomas Winkler
---
V3: new in the series
drivers/char/tpm/tpm.h | 18 ++
drivers/char/tpm/tpm1-cmd.c | 38 +-
2 files changed, 23
Add convenient wrapper for ordinal duration computation
to remove boiler plate if else statement over TPM2.
if (chip->flags & TPM_CHIP_FLAG_TPM2)
tpm2_calc_ordinal_duration(chip, ordinal);
else
tpm1_calc_ordinal_duration(chip, ordinal);
Signed-off-by: Tomas Winkler
--
The code movement left some macros unused.
Signed-off-by: Tomas Winkler
---
V3: new in the series
drivers/char/tpm/tpm-interface.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index a8f8e0bcb434..358ef5bd601e 100644
used [-Wunused-const-variable=]
static const struct tpm_input_header tpm_getcap_header = {
^
3. Drop unused TPM_DIGEST_SIZE. It's already defined in
include/linux/tpm.h
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase
drivers/char/tp
Add tpm2_pcr_extend() function to tpm2-cmd.c with signature required
by tpm-interface.c. It wraps the original open code
implementation. The original original tpm2_pcr_extend() function
is renamed and made static, called only from new tpm2_pcr_extend()
Signed-off-by: Tomas Winkler
---
V3: fix
Factor out tpm1 suspend flow from tpm-interface.c into a new function
tpm1_pm_suspend in tpm1-cmd.c
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase
drivers/char/tpm/tpm-interface.c | 55
drivers/char/tpm/tpm.h | 1 +
drivers/char/tpm/tpm1-cmd.c
= {
^~~~
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase
drivers/char/tpm/tpm-interface.c | 28
drivers/char/tpm/tpm.h | 2 ++
drivers/char/tpm/tpm1-cmd.c | 22 ++
3 files changed, 24 insertions(+), 28 deletions
tpm manual startup is used only from within tpm1 or tpm2
code, hence remove tpm_startup function from tpm-interface.c
and add two static functions implementations tpm1_startup
and tpm2_startup into to tpm1-cmd.c and tpm2-cmd.c respectively.
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase
Factor out get random implementation from tpm-interface.c
into tpm1_get_random function in tpm1-cmd.c.
No functional changes.
Signed-off-by: Tomas Winkler
---
V2-V3: Rebase
drivers/char/tpm/tpm-interface.c | 58 +---
drivers/char/tpm/tpm.h | 1
Add wrapper tpm_auto_startup() to tpm-interface.c
instead of open coded decision between tpm 1.2 and tpm 2.0
in tpm-chip.c
Signed-off-by: Tomas Winkler
---
V3: new in the series
drivers/char/tpm/tpm-chip.c | 11 +++
drivers/char/tpm/tpm-interface.c | 15 +++
drivers
to address the clients
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/client.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index fb04bfbef9fe..9541218c10eb 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers
ff-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/hw-me.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index ff2755062b44..06ff0a2ec960 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw
From: Alexander Usyskin
We should mask interrupt set bit when writing back
hcsr value in reset bit clean-up.
This is refinement for
mei: clean reset bit before reset
commit b13a65ef190e488e2761d65bdd2e1fe8a3a125f5
Cc: #3.10+
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/hw-me.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index ccc1b405ca21..f8fd503dfbd6 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw
To support dynamic addition and removal of
me clients we add reference counter.
Update kdoc with locking requirements.
Signed-off-by: Tomas Winkler
---
V2: add locking requirements to kdoc
V3: fix warning: 'cb/me_cl' may be used uninitialized in this function
drivers/misc/mei/amthi
mei_cl_set_disconneted() function.
Add mei_cl_send_disconnect to reduce code duplication.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
V2: fix the conflict
drivers/misc/mei/bus.c | 2 -
drivers/misc/mei/client.c| 158 +--
drivers
From: Alexander Usyskin
We can receive mtu with one call now, no need to store it.
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/amthif.c | 9 +
drivers/misc/mei/mei_dev.h | 2 --
2 files changed, 1 insertion(+), 10 deletions(-)
diff --git a
Remove spurious blank
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/pci-txe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mei/pci-txe.c b/drivers/misc/mei/pci-txe.c
index dcfcba44b6f7..0882c0201907 100644
--- a/drivers/misc/mei/pci-txe.c
+++ b/drivers
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/client.c| 69 ++--
drivers/misc/mei/client.h| 12
drivers/misc/mei/hbm.c | 4 +--
drivers/misc/mei/interrupt.c | 2 +-
4 files changed, 68 inserti
Simplify connect state machine by changing the logic around
Connection request in progress - only check if we have a callback in
relevant queue.
Extract common code into mei_cl_send_connect() function
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
drivers/misc/mei/bus.c
From: Alexander Usyskin
This should be used for debug only.
The feaure is gated by "allow_fixed_address" control exposed in debugfs.
Signed-off-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/debugfs.c | 6 ++
drivers/misc/mei/main.c| 8 +++-
dr
-by: Tomas Winkler
---
drivers/misc/mei/client.c | 29 +++--
drivers/misc/mei/mei_dev.h | 4
2 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index a8a3b9d15231..3475200c3850 100644
--- a/drivers
mei_cl_set_disconneted() function.
Add mei_cl_send_disconnect to reduce code duplication.
Signed-off-by: Tomas Winkler
Signed-off-by: Alexander Usyskin
---
drivers/misc/mei/bus.c | 2 -
drivers/misc/mei/client.c| 158 +--
drivers/misc/mei/client.h
-by: Alexander Usyskin
Signed-off-by: Tomas Winkler
---
drivers/misc/mei/amthif.c| 19 ++-
drivers/misc/mei/bus.c | 27 +++---
drivers/misc/mei/client.c| 118 +++
drivers/misc/mei/client.h| 84
401 - 500 of 1346 matches
Mail list logo