nvme/ds/cmd/
mod.rs

1use super::{queue::subentry::Dptr, Address};
2
3pub mod admin;
4
5pub enum PrpListOrBuffer {
6    PrpList(Address),
7    PrpFirstAndList(Address, Address),
8    Buffer(Address),
9}
10
11impl PrpListOrBuffer {
12    pub fn dptr(&self) -> Dptr {
13        match self {
14            PrpListOrBuffer::PrpList(address) => Dptr::Prp(*address, 0),
15            PrpListOrBuffer::Buffer(address) => Dptr::Prp(*address, 0),
16            PrpListOrBuffer::PrpFirstAndList(first, list) => Dptr::Prp(*first, *list),
17        }
18    }
19}