Merge tag 'for-5.18/drivers-2022-04-01' of git://git.kernel.dk/linux-block
[linux-block.git] / drivers / nvme / host / nvme.h
index a1f8403ffd78c8a52838238d79640007afc30d3a..1393bbf82d71e3542af7d8425075194ef51cd3dc 100644 (file)
@@ -280,7 +280,6 @@ struct nvme_ctrl {
        u16 crdt[3];
        u16 oncs;
        u16 oacs;
-       u16 nr_streams;
        u16 sqsize;
        u32 max_namespaces;
        atomic_t abort_limit;
@@ -454,9 +453,11 @@ struct nvme_ns {
 
        int lba_shift;
        u16 ms;
+       u16 pi_size;
        u16 sgs;
        u32 sws;
        u8 pi_type;
+       u8 guard_type;
 #ifdef CONFIG_BLK_DEV_ZONED
        u64 zsze;
 #endif
@@ -479,7 +480,7 @@ struct nvme_ns {
 /* NVMe ns supports metadata actions by the controller (generate/strip) */
 static inline bool nvme_ns_has_pi(struct nvme_ns *ns)
 {
-       return ns->pi_type && ns->ms == sizeof(struct t10_pi_tuple);
+       return ns->pi_type && ns->ms == ns->pi_size;
 }
 
 struct nvme_ctrl_ops {