1. 13 Apr, 2023 3 commits
    • Damien Le Moal's avatar
      nvmet: fix Identify Namespace handling · 8c098aa0
      Damien Le Moal authored
      The identify command with cns set to NVME_ID_CNS_NS does not directly
      depend on the command set. The NVMe specifications is rather confusing
      here as it appears that this command only applies to the NVM command
      set. However, footnote 8 of Figure 273 in the NVMe 2.0 base
      specifications clearly state that this command applies to NVM command
      sets that support logical blocks, that is, NVM and ZNS. Both the NVM and
      ZNS command set specifications also list this identify as mandatory.
      
      The command handling should thus not look at the csi field since it is
      defined as unused for this command. Given that we do not support the
      KV command set, simply remove the csi switch-case for that command
      handling and call directly nvmet_execute_identify_ns() in
      nvmet_execute_identify().
      
      Fixes: ab5d0b38 ("nvmet: add Command Set Identifier support")
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
      Tested-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      8c098aa0
    • Damien Le Moal's avatar
      nvmet: fix error handling in nvmet_execute_identify_cns_cs_ns() · ab76e720
      Damien Le Moal authored
      Nvme specifications state that:
      
      If the I/O Command Set associated with the namespace identified by the
      NSID field does not support the Identify Namespace data structure
      specified by the CSI field, the controller shall abort the command with
      a status code of Invalid Field in Command.
      
      In other words, if nvmet_execute_identify_cns_cs_ns() is called for a
      target with a block device that is not zoned, we should not return any
      data and set the status to NVME_SC_INVALID_FIELD.
      
      While at it, it is also better to revalidate the ns block devie *before*
      checking if the block device is zoned, to ensure that
      nvmet_execute_identify_cns_cs_ns() operates against updated device
      characteristics.
      
      Fixes: aaf2e048 ("nvmet: add ZBD over ZNS backend support")
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
      Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
      Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      ab76e720
    • Bjorn Helgaas's avatar
      nvme-pci: drop redundant pci_enable_pcie_error_reporting() · 1ad11eaf
      Bjorn Helgaas authored
      pci_enable_pcie_error_reporting() enables the device to send ERR_*
      Messages.  Since f26e58bf ("PCI/AER: Enable error reporting when AER is
      native"), the PCI core does this for all devices during enumeration, so the
      driver doesn't need to do it itself.
      
      Remove the redundant pci_enable_pcie_error_reporting() call from the
      driver.  Also remove the corresponding pci_disable_pcie_error_reporting()
      from the driver .remove() path.
      
      Note that this only controls ERR_* Messages from the device.  An ERR_*
      Message may cause the Root Port to generate an interrupt, depending on the
      AER Root Error Command register managed by the AER service driver.
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      1ad11eaf
  2. 12 Apr, 2023 7 commits
  3. 06 Apr, 2023 3 commits
  4. 05 Apr, 2023 5 commits
  5. 03 Apr, 2023 5 commits
  6. 02 Apr, 2023 9 commits
  7. 27 Mar, 2023 2 commits
  8. 20 Mar, 2023 1 commit
  9. 16 Mar, 2023 5 commits