From 68b26f66494feb7f028f26e91a6756e69b2ba395 Mon Sep 17 00:00:00 2001 From: mav Date: Sun, 25 Jul 2010 15:43:52 +0000 Subject: Export PCI IDs of ATA/SATA controllers through CAM and ata(4) layers to GEOM. This information needed for proper soft-RAID's on-disk metadata reading and writing. --- sys/dev/mvs/mvs.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sys/dev/mvs') diff --git a/sys/dev/mvs/mvs.c b/sys/dev/mvs/mvs.c index a7800ec..6b08222 100644 --- a/sys/dev/mvs/mvs.c +++ b/sys/dev/mvs/mvs.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "mvs.h" #include @@ -2017,7 +2018,7 @@ mvs_check_ids(device_t dev, union ccb *ccb) static void mvsaction(struct cam_sim *sim, union ccb *ccb) { - device_t dev; + device_t dev, parent; struct mvs_channel *ch; CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("mvsaction func_code=%x\n", @@ -2152,6 +2153,7 @@ mvsaction(struct cam_sim *sim, union ccb *ccb) { struct ccb_pathinq *cpi = &ccb->cpi; + parent = device_get_parent(dev); cpi->version_num = 1; /* XXX??? */ cpi->hba_inquiry = PI_SDTR_ABLE; if (!(ch->quirks & MVS_Q_GENI)) { @@ -2180,6 +2182,12 @@ mvsaction(struct cam_sim *sim, union ccb *ccb) cpi->protocol = PROTO_ATA; cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = MAXPHYS; + if ((ch->quirks & MVS_Q_SOC) == 0) { + cpi->hba_vendor = pci_get_vendor(parent); + cpi->hba_device = pci_get_device(parent); + cpi->hba_subvendor = pci_get_subvendor(parent); + cpi->hba_subdevice = pci_get_subdevice(parent); + } cpi->ccb_h.status = CAM_REQ_CMP; break; } -- cgit v1.1