Skip to content

Commit 1250421

Browse files
committed
Merge tag 'nvme-6.2-2022-02-17' of git://git.infradead.org/nvme into block-6.2
Pull NVMe fix from Christoph: "nvme fix for Linux 6.2 - fix visibility of the CMB sysfs attributes (Keith Busch)" * tag 'nvme-6.2-2022-02-17' of git://git.infradead.org/nvme: nvme-pci: refresh visible attrs for cmb attributes
2 parents 9a28b92 + e917a84 commit 1250421

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/nvme/host/pci.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ struct nvme_queue;
110110

111111
static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown);
112112
static void nvme_delete_io_queues(struct nvme_dev *dev);
113+
static void nvme_update_attrs(struct nvme_dev *dev);
113114

114115
/*
115116
* Represents an NVM Express device. Each nvme_dev is a PCI function.
@@ -1923,6 +1924,8 @@ static void nvme_map_cmb(struct nvme_dev *dev)
19231924
if ((dev->cmbsz & (NVME_CMBSZ_WDS | NVME_CMBSZ_RDS)) ==
19241925
(NVME_CMBSZ_WDS | NVME_CMBSZ_RDS))
19251926
pci_p2pmem_publish(pdev, true);
1927+
1928+
nvme_update_attrs(dev);
19261929
}
19271930

19281931
static int nvme_set_host_mem(struct nvme_dev *dev, u32 bits)
@@ -2209,6 +2212,11 @@ static const struct attribute_group *nvme_pci_dev_attr_groups[] = {
22092212
NULL,
22102213
};
22112214

2215+
static void nvme_update_attrs(struct nvme_dev *dev)
2216+
{
2217+
sysfs_update_group(&dev->ctrl.device->kobj, &nvme_pci_dev_attrs_group);
2218+
}
2219+
22122220
/*
22132221
* nirqs is the number of interrupts available for write and read
22142222
* queues. The core already reserved an interrupt for the admin queue.

0 commit comments

Comments
 (0)