Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/propolis/src/hw/nvme/bits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ pub const IDENT_CNS_CONTROLLER: u8 = 0x1;
/// The type of value specified in the Status Field (SF) of a command completion.
///
/// See NVMe 1.0e Section 4.5.1.1 Status Code Type (SCT)
#[derive(Copy, Clone)]
#[derive(Copy, Clone, Debug, PartialEq)]
#[repr(u8)]
pub enum StatusCodeType {
Generic = 0,
Expand Down
2 changes: 1 addition & 1 deletion lib/propolis/src/hw/nvme/cmds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ impl Completion {
/// Create an error Completion result with a specific type and status
pub fn specific_err(sct: StatusCodeType, status: u8) -> Self {
// success doesn't belong in an error
assert_ne!(status, bits::STS_SUCCESS);
assert_ne!((sct, status), (StatusCodeType::Generic, bits::STS_SUCCESS));

Self { dw0: 0, status: Self::status_field(sct, status) }
}
Expand Down
Loading