diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-20 09:14:43 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-05-26 02:54:07 -0400 |
commit | 9bdcfb10f221e796c9619fe48655e0f1272f1d92 (patch) | |
tree | 3350bedee0eb0fd5354b354f25eb50280fe14c07 | |
parent | 2cb657bc0242dfdca20869685bf179774ef1a6fb (diff) |
nvme-pci: consistencly use ctrl->device for logging
This is what most of the code already does and gives much more useful
prefixes than the device embedded in the pci_dev.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
-rw-r--r-- | drivers/nvme/host/pci.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 4c2ff2bb26bc..bf8bec39c017 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c | |||
@@ -263,7 +263,7 @@ static void nvme_dbbuf_set(struct nvme_dev *dev) | |||
263 | c.dbbuf.prp2 = cpu_to_le64(dev->dbbuf_eis_dma_addr); | 263 | c.dbbuf.prp2 = cpu_to_le64(dev->dbbuf_eis_dma_addr); |
264 | 264 | ||
265 | if (nvme_submit_sync_cmd(dev->ctrl.admin_q, &c, NULL, 0)) { | 265 | if (nvme_submit_sync_cmd(dev->ctrl.admin_q, &c, NULL, 0)) { |
266 | dev_warn(dev->dev, "unable to set dbbuf\n"); | 266 | dev_warn(dev->ctrl.device, "unable to set dbbuf\n"); |
267 | /* Free memory and continue on */ | 267 | /* Free memory and continue on */ |
268 | nvme_dbbuf_dma_free(dev); | 268 | nvme_dbbuf_dma_free(dev); |
269 | } | 269 | } |
@@ -1394,11 +1394,11 @@ static void nvme_warn_reset(struct nvme_dev *dev, u32 csts) | |||
1394 | result = pci_read_config_word(to_pci_dev(dev->dev), PCI_STATUS, | 1394 | result = pci_read_config_word(to_pci_dev(dev->dev), PCI_STATUS, |
1395 | &pci_status); | 1395 | &pci_status); |
1396 | if (result == PCIBIOS_SUCCESSFUL) | 1396 | if (result == PCIBIOS_SUCCESSFUL) |
1397 | dev_warn(dev->dev, | 1397 | dev_warn(dev->ctrl.device, |
1398 | "controller is down; will reset: CSTS=0x%x, PCI_STATUS=0x%hx\n", | 1398 | "controller is down; will reset: CSTS=0x%x, PCI_STATUS=0x%hx\n", |
1399 | csts, pci_status); | 1399 | csts, pci_status); |
1400 | else | 1400 | else |
1401 | dev_warn(dev->dev, | 1401 | dev_warn(dev->ctrl.device, |
1402 | "controller is down; will reset: CSTS=0x%x, PCI_STATUS read failed (%d)\n", | 1402 | "controller is down; will reset: CSTS=0x%x, PCI_STATUS read failed (%d)\n", |
1403 | csts, result); | 1403 | csts, result); |
1404 | } | 1404 | } |
@@ -1740,8 +1740,8 @@ static int nvme_pci_enable(struct nvme_dev *dev) | |||
1740 | */ | 1740 | */ |
1741 | if (pdev->vendor == PCI_VENDOR_ID_APPLE && pdev->device == 0x2001) { | 1741 | if (pdev->vendor == PCI_VENDOR_ID_APPLE && pdev->device == 0x2001) { |
1742 | dev->q_depth = 2; | 1742 | dev->q_depth = 2; |
1743 | dev_warn(dev->dev, "detected Apple NVMe controller, set " | 1743 | dev_warn(dev->ctrl.device, "detected Apple NVMe controller, " |
1744 | "queue depth=%u to work around controller resets\n", | 1744 | "set queue depth=%u to work around controller resets\n", |
1745 | dev->q_depth); | 1745 | dev->q_depth); |
1746 | } | 1746 | } |
1747 | 1747 | ||
@@ -1759,7 +1759,7 @@ static int nvme_pci_enable(struct nvme_dev *dev) | |||
1759 | if (dev->cmbsz) { | 1759 | if (dev->cmbsz) { |
1760 | if (sysfs_add_file_to_group(&dev->ctrl.device->kobj, | 1760 | if (sysfs_add_file_to_group(&dev->ctrl.device->kobj, |
1761 | &dev_attr_cmb.attr, NULL)) | 1761 | &dev_attr_cmb.attr, NULL)) |
1762 | dev_warn(dev->dev, | 1762 | dev_warn(dev->ctrl.device, |
1763 | "failed to add sysfs attribute for CMB\n"); | 1763 | "failed to add sysfs attribute for CMB\n"); |
1764 | } | 1764 | } |
1765 | } | 1765 | } |