diff usr/src/uts/sun4v/sys/vdc.h @ 3078:aa37b7e3c5c7

6485548 Can not create zpool on guest domain with an entire vdisk 6486746 cnex timeouts during intr redistribution when doing cpu DR 6488547 Kaio accesses of block size greater than 64K fail on guest's virtual disks 6488812 vdc driver should define internal macro instead of SDUNIT/SDPART
author narayan
date Wed, 08 Nov 2006 19:55:37 -0800
parents a30c4090b49f
children eee1ef6f0e3e
line wrap: on
line diff
--- a/usr/src/uts/sun4v/sys/vdc.h	Wed Nov 08 12:11:22 2006 -0800
+++ b/usr/src/uts/sun4v/sys/vdc.h	Wed Nov 08 19:55:37 2006 -0800
@@ -95,10 +95,19 @@
 #define	VDC_SEQ_NUM_TODO		1	/* Request needs processing */
 
 /*
+ * Macros to get UNIT and PART number
+ */
+#define	VDCUNIT_SHIFT	3
+#define	VDCPART_MASK	7
+
+#define	VDCUNIT(dev)	(getminor((dev)) >> VDCUNIT_SHIFT)
+#define	VDCPART(dev)	(getminor((dev)) &  VDCPART_MASK)
+
+/*
  * Scheme to store the instance number and the slice number in the minor number.
- * (Uses the same format and definitions as the sd(7D) driver)
+ * (NOTE: Uses the same format and definitions as the sd(7D) driver)
  */
-#define	VD_MAKE_DEV(instance, minor)	((instance << SDUNIT_SHIFT) | minor)
+#define	VD_MAKE_DEV(instance, minor)	((instance << VDCUNIT_SHIFT) | minor)
 
 /*
  * variables controlling how long to wait before timing out and how many