summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-07-25 15:43:52 +0000
committermav <mav@FreeBSD.org>2010-07-25 15:43:52 +0000
commit68b26f66494feb7f028f26e91a6756e69b2ba395 (patch)
tree17a1e011d37cb64ccedab6ec54cdbac15a501c84 /sys/geom
parente67ee04556273868e17fd2c1a6791f8246d0a48f (diff)
downloadFreeBSD-src-68b26f66494feb7f028f26e91a6756e69b2ba395.zip
FreeBSD-src-68b26f66494feb7f028f26e91a6756e69b2ba395.tar.gz
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.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/geom_disk.c12
-rw-r--r--sys/geom/geom_disk.h4
2 files changed, 16 insertions, 0 deletions
diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c
index 4cf3196..25d2e3b 100644
--- a/sys/geom/geom_disk.c
+++ b/sys/geom/geom_disk.c
@@ -305,6 +305,18 @@ g_disk_start(struct bio *bp)
break;
else if (g_handleattr_str(bp, "GEOM::ident", dp->d_ident))
break;
+ else if (g_handleattr(bp, "GEOM::hba_vendor",
+ &dp->d_hba_vendor, 2))
+ break;
+ else if (g_handleattr(bp, "GEOM::hba_device",
+ &dp->d_hba_device, 2))
+ break;
+ else if (g_handleattr(bp, "GEOM::hba_subvendor",
+ &dp->d_hba_subvendor, 2))
+ break;
+ else if (g_handleattr(bp, "GEOM::hba_subdevice",
+ &dp->d_hba_subdevice, 2))
+ break;
else if (!strcmp(bp->bio_attribute, "GEOM::kerneldump"))
g_disk_kerneldump(bp, dp);
else
diff --git a/sys/geom/geom_disk.h b/sys/geom/geom_disk.h
index 5e9d1aa..01dd732 100644
--- a/sys/geom/geom_disk.h
+++ b/sys/geom/geom_disk.h
@@ -85,6 +85,10 @@ struct disk {
u_int d_stripeoffset;
u_int d_stripesize;
char d_ident[DISK_IDENT_SIZE];
+ uint16_t d_hba_vendor;
+ uint16_t d_hba_device;
+ uint16_t d_hba_subvendor;
+ uint16_t d_hba_subdevice;
/* Fields private to the driver */
void *d_drv1;
OpenPOWER on IntegriCloud