File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2333,10 +2333,12 @@ static int nvme_setup_io_queues(struct nvme_dev *dev)
23332333 if (dev -> cmb_use_sqes ) {
23342334 result = nvme_cmb_qdepth (dev , nr_io_queues ,
23352335 sizeof (struct nvme_command ));
2336- if (result > 0 )
2336+ if (result > 0 ) {
23372337 dev -> q_depth = result ;
2338- else
2338+ dev -> ctrl .sqsize = result - 1 ;
2339+ } else {
23392340 dev -> cmb_use_sqes = false;
2341+ }
23402342 }
23412343
23422344 do {
@@ -2537,7 +2539,6 @@ static int nvme_pci_enable(struct nvme_dev *dev)
25372539
25382540 dev -> q_depth = min_t (u32 , NVME_CAP_MQES (dev -> ctrl .cap ) + 1 ,
25392541 io_queue_depth );
2540- dev -> ctrl .sqsize = dev -> q_depth - 1 ; /* 0's based queue depth */
25412542 dev -> db_stride = 1 << NVME_CAP_STRIDE (dev -> ctrl .cap );
25422543 dev -> dbs = dev -> bar + 4096 ;
25432544
@@ -2578,7 +2579,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
25782579 dev_warn (dev -> ctrl .device , "IO queue depth clamped to %d\n" ,
25792580 dev -> q_depth );
25802581 }
2581-
2582+ dev -> ctrl . sqsize = dev -> q_depth - 1 ; /* 0's based queue depth */
25822583
25832584 nvme_map_cmb (dev );
25842585
You can’t perform that action at this time.
0 commit comments