Merge tag 'for-6.9/block-20240310' of git://git.kernel.dk/linux
[linux-2.6-microblaze.git] / drivers / nvme / target / nvmet.h
index 33e61b4..f460728 100644 (file)
@@ -163,6 +163,7 @@ struct nvmet_port {
        void                            *priv;
        bool                            enabled;
        int                             inline_data_size;
+       int                             max_queue_size;
        const struct nvmet_fabrics_ops  *tr_ops;
        bool                            pi_enable;
 };
@@ -543,9 +544,10 @@ void nvmet_subsys_disc_changed(struct nvmet_subsys *subsys,
 void nvmet_add_async_event(struct nvmet_ctrl *ctrl, u8 event_type,
                u8 event_info, u8 log_page);
 
-#define NVMET_QUEUE_SIZE       1024
+#define NVMET_MIN_QUEUE_SIZE   16
+#define NVMET_MAX_QUEUE_SIZE   1024
 #define NVMET_NR_QUEUES                128
-#define NVMET_MAX_CMD          NVMET_QUEUE_SIZE
+#define NVMET_MAX_CMD(ctrl)    (NVME_CAP_MQES(ctrl->cap) + 1)
 
 /*
  * Nice round number that makes a list of nsids fit into a page.