aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-10-11 00:59:54 -0400
committerPaul Mackerras <paulus@samba.org>2007-10-11 06:40:48 -0400
commit8251b4c481bca72568e9c1042ea11189838e5f6d (patch)
tree41991f93aec12592885ac33a5312dcf4024ebe5f /include
parent7465ce0db310d2fa29f721da7e3aacd1dad7090f (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')
-rw-r--r--include/asm-powerpc/iseries/vio.h47
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
56struct 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
65struct rw_data {
66 u64 offset;
67 struct {
68 u32 token;
69 u32 reserved;
70 u64 len;
71 } dma_info[VIOMAXBLOCKDMA];
72};
73
74struct 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
90enum vioblocksubtype {
91 vioblockopen = 0x0001,
92 vioblockclose = 0x0002,
93 vioblockread = 0x0003,
94 vioblockwrite = 0x0004,
95 vioblockflush = 0x0005,
96 vioblockcheck = 0x0007
97};
98
54struct viocdlpevent { 99struct 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);
133extern void *vio_get_event_buffer(int subtype); 178extern void *vio_get_event_buffer(int subtype);
134extern void vio_free_event_buffer(int subtype, void *buffer); 179extern void vio_free_event_buffer(int subtype, void *buffer);
135 180
181extern struct vio_dev *vio_create_viodasd(u32 unit);
182
136extern HvLpIndex viopath_hostLp; 183extern HvLpIndex viopath_hostLp;
137extern HvLpIndex viopath_ourLp; 184extern HvLpIndex viopath_ourLp;
138 185