Skip to contentSkip to conversation

cpqarray update for 2.6

PATCH [email protected] 1 participant 1 message May 7, 2004 Block layer

lore
Share & tools
lore
#0 lore raw

This patch fixes 2 minor issues that break our Array Configuration utility.
my_io was changed to a pointer so the & had to removed when using it with copy_to_user(). Sometime in 2.5 SG_MAX got changed to 31. Maybe to copy cciss? Now I'm changing it back to 32 so our app can work. Please consider this for inclusion.

Thanks,
mikem
-------------------------------------------------------------------------------

 cpqarray.c |    2 +-
 ida_cmd.h  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/cpqarray.c +1 -1
diff -burpN lx266-rc2.orig/drivers/block/cpqarray.c lx266-rc2-cpqarray/drivers/block/cpqarray.c
@@ -1193,7 +1193,7 @@ static int ida_ioctl(struct inode *inode
 		if (error)
 			goto out_passthru;
 		error = -EFAULT;
-		if (copy_to_user(io, &my_io, sizeof(*my_io)))
+		if (copy_to_user(io, my_io, sizeof(*my_io)))
 			goto out_passthru;
 		error = 0;
 out_passthru:
drivers/block/ida_cmd.h +1 -1
diff -burpN lx266-rc2.orig/drivers/block/ida_cmd.h lx266-rc2-cpqarray/drivers/block/ida_cmd.h
@@ -67,7 +67,7 @@ typedef struct {
 	__u8	reserved;
 } rhdr_t;
 
-#define SG_MAX			31
+#define SG_MAX			32
 typedef struct {
 	rhdr_t	hdr;
 	sg_t	sg[SG_MAX];