git: 5afd13ff5b6a - stable/12 - Report cpi->hba_* for nda(4) because why not.
Warner Losh
imp at FreeBSD.org
Sat Jul 31 00:21:22 UTC 2021
The branch stable/12 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=5afd13ff5b6a7a828dffa505e984fec6946ca5b3
commit 5afd13ff5b6a7a828dffa505e984fec6946ca5b3
Author: Alexander Motin <mav at FreeBSD.org>
AuthorDate: 2020-08-12 20:05:43 +0000
Commit: Warner Losh <imp at FreeBSD.org>
CommitDate: 2021-07-31 00:02:52 +0000
Report cpi->hba_* for nda(4) because why not.
MFC after: 1 week
---
sys/dev/nvme/nvme_sim.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c
index c9d8d94543d7..efec8d34868a 100644
--- a/sys/dev/nvme/nvme_sim.c
+++ b/sys/dev/nvme/nvme_sim.c
@@ -197,8 +197,12 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb)
cpi->xport_specific.nvme.slot = pci_get_slot(dev);
cpi->xport_specific.nvme.function = pci_get_function(dev);
cpi->xport_specific.nvme.extra = 0;
- strncpy(cpi->xport_specific.nvme.dev_name, device_get_nameunit(ctrlr->dev),
+ strncpy(cpi->xport_specific.nvme.dev_name, device_get_nameunit(dev),
sizeof(cpi->xport_specific.nvme.dev_name));
+ cpi->hba_vendor = pci_get_vendor(dev);
+ cpi->hba_device = pci_get_device(dev);
+ cpi->hba_subvendor = pci_get_subvendor(dev);
+ cpi->hba_subdevice = pci_get_subdevice(dev);
cpi->ccb_h.status = CAM_REQ_CMP;
break;
}
More information about the dev-commits-src-all
mailing list