diff options
| author | Mike Miller <mikem@beardog.cca.cpqcorp.net> | 2004-06-17 18:08:10 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-17 18:08:10 -0700 |
| commit | 17ced6b4ff34ed3386355694ffcbe19fea758dc2 (patch) | |
| tree | 30567d1f7b84f0919b7b35046c329582e2bc0973 /include/linux/cciss_ioctl.h | |
| parent | 7895536ad84ff642b38e381facae35dc76dc6a6d (diff) | |
[PATCH] cciss ioctl32 update
This patch provides a conversion routine for 32-bit user space apps that
call into a 64-bit kernel on x86_64 architectures. This is required for
the HP Array Configuration utility and the HP management agents. Without
this patch the apps will not function.
The 2 ioctls affected are the cciss pass thru ioctls. Caveat: it spits out
2 warnings during compilation. I've tried everything I can think of to
clean them up, but... If anyone has any helpful suggestions I'm all ears.
Code by Stephen Cameron
Tested by Stephen Cameron & Mike Miller
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/cciss_ioctl.h')
| -rw-r--r-- | include/linux/cciss_ioctl.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/cciss_ioctl.h b/include/linux/cciss_ioctl.h index 22b342ef9ab7..ee0c6e8995da 100644 --- a/include/linux/cciss_ioctl.h +++ b/include/linux/cciss_ioctl.h @@ -206,7 +206,35 @@ typedef struct _LogvolInfo_struct{ #define CCISS_REGNEWDISK _IOW(CCISS_IOC_MAGIC, 13, int) #define CCISS_REGNEWD _IO(CCISS_IOC_MAGIC, 14) +#define CCISS_RESCANDISK _IO(CCISS_IOC_MAGIC, 16) #define CCISS_GETLUNINFO _IOR(CCISS_IOC_MAGIC, 17, LogvolInfo_struct) #define CCISS_BIG_PASSTHRU _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL_Command_struct) +#ifdef __KERNEL__ +#ifdef CONFIG_COMPAT + +/* 32 bit compatible ioctl structs */ +typedef struct _IOCTL32_Command_struct { + LUNAddr_struct LUN_info; + RequestBlock_struct Request; + ErrorInfo_struct error_info; + WORD buf_size; /* size in bytes of the buf */ + __u32 buf; /* 32 bit pointer to data buffer */ +} IOCTL32_Command_struct; + +typedef struct _BIG_IOCTL32_Command_struct { + LUNAddr_struct LUN_info; + RequestBlock_struct Request; + ErrorInfo_struct error_info; + DWORD malloc_size; /* < MAX_KMALLOC_SIZE in cciss.c */ + DWORD buf_size; /* size in bytes of the buf */ + /* < malloc_size * MAXSGENTRIES */ + __u32 buf; /* 32 bit pointer to data buffer */ +} BIG_IOCTL32_Command_struct; + +#define CCISS_PASSTHRU32 _IOWR(CCISS_IOC_MAGIC, 11, IOCTL32_Command_struct) +#define CCISS_BIG_PASSTHRU32 _IOWR(CCISS_IOC_MAGIC, 18, BIG_IOCTL32_Command_struct) + +#endif /* CONFIG_COMPAT */ +#endif /* __KERNEL__ */ #endif |
