diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-03-21 14:07:27 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-03-21 14:07:27 +0100 |
commit | 9f2347842b526cbc2655068591fb0166362d2999 (patch) | |
tree | 1d8e00f652520f1bb1036b1182920e1900a916e8 /block | |
parent | 14d811467f6592aa0e685730e66b5f9123287468 (diff) | |
parent | 9a8b202f8cb7ebebc71f1f2a353a21c76d3063a8 (diff) | |
download | linux-stable-9f2347842b526cbc2655068591fb0166362d2999.tar.gz linux-stable-9f2347842b526cbc2655068591fb0166362d2999.tar.bz2 linux-stable-9f2347842b526cbc2655068591fb0166362d2999.zip |
Merge tag 'asoc-fix-v6.9-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.9
A bunch of fixes that came in during the merge window, probably the most
substantial thing is the DPCM locking fix for compressed audio which has
been lurking for a while.
Diffstat (limited to 'block')
-rw-r--r-- | block/opal_proto.h | 1 | ||||
-rw-r--r-- | block/sed-opal.c | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/block/opal_proto.h b/block/opal_proto.h index dec7ce3a3edb..d247a457bf6e 100644 --- a/block/opal_proto.h +++ b/block/opal_proto.h @@ -71,6 +71,7 @@ enum opal_response_token { #define SHORT_ATOM_BYTE 0xBF #define MEDIUM_ATOM_BYTE 0xDF #define LONG_ATOM_BYTE 0xE3 +#define EMPTY_ATOM_BYTE 0xFF #define OPAL_INVAL_PARAM 12 #define OPAL_MANUFACTURED_INACTIVE 0x08 diff --git a/block/sed-opal.c b/block/sed-opal.c index 3d9e9cd250bd..fa4dba5d8531 100644 --- a/block/sed-opal.c +++ b/block/sed-opal.c @@ -1056,16 +1056,20 @@ static int response_parse(const u8 *buf, size_t length, token_length = response_parse_medium(iter, pos); else if (pos[0] <= LONG_ATOM_BYTE) /* long atom */ token_length = response_parse_long(iter, pos); + else if (pos[0] == EMPTY_ATOM_BYTE) /* empty atom */ + token_length = 1; else /* TOKEN */ token_length = response_parse_token(iter, pos); if (token_length < 0) return token_length; + if (pos[0] != EMPTY_ATOM_BYTE) + num_entries++; + pos += token_length; total -= token_length; iter++; - num_entries++; } resp->num = num_entries; |