History

Merge tag 'block-6.14-20250207' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe: - MD pull request via Song: - fix an error handling path for md-linear - NVMe pull request via Keith: - Connection fixes for fibre channel transport (Daniel) - Endian fixes (Keith, Christoph) - Cleanup fix for host memory buffer (Francis) - Platform specific power quirks (Georg) - Target memory leak (Sagi) - Use appropriate controller state accessor (Daniel) - Fixup for a regression introduced last week, where sunvdc wasn't updated for an API change, causing compilation failures on sparc64. * tag 'block-6.14-20250207' of git://git.kernel.dk/linux: drivers/block/sunvdc.c: update the correct AIP call md: Fix linear_set_limits() nvme-fc: use ctrl state getter nvme: make nvme_tls_attrs_group static nvmet: add a missing endianess conversion in nvmet_execute_admin_connect nvmet: the result field in nvmet_alloc_ctrl_args is little endian nvmet: fix a memory leak in controller identify nvme-fc: do not ignore connectivity loss during connecting nvme: handle connectivity loss in nvme_set_queue_count nvme-fc: go straight to connecting state when initializing nvme-pci: Add TUXEDO IBP Gen9 to Samsung sleep quirk nvme-pci: Add TUXEDO InfinityFlex to Samsung sleep quirk nvme-pci: remove redundant dma frees in hmb nvmet: fix rw control endian access

Linus Torvalds committed 1 year ago

Commit a67d0a02 parents 1fa9970 96b531f10 files · +43 −29Browse files

Unified · Split

10 files
  1. drivers/block/sunvdc.c +2 −2
  2. drivers/md/md-linear.c +1 −3
  3. drivers/nvme/host/core.c +7 −1
  4. drivers/nvme/host/fc.c +25 −10
  5. drivers/nvme/host/pci.c +3 −9
  6. drivers/nvme/host/sysfs.c +1 −1
  7. drivers/nvme/target/admin-cmd.c +1 −0
  8. drivers/nvme/target/fabrics-cmd.c +1 −1
  9. drivers/nvme/target/io-cmd-bdev.c +1 −1
  10. drivers/nvme/target/nvmet.h +1 −1
drivers/block/sunvdc.c+2−2
@@ -1127,8 +1127,8 @@ static void vdc_queue_drain(struct vdc_port *port) · 1126 unmodified lines
1127 1127
1128 spin_lock_irq(&port->vio.lock);1128 spin_lock_irq(&port->vio.lock);
1129 port->drain = 0;1129 port->drain = 0;
1130 blk_mq_unquiesce_queue(q, memflags);1130 blk_mq_unquiesce_queue(q);
1131 blk_mq_unfreeze_queue(q);1131 blk_mq_unfreeze_queue(q, memflags);
1132}1132}
1133 1133
1134static void vdc_ldc_reset_timer_work(struct work_struct *work)1134static void vdc_ldc_reset_timer_work(struct work_struct *work)
drivers/md/md-linear.c+1−3
@@ -76,10 +76,8 @@ static int linear_set_limits(struct mddev *mddev) · 75 unmodified lines
76 lim.max_write_zeroes_sectors = mddev->chunk_sectors;76 lim.max_write_zeroes_sectors = mddev->chunk_sectors;
77 lim.io_min = mddev->chunk_sectors << 9;77 lim.io_min = mddev->chunk_sectors << 9;
78 err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);78 err = mddev_stack_rdev_limits(mddev, &lim, MDDEV_STACK_INTEGRITY);
79 if (err) {79 if (err)
80 queue_limits_cancel_update(mddev->gendisk->queue);
81 return err;80 return err;
82 }
83 81
84 return queue_limits_set(mddev->gendisk->queue, &lim);82 return queue_limits_set(mddev->gendisk->queue, &lim);
85}83}
drivers/nvme/host/core.c+7−1
@@ -1700,7 +1700,13 @@ int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count) · 1699 unmodified lines
1700 1700
1701 status = nvme_set_features(ctrl, NVME_FEAT_NUM_QUEUES, q_count, NULL, 0,1701 status = nvme_set_features(ctrl, NVME_FEAT_NUM_QUEUES, q_count, NULL, 0,
1702 &result);1702 &result);
1703 if (status < 0)1703
1704 /*
1705 * It's either a kernel error or the host observed a connection
1706 * lost. In either case it's not possible communicate with the
1707 * controller and thus enter the error code path.
1708 */
1709 if (status < 0 || status == NVME_SC_HOST_PATH_ERROR)
1704 return status;1710 return status;
1705 1711
1706 /*1712 /*
drivers/nvme/host/fc.c+25−10
@@ -781,11 +781,19 @@ restart: · 780 unmodified lines
781static void781static void
782nvme_fc_ctrl_connectivity_loss(struct nvme_fc_ctrl *ctrl)782nvme_fc_ctrl_connectivity_loss(struct nvme_fc_ctrl *ctrl)
783{783{
784 enum nvme_ctrl_state state;
785 unsigned long flags;
786
784 dev_info(ctrl->ctrl.device,787 dev_info(ctrl->ctrl.device,
785 "NVME-FC{%d}: controller connectivity lost. Awaiting "788 "NVME-FC{%d}: controller connectivity lost. Awaiting "
786 "Reconnect", ctrl->cnum);789 "Reconnect", ctrl->cnum);
787 790
788 switch (nvme_ctrl_state(&ctrl->ctrl)) {791 spin_lock_irqsave(&ctrl->lock, flags);
792 set_bit(ASSOC_FAILED, &ctrl->flags);
793 state = nvme_ctrl_state(&ctrl->ctrl);
794 spin_unlock_irqrestore(&ctrl->lock, flags);
795
796 switch (state) {
789 case NVME_CTRL_NEW:797 case NVME_CTRL_NEW:
790 case NVME_CTRL_LIVE:798 case NVME_CTRL_LIVE:
791 /*799 /*
@@ -2079,7 +2087,8 @@ done: · 1287 unmodified lines
2079 nvme_fc_complete_rq(rq);2087 nvme_fc_complete_rq(rq);
2080 2088
2081check_error:2089check_error:
2082 if (terminate_assoc && ctrl->ctrl.state != NVME_CTRL_RESETTING)2090 if (terminate_assoc &&
2091 nvme_ctrl_state(&ctrl->ctrl) != NVME_CTRL_RESETTING)
2083 queue_work(nvme_reset_wq, &ctrl->ioerr_work);2092 queue_work(nvme_reset_wq, &ctrl->ioerr_work);
2084}2093}
2085 2094
@@ -2533,6 +2542,8 @@ __nvme_fc_abort_outstanding_ios(struct nvme_fc_ctrl *ctrl, bool start_queues) · 447 unmodified lines
2533static void2542static void
2534nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)2543nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)
2535{2544{
2545 enum nvme_ctrl_state state = nvme_ctrl_state(&ctrl->ctrl);
2546
2536 /*2547 /*
2537 * if an error (io timeout, etc) while (re)connecting, the remote2548 * if an error (io timeout, etc) while (re)connecting, the remote
2538 * port requested terminating of the association (disconnect_ls)2549 * port requested terminating of the association (disconnect_ls)
@@ -2540,9 +2551,8 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg) · 1 unmodified line
2540 * the controller. Abort any ios on the association and let the2551 * the controller. Abort any ios on the association and let the
2541 * create_association error path resolve things.2552 * create_association error path resolve things.
2542 */2553 */
2543 if (ctrl->ctrl.state == NVME_CTRL_CONNECTING) {2554 if (state == NVME_CTRL_CONNECTING) {
2544 __nvme_fc_abort_outstanding_ios(ctrl, true);2555 __nvme_fc_abort_outstanding_ios(ctrl, true);
2545 set_bit(ASSOC_FAILED, &ctrl->flags);
2546 dev_warn(ctrl->ctrl.device,2556 dev_warn(ctrl->ctrl.device,
2547 "NVME-FC{%d}: transport error during (re)connect\n",2557 "NVME-FC{%d}: transport error during (re)connect\n",
2548 ctrl->cnum);2558 ctrl->cnum);
@@ -2550,7 +2560,7 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg) · 1 unmodified line
2550 }2560 }
2551 2561
2552 /* Otherwise, only proceed if in LIVE state - e.g. on first error */2562 /* Otherwise, only proceed if in LIVE state - e.g. on first error */
2553 if (ctrl->ctrl.state != NVME_CTRL_LIVE)2563 if (state != NVME_CTRL_LIVE)
2554 return;2564 return;
2555 2565
2556 dev_warn(ctrl->ctrl.device,2566 dev_warn(ctrl->ctrl.device,
@@ -3167,12 +3177,18 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl) · 610 unmodified lines
3167 else3177 else
3168 ret = nvme_fc_recreate_io_queues(ctrl);3178 ret = nvme_fc_recreate_io_queues(ctrl);
3169 }3179 }
3170 if (!ret && test_bit(ASSOC_FAILED, &ctrl->flags))
3171 ret = -EIO;
3172 if (ret)3180 if (ret)
3173 goto out_term_aen_ops;3181 goto out_term_aen_ops;
3174 3182
3175 changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE);3183 spin_lock_irqsave(&ctrl->lock, flags);
3184 if (!test_bit(ASSOC_FAILED, &ctrl->flags))
3185 changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE);
3186 else
3187 ret = -EIO;
3188 spin_unlock_irqrestore(&ctrl->lock, flags);
3189
3190 if (ret)
3191 goto out_term_aen_ops;
3176 3192
3177 ctrl->ctrl.nr_reconnects = 0;3193 ctrl->ctrl.nr_reconnects = 0;
3178 3194
@@ -3578,8 +3594,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, · 399 unmodified lines
3578 list_add_tail(&ctrl->ctrl_list, &rport->ctrl_list);3594 list_add_tail(&ctrl->ctrl_list, &rport->ctrl_list);
3579 spin_unlock_irqrestore(&rport->lock, flags);3595 spin_unlock_irqrestore(&rport->lock, flags);
3580 3596
3581 if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_RESETTING) ||3597 if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
3582 !nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_CONNECTING)) {
3583 dev_err(ctrl->ctrl.device,3598 dev_err(ctrl->ctrl.device,
3584 "NVME-FC{%d}: failed to init ctrl state\n", ctrl->cnum);3599 "NVME-FC{%d}: failed to init ctrl state\n", ctrl->cnum);
3585 goto fail_ctrl;3600 goto fail_ctrl;
drivers/nvme/host/pci.c+3−9
@@ -2153,14 +2153,6 @@ static int nvme_alloc_host_mem_multi(struct nvme_dev *dev, u64 preferred, · 2152 unmodified lines
2153 return 0;2153 return 0;
2154 2154
2155out_free_bufs:2155out_free_bufs:
2156 while (--i >= 0) {
2157 size_t size = le32_to_cpu(descs[i].size) * NVME_CTRL_PAGE_SIZE;
2158
2159 dma_free_attrs(dev->dev, size, bufs[i],
2160 le64_to_cpu(descs[i].addr),
2161 DMA_ATTR_NO_KERNEL_MAPPING | DMA_ATTR_NO_WARN);
2162 }
2163
2164 kfree(bufs);2156 kfree(bufs);
2165out_free_descs:2157out_free_descs:
2166 dma_free_coherent(dev->dev, descs_size, descs, descs_dma);2158 dma_free_coherent(dev->dev, descs_size, descs, descs_dma);
@@ -3147,7 +3139,9 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev) · 980 unmodified lines
3147 * because of high power consumption (> 2 Watt) in s2idle3139 * because of high power consumption (> 2 Watt) in s2idle
3148 * sleep. Only some boards with Intel CPU are affected.3140 * sleep. Only some boards with Intel CPU are affected.
3149 */3141 */
3150 if (dmi_match(DMI_BOARD_NAME, "GMxPXxx") ||3142 if (dmi_match(DMI_BOARD_NAME, "DN50Z-140HC-YD") ||
3143 dmi_match(DMI_BOARD_NAME, "GMxPXxx") ||
3144 dmi_match(DMI_BOARD_NAME, "GXxMRXx") ||
3151 dmi_match(DMI_BOARD_NAME, "PH4PG31") ||3145 dmi_match(DMI_BOARD_NAME, "PH4PG31") ||
3152 dmi_match(DMI_BOARD_NAME, "PH4PRX1_PH6PRX1") ||3146 dmi_match(DMI_BOARD_NAME, "PH4PRX1_PH6PRX1") ||
3153 dmi_match(DMI_BOARD_NAME, "PH6PG01_PH6PG71"))3147 dmi_match(DMI_BOARD_NAME, "PH6PG01_PH6PG71"))
drivers/nvme/host/sysfs.c+1−1
@@ -792,7 +792,7 @@ static umode_t nvme_tls_attrs_are_visible(struct kobject *kobj, · 791 unmodified lines
792 return a->mode;792 return a->mode;
793}793}
794 794
795const struct attribute_group nvme_tls_attrs_group = {795static const struct attribute_group nvme_tls_attrs_group = {
796 .attrs = nvme_tls_attrs,796 .attrs = nvme_tls_attrs,
797 .is_visible = nvme_tls_attrs_are_visible,797 .is_visible = nvme_tls_attrs_are_visible,
798};798};
drivers/nvme/target/admin-cmd.c+1−0
@@ -1068,6 +1068,7 @@ static void nvme_execute_identify_ns_nvm(struct nvmet_req *req) · 1067 unmodified lines
1068 goto out;1068 goto out;
1069 }1069 }
1070 status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id));1070 status = nvmet_copy_to_sgl(req, 0, id, sizeof(*id));
1071 kfree(id);
1071out:1072out:
1072 nvmet_req_complete(req, status);1073 nvmet_req_complete(req, status);
1073}1074}
drivers/nvme/target/fabrics-cmd.c+1−1
@@ -287,7 +287,7 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req) · 286 unmodified lines
287 args.subsysnqn = d->subsysnqn;287 args.subsysnqn = d->subsysnqn;
288 args.hostnqn = d->hostnqn;288 args.hostnqn = d->hostnqn;
289 args.hostid = &d->hostid;289 args.hostid = &d->hostid;
290 args.kato = c->kato;290 args.kato = le32_to_cpu(c->kato);
291 291
292 ctrl = nvmet_alloc_ctrl(&args);292 ctrl = nvmet_alloc_ctrl(&args);
293 if (!ctrl)293 if (!ctrl)
drivers/nvme/target/io-cmd-bdev.c+1−1
@@ -272,7 +272,7 @@ static void nvmet_bdev_execute_rw(struct nvmet_req *req) · 271 unmodified lines
272 iter_flags = SG_MITER_FROM_SG;272 iter_flags = SG_MITER_FROM_SG;
273 }273 }
274 274
275 if (req->cmd->rw.control & NVME_RW_LR)275 if (req->cmd->rw.control & cpu_to_le16(NVME_RW_LR))
276 opf |= REQ_FAILFAST_DEV;276 opf |= REQ_FAILFAST_DEV;
277 277
278 if (is_pci_p2pdma_page(sg_page(req->sg)))278 if (is_pci_p2pdma_page(sg_page(req->sg)))
drivers/nvme/target/nvmet.h+1−1
@@ -589,7 +589,7 @@ struct nvmet_alloc_ctrl_args { · 588 unmodified lines
589 const struct nvmet_fabrics_ops *ops;589 const struct nvmet_fabrics_ops *ops;
590 struct device *p2p_client;590 struct device *p2p_client;
591 u32 kato;591 u32 kato;
592 u32 result;592 __le32 result;
593 u16 error_loc;593 u16 error_loc;
594 u16 status;594 u16 status;
595};595};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t