linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Sreenivas.Bagalkote@lsil.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] megaraid_sas: fix compat ioctl handling
Date: Tue, 4 Oct 2005 20:40:00 +0200	[thread overview]
Message-ID: <20051004184000.GA17168@lst.de> (raw)

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 {

             reply	other threads:[~2005-10-04 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-04 18:40 Christoph Hellwig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-04 22:48 [PATCH] megaraid_sas: fix compat ioctl handling Bagalkote, Sreenivas
2005-10-05 16:25 ` 'Christoph Hellwig'
2005-10-06 14:03 Bagalkote, Sreenivas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051004184000.GA17168@lst.de \
    --to=hch@lst.de \
    --cc=Sreenivas.Bagalkote@lsil.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).