Skip to content

Commit 2fb98bb

Browse files
committed
nvme: mi: Convert NvmSubsystemHealthStatusPollRequest to deku bits
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
1 parent 6a3b29f commit 2fb98bb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/nvme/mi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@ flags! {
419419
#[derive(Debug, DekuRead, DekuWrite, Eq, PartialEq)]
420420
#[deku(ctx = "endian: Endian", endian = "endian")]
421421
struct NvmSubsystemHealthStatusPollRequest {
422-
dword0: u32,
423-
dword1: u32,
422+
#[deku(bits = "1", pad_bits_after = "7", pad_bytes_before = "7")]
423+
cs: bool,
424424
}
425425

426426
// MI v2.0, 5.6, Figure 107

src/nvme/mi/dev.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ impl RequestHandler for NvmeMiCommandRequestHeader {
265265
.encode()?;
266266

267267
// CS: See Figure 106, NVMe MI v2.0
268-
if (shsp.dword1 & (1u32 << 31)) != 0 {
268+
if shsp.cs {
269269
mep.ccsf.0.clear();
270270
}
271271

0 commit comments

Comments
 (0)