nvme fixes for Linux 6.11
- Sparse fix on static symbol (Jinjie) - Misleading warning message fix (Keith) - TCP command allocation handling fix (Maurizio) - PCI tagset allocation handling fix (Keith) - Low-power quirk for Samsung (Georg) - Queue limits fix for zone devices (Christoph) - Target protocol behavior fix (Maurizio) -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE3Fbyvv+648XNRdHTPe3zGtjzRgkFAmbZwn0ACgkQPe3zGtjz RgllkQ//TnFEdPbJTHaqq2y6nsrsYZza54Di5nmkuek2Ufn1zZjVm2HXoUozHmDP gFGMMacMHudDXOxwHpS6Inr69FRPGyZegGFxXso81oKxJijpH2B/Tw7Bhs87Ytu9 DZ0OjXR7ZSK8aAHwR9KEfdlbK8cIoImznhkjDYyW77ygD8t8cqC93jypLsg0gOP+ 7L1OX38GobD1qy8STGsxaGCl/VIhbBtB25KPPCSfzzzSZPhoILrVi37RuGmj5Ci7 rWIo3majJvN4S3XXRQRVlNJxNSBlWHoAJS2x6Wo/IyLtPQEY66cLsg6MckvvgiwN qycIa3TcXEufLdd036a7y3ZO6WA66SM8dTL4txSDLIAsvgA5cK1JXqjcXcu71NM5 eZiOAKTMkcbmBfJcSsbACUvm49DB2aXmfUvW33PLJ1bX7ZTQS7yd5+xhlVruNSNY HUMqh+lWbBlSb7/9x9Oa1htmyclbg7uSFVsQtVO/W4m78tPXuRaR+6NztBebd+FB fDyRosUh8dgecQDAD7rNFu8e65dlTUFmkfI+ooGzA5Vl3qriBaWsgVZsMYd7uwf9 nGplrPEY+mHozixqzmftOP3WarOCQWDeUstiCIZMa6K45JocN1tjOYJ5j3E6PqEQ BNS8AMyqQcOnwXa3USXndh7QcrpzqtbuOawALcdotPEwZMiWstM= =ppNK -----END PGP SIGNATURE----- Merge tag 'nvme-6.11-2024-09-05' of git://git.infradead.org/nvme into block-6.11 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.11 - Sparse fix on static symbol (Jinjie) - Misleading warning message fix (Keith) - TCP command allocation handling fix (Maurizio) - PCI tagset allocation handling fix (Keith) - Low-power quirk for Samsung (Georg) - Queue limits fix for zone devices (Christoph) - Target protocol behavior fix (Maurizio)" * tag 'nvme-6.11-2024-09-05' of git://git.infradead.org/nvme: nvmet: Identify-Active Namespace ID List command should reject invalid nsid nvme: set BLK_FEAT_ZONED for ZNS multipath disks nvme-pci: Add sleep quirk for Samsung 990 Evo nvme-pci: allocate tagset on reset if necessary nvmet-tcp: fix kernel crash if commands allocation fails nvme: use better description for async reset reason nvmet: Make nvmet_debugfs static
This commit is contained in:
commit
4ba032bc71
@ -4437,7 +4437,8 @@ static bool nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
|
||||
|
||||
static void nvme_handle_aer_persistent_error(struct nvme_ctrl *ctrl)
|
||||
{
|
||||
dev_warn(ctrl->device, "resetting controller due to AER\n");
|
||||
dev_warn(ctrl->device,
|
||||
"resetting controller due to persistent internal error\n");
|
||||
nvme_reset_ctrl(ctrl);
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,9 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
|
||||
blk_set_stacking_limits(&lim);
|
||||
lim.dma_alignment = 3;
|
||||
lim.features |= BLK_FEAT_IO_STAT | BLK_FEAT_NOWAIT | BLK_FEAT_POLL;
|
||||
if (head->ids.csi != NVME_CSI_ZNS)
|
||||
if (head->ids.csi == NVME_CSI_ZNS)
|
||||
lim.features |= BLK_FEAT_ZONED;
|
||||
else
|
||||
lim.max_zone_append_sectors = 0;
|
||||
|
||||
head->disk = blk_alloc_disk(&lim, ctrl->numa_node);
|
||||
|
@ -2508,6 +2508,12 @@ static unsigned int nvme_pci_nr_maps(struct nvme_dev *dev)
|
||||
|
||||
static void nvme_pci_update_nr_queues(struct nvme_dev *dev)
|
||||
{
|
||||
if (!dev->ctrl.tagset) {
|
||||
nvme_alloc_io_tag_set(&dev->ctrl, &dev->tagset, &nvme_mq_ops,
|
||||
nvme_pci_nr_maps(dev), sizeof(struct nvme_iod));
|
||||
return;
|
||||
}
|
||||
|
||||
blk_mq_update_nr_hw_queues(&dev->tagset, dev->online_queues - 1);
|
||||
/* free previously allocated queues that are no longer usable */
|
||||
nvme_free_queues(dev, dev->online_queues);
|
||||
@ -2967,6 +2973,17 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
|
||||
dmi_match(DMI_BOARD_NAME, "NS5x_7xPU") ||
|
||||
dmi_match(DMI_BOARD_NAME, "PH4PRX1_PH6PRX1"))
|
||||
return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND;
|
||||
} else if (pdev->vendor == 0x144d && pdev->device == 0xa80d) {
|
||||
/*
|
||||
* Exclude Samsung 990 Evo from NVME_QUIRK_SIMPLE_SUSPEND
|
||||
* because of high power consumption (> 2 Watt) in s2idle
|
||||
* sleep. Only some boards with Intel CPU are affected.
|
||||
*/
|
||||
if (dmi_match(DMI_BOARD_NAME, "GMxPXxx") ||
|
||||
dmi_match(DMI_BOARD_NAME, "PH4PG31") ||
|
||||
dmi_match(DMI_BOARD_NAME, "PH4PRX1_PH6PRX1") ||
|
||||
dmi_match(DMI_BOARD_NAME, "PH6PG01_PH6PG71"))
|
||||
return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -587,6 +587,16 @@ static void nvmet_execute_identify_nslist(struct nvmet_req *req)
|
||||
u16 status = 0;
|
||||
int i = 0;
|
||||
|
||||
/*
|
||||
* NSID values 0xFFFFFFFE and NVME_NSID_ALL are invalid
|
||||
* See NVMe Base Specification, Active Namespace ID list (CNS 02h).
|
||||
*/
|
||||
if (min_nsid == 0xFFFFFFFE || min_nsid == NVME_NSID_ALL) {
|
||||
req->error_loc = offsetof(struct nvme_identify, nsid);
|
||||
status = NVME_SC_INVALID_NS | NVME_STATUS_DNR;
|
||||
goto out;
|
||||
}
|
||||
|
||||
list = kzalloc(buf_size, GFP_KERNEL);
|
||||
if (!list) {
|
||||
status = NVME_SC_INTERNAL;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "nvmet.h"
|
||||
#include "debugfs.h"
|
||||
|
||||
struct dentry *nvmet_debugfs;
|
||||
static struct dentry *nvmet_debugfs;
|
||||
|
||||
#define NVMET_DEBUGFS_ATTR(field) \
|
||||
static int field##_open(struct inode *inode, struct file *file) \
|
||||
|
@ -2146,8 +2146,10 @@ static u16 nvmet_tcp_install_queue(struct nvmet_sq *sq)
|
||||
}
|
||||
|
||||
queue->nr_cmds = sq->size * 2;
|
||||
if (nvmet_tcp_alloc_cmds(queue))
|
||||
if (nvmet_tcp_alloc_cmds(queue)) {
|
||||
queue->nr_cmds = 0;
|
||||
return NVME_SC_INTERNAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user