Return domain, bus, slot, and function for the transport settings in
PATH_INQ requests for nvme. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13546
This commit is contained in:
parent
783b0eb845
commit
7cb94763be
@ -633,6 +633,11 @@ struct ccb_pathinq_settings_sas {
|
||||
|
||||
struct ccb_pathinq_settings_nvme {
|
||||
uint32_t nsid; /* Namespace ID for this path */
|
||||
uint32_t domain;
|
||||
uint8_t bus;
|
||||
uint8_t slot;
|
||||
uint8_t function;
|
||||
uint8_t extra;
|
||||
};
|
||||
|
||||
#define PATHINQ_SETTINGS_SIZE 128
|
||||
|
@ -182,7 +182,8 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb)
|
||||
break;
|
||||
case XPT_PATH_INQ: /* Path routing inquiry */
|
||||
{
|
||||
struct ccb_pathinq *cpi = &ccb->cpi;
|
||||
struct ccb_pathinq *cpi = &ccb->cpi;
|
||||
device_t dev = ctrlr->dev;
|
||||
|
||||
/*
|
||||
* NVMe may have multiple LUNs on the same path. Current generation
|
||||
@ -210,6 +211,11 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb)
|
||||
cpi->protocol = PROTO_NVME;
|
||||
cpi->protocol_version = nvme_mmio_read_4(ctrlr, vs);
|
||||
cpi->xport_specific.nvme.nsid = ns->id;
|
||||
cpi->xport_specific.nvme.domain = pci_get_domain(dev);
|
||||
cpi->xport_specific.nvme.bus = pci_get_bus(dev);
|
||||
cpi->xport_specific.nvme.slot = pci_get_slot(dev);
|
||||
cpi->xport_specific.nvme.function = pci_get_function(dev);
|
||||
cpi->xport_specific.nvme.extra = 0;
|
||||
cpi->ccb_h.status = CAM_REQ_CMP;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user