nvme fix for Linux 6.2

- fix visibility of the CMB sysfs attributes (Keith Busch)
 -----BEGIN PGP SIGNATURE-----
 
 iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAmPvf/ALHGhjaEBsc3Qu
 ZGUACgkQD55TZVIEUYNicxAAuQNwf7Z07g+L327cM/rVRYULL+SXkjZnD51qhV3i
 R7WhJ1jXwELTY6JABGmwe9unKnF2vw7hzQmgxIA2lsVYr/nE00PJZxJAieHq6VPL
 7Gz5ULqr0cByXNipTBYoW78Q3T+Ni5hPEL4sNb9Id0IyOfvdsl/RlL9kRIzdYAe0
 JvKVM9XzKLBYhnHIFyUq1TZalv9pBtnVptY92PdriKNiAcA4MsiKp+c1GSicS3Cz
 RpVfTxiukR418y9RR/bGM+ZtU+h9rRF8iAg91Cmj7R1QgNLz9VZkrL6Fs48osLe2
 7NulZ6BPU8DiSEMbVqUd8xV11MTGEU/P2/8nClhKjE31K4IVWZI2094vNzzcSwt3
 36XItqm0yx3KoDnNNRDiDtBf/j3o6sdxHh80KfvAEzIrDFypgdF5iPbswa0uLIBw
 WXQo8aO+jOzY+QLR8rcGdDvzdPK03LhxAb0yEejnS0a2i9iO7JVtLCOvQGgdybuU
 MTdFpkaNre/DnfvbyGMqjoY2E6IEbgO6xgGHiQ7JL7vQ5n4+PFimH3jikYKHXv4N
 OhFfjuhoWU+EEL0NXLrw535Hhqzdd8UPN4sifj6PTslhXHF6Z4zKyI/k86TZ/8kY
 DPlinMbO8moLLzuEHC+LY+Radu0G1i1I8QJqC7ZyPj/dI9Spme6OoUR5FDOeuK9V
 xvQ=
 =CGHK
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Jens Axboe 2023-02-17 09:07:00 -07:00
commit 1250421697
1 changed files with 8 additions and 0 deletions

View File

@ -110,6 +110,7 @@ struct nvme_queue;
static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown);
static void nvme_delete_io_queues(struct nvme_dev *dev);
static void nvme_update_attrs(struct nvme_dev *dev);
/*
* 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)
if ((dev->cmbsz & (NVME_CMBSZ_WDS | NVME_CMBSZ_RDS)) ==
(NVME_CMBSZ_WDS | NVME_CMBSZ_RDS))
pci_p2pmem_publish(pdev, true);
nvme_update_attrs(dev);
}
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[] = {
NULL,
};
static void nvme_update_attrs(struct nvme_dev *dev)
{
sysfs_update_group(&dev->ctrl.device->kobj, &nvme_pci_dev_attrs_group);
}
/*
* nirqs is the number of interrupts available for write and read
* queues. The core already reserved an interrupt for the admin queue.