* RE: [PATCH] megaraid_sas: fix compat ioctl handling
@ 2005-10-04 22:48 Bagalkote, Sreenivas
2005-10-05 16:25 ` 'Christoph Hellwig'
0 siblings, 1 reply; 4+ messages in thread
From: Bagalkote, Sreenivas @ 2005-10-04 22:48 UTC (permalink / raw)
To: 'Christoph Hellwig', Bagalkote, Sreenivas; +Cc: linux-scsi
>Index: linux-2.6/drivers/scsi/megaraid/megaraid_sas.h
>===================================================================
>--- linux-2.6.orig/drivers/scsi/megaraid/megaraid_sas.h
>2005-10-04 20:07:32.000000000 +0200
>+++ linux-2.6/drivers/scsi/megaraid/megaraid_sas.h
>2005-10-04 20:28:27.000000000 +0200
>@@ -1124,12 +1124,10 @@
> } frame;
> struct compat_iovec sgl[MAX_IOCTL_SGE]; }
>__attribute__ ((packed));
>-
>-#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct
>compat_megasas_iocpacket)
>-#else
>-#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket)
> #endif
>
>+#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket)
>+#define MEGASAS_IOC_FIRMWARE32 _IOWR('M', 1, struct
>compat_megasas_iocpacket)
> #define MEGASAS_IOC_GET_AEN _IOW('M', 3, struct megasas_aen)
>
> struct megasas_mgmt_info {
>
MEGASAS_IOC_FIRMWARE32 which is defined outside CONFIG_COMPAT is using
struct compat_megasas_iocpacket which is inside the CONFIG_COMPAT. It
still works because MEGASAS_IOC_FIRMWARE32 is not referenced elsewhere
in the code. I wasn't sure if you inteneded this to be like this (to
force driver not to use FIRMWARE32 value in outside CONFIG_COMPAT).
The patch looks ok to me.
Sreenivas
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] megaraid_sas: fix compat ioctl handling
2005-10-04 22:48 [PATCH] megaraid_sas: fix compat ioctl handling Bagalkote, Sreenivas
@ 2005-10-05 16:25 ` 'Christoph Hellwig'
0 siblings, 0 replies; 4+ messages in thread
From: 'Christoph Hellwig' @ 2005-10-05 16:25 UTC (permalink / raw)
To: Bagalkote, Sreenivas; +Cc: 'Christoph Hellwig', linux-scsi
> MEGASAS_IOC_FIRMWARE32 which is defined outside CONFIG_COMPAT is using
> struct compat_megasas_iocpacket which is inside the CONFIG_COMPAT. It
> still works because MEGASAS_IOC_FIRMWARE32 is not referenced elsewhere
> in the code. I wasn't sure if you inteneded this to be like this (to
> force driver not to use FIRMWARE32 value in outside CONFIG_COMPAT).
as you said it shouldn't matter. if you prefer it inside the ifdef
I can send an incremental patch to fix it up.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] megaraid_sas: fix compat ioctl handling
@ 2005-10-06 14:03 Bagalkote, Sreenivas
0 siblings, 0 replies; 4+ messages in thread
From: Bagalkote, Sreenivas @ 2005-10-06 14:03 UTC (permalink / raw)
To: 'Christoph Hellwig'; +Cc: linux-scsi
>
>> MEGASAS_IOC_FIRMWARE32 which is defined outside
>CONFIG_COMPAT is using
>> struct compat_megasas_iocpacket which is inside the
>CONFIG_COMPAT. It
>> still works because MEGASAS_IOC_FIRMWARE32 is not referenced
>elsewhere
>> in the code. I wasn't sure if you inteneded this to be like this (to
>> force driver not to use FIRMWARE32 value in outside CONFIG_COMPAT).
>
>as you said it shouldn't matter. if you prefer it inside the
>ifdef I can send an incremental patch to fix it up.
>
No, it is fine as it is now. Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] megaraid_sas: fix compat ioctl handling
@ 2005-10-04 18:40 Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2005-10-04 18:40 UTC (permalink / raw)
To: Sreenivas.Bagalkote; +Cc: linux-scsi
MEGASAS_IOC_FIRMWARE can't be redefined if CONFIG_COMPAT is set, we
need to define a MEGASAS_IOC_FIRMWARE32 define so native binaries
continue to work.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/drivers/scsi/megaraid/megaraid_sas.c
===================================================================
--- linux-2.6.orig/drivers/scsi/megaraid/megaraid_sas.c 2005-10-04 20:22:11.000000000 +0200
+++ linux-2.6/drivers/scsi/megaraid/megaraid_sas.c 2005-10-04 20:29:14.000000000 +0200
@@ -2615,9 +2615,8 @@
unsigned long arg)
{
switch (cmd) {
- case MEGASAS_IOC_FIRMWARE:{
- return megasas_mgmt_compat_ioctl_fw(file, arg);
- }
+ case MEGASAS_IOC_FIRMWARE32:
+ return megasas_mgmt_compat_ioctl_fw(file, arg);
case MEGASAS_IOC_GET_AEN:
return megasas_mgmt_ioctl_aen(file, arg);
}
Index: linux-2.6/drivers/scsi/megaraid/megaraid_sas.h
===================================================================
--- linux-2.6.orig/drivers/scsi/megaraid/megaraid_sas.h 2005-10-04 20:07:32.000000000 +0200
+++ linux-2.6/drivers/scsi/megaraid/megaraid_sas.h 2005-10-04 20:28:27.000000000 +0200
@@ -1124,12 +1124,10 @@
} frame;
struct compat_iovec sgl[MAX_IOCTL_SGE];
} __attribute__ ((packed));
-
-#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct compat_megasas_iocpacket)
-#else
-#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket)
#endif
+#define MEGASAS_IOC_FIRMWARE _IOWR('M', 1, struct megasas_iocpacket)
+#define MEGASAS_IOC_FIRMWARE32 _IOWR('M', 1, struct compat_megasas_iocpacket)
#define MEGASAS_IOC_GET_AEN _IOW('M', 3, struct megasas_aen)
struct megasas_mgmt_info {
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-10-06 14:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-04 22:48 [PATCH] megaraid_sas: fix compat ioctl handling Bagalkote, Sreenivas
2005-10-05 16:25 ` 'Christoph Hellwig'
-- strict thread matches above, loose matches on Subject: below --
2005-10-06 14:03 Bagalkote, Sreenivas
2005-10-04 18:40 Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).