diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2007-10-11 00:59:54 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-10-11 06:40:48 -0400 |
commit | 8251b4c481bca72568e9c1042ea11189838e5f6d (patch) | |
tree | 41991f93aec12592885ac33a5312dcf4024ebe5f /include/asm-powerpc/iseries | |
parent | 7465ce0db310d2fa29f721da7e3aacd1dad7090f (diff) |
[POWERPC] iSeries: Move viodasd probing
This way we only have entries in the device tree for disks that actually
exist. A slight complication is that disks may be attached to LPARs
at runtime.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/iseries')
-rw-r--r-- | include/asm-powerpc/iseries/vio.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/asm-powerpc/iseries/vio.h b/include/asm-powerpc/iseries/vio.h index 2555dfd6fac6..f9ac0d00b951 100644 --- a/include/asm-powerpc/iseries/vio.h +++ b/include/asm-powerpc/iseries/vio.h | |||
@@ -51,6 +51,51 @@ | |||
51 | */ | 51 | */ |
52 | #define VIO_MAX_SUBTYPES 8 | 52 | #define VIO_MAX_SUBTYPES 8 |
53 | 53 | ||
54 | #define VIOMAXBLOCKDMA 12 | ||
55 | |||
56 | struct open_data { | ||
57 | u64 disk_size; | ||
58 | u16 max_disk; | ||
59 | u16 cylinders; | ||
60 | u16 tracks; | ||
61 | u16 sectors; | ||
62 | u16 bytes_per_sector; | ||
63 | }; | ||
64 | |||
65 | struct rw_data { | ||
66 | u64 offset; | ||
67 | struct { | ||
68 | u32 token; | ||
69 | u32 reserved; | ||
70 | u64 len; | ||
71 | } dma_info[VIOMAXBLOCKDMA]; | ||
72 | }; | ||
73 | |||
74 | struct vioblocklpevent { | ||
75 | struct HvLpEvent event; | ||
76 | u32 reserved; | ||
77 | u16 version; | ||
78 | u16 sub_result; | ||
79 | u16 disk; | ||
80 | u16 flags; | ||
81 | union { | ||
82 | struct open_data open_data; | ||
83 | struct rw_data rw_data; | ||
84 | u64 changed; | ||
85 | } u; | ||
86 | }; | ||
87 | |||
88 | #define vioblockflags_ro 0x0001 | ||
89 | |||
90 | enum vioblocksubtype { | ||
91 | vioblockopen = 0x0001, | ||
92 | vioblockclose = 0x0002, | ||
93 | vioblockread = 0x0003, | ||
94 | vioblockwrite = 0x0004, | ||
95 | vioblockflush = 0x0005, | ||
96 | vioblockcheck = 0x0007 | ||
97 | }; | ||
98 | |||
54 | struct viocdlpevent { | 99 | struct viocdlpevent { |
55 | struct HvLpEvent event; | 100 | struct HvLpEvent event; |
56 | u32 reserved; | 101 | u32 reserved; |
@@ -133,6 +178,8 @@ extern void vio_set_hostlp(void); | |||
133 | extern void *vio_get_event_buffer(int subtype); | 178 | extern void *vio_get_event_buffer(int subtype); |
134 | extern void vio_free_event_buffer(int subtype, void *buffer); | 179 | extern void vio_free_event_buffer(int subtype, void *buffer); |
135 | 180 | ||
181 | extern struct vio_dev *vio_create_viodasd(u32 unit); | ||
182 | |||
136 | extern HvLpIndex viopath_hostLp; | 183 | extern HvLpIndex viopath_hostLp; |
137 | extern HvLpIndex viopath_ourLp; | 184 | extern HvLpIndex viopath_ourLp; |
138 | 185 | ||