svn commit: r188219 - head/sys/dev/pccard
Warner Losh
imp at FreeBSD.org
Thu Feb 5 23:49:04 PST 2009
Author: imp
Date: Fri Feb 6 07:49:03 2009
New Revision: 188219
URL: http://svn.freebsd.org/changeset/base/188219
Log:
Store the entire funce for disk type functions (eg CF cards and the
like).
Modified:
head/sys/dev/pccard/pccard_cis.c
head/sys/dev/pccard/pccardvarp.h
Modified: head/sys/dev/pccard/pccard_cis.c
==============================================================================
--- head/sys/dev/pccard/pccard_cis.c Fri Feb 6 07:47:53 2009 (r188218)
+++ head/sys/dev/pccard/pccard_cis.c Fri Feb 6 07:49:03 2009 (r188219)
@@ -1283,6 +1283,8 @@ decode_funce(const struct pccard_tuple *
if (type == PCCARD_TPLFE_TYPE_DISK_DEVICE_INTERFACE) {
pf->pf_funce_disk_interface
= pccard_tuple_read_1(tuple, 1);
+ pf->pf_funce_disk_power
+ = pccard_tuple_read_1(tuple, 2);
}
break;
case PCCARD_FUNCTION_NETWORK:
Modified: head/sys/dev/pccard/pccardvarp.h
==============================================================================
--- head/sys/dev/pccard/pccardvarp.h Fri Feb 6 07:47:53 2009 (r188218)
+++ head/sys/dev/pccard/pccardvarp.h Fri Feb 6 07:49:03 2009 (r188219)
@@ -75,7 +75,23 @@ struct pccard_config_entry {
};
struct pccard_funce_disk {
- int pfd_interface;
+ uint8_t pfd_interface;
+#define PFD_I_V_MASK 0x3
+#define PFD_I_V_NONE_REQUIRED 0x0
+#define PFD_I_V_REQ_MOD_ACC 0x1
+#define PFD_I_V_REQ_ACC 0x2
+#define PFD_I_V_REQ_ALWYS 0x1
+#define PFD_I_S 0x4 /* 0 rotating, 1 silicon */
+#define PFD_I_U 0x8 /* SN Uniq? */
+#define PFD_I_D 0x10 /* 0 - 1 drive, 1 - 2 drives */
+ uint8_t pfd_power;
+#define PFD_P_P0 0x1
+#define PFD_P_P1 0x2
+#define PFD_P_P2 0x4
+#define PFD_P_P3 0x8
+#define PFD_P_N 0x10 /* 3f7/377 excluded? */
+#define PFD_P_E 0x20 /* Index bit supported? */
+#define PFD_P_I 0x40 /* twincard */
};
struct pccard_funce_lan {
@@ -119,6 +135,7 @@ struct pccard_function {
union pccard_funce pf_funce; /* CISTPL_FUNCE */
#define pf_funce_disk_interface pf_funce.pfv_disk.pfd_interface
+#define pf_funce_disk_power pf_funce.pfv_disk.pfd_power
#define pf_funce_lan_nid pf_funce.pfv_lan.pfl_nid
#define pf_funce_lan_nidlen pf_funce.pfv_lan.pfl_nidlen
};
More information about the svn-src-all
mailing list