public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alexander V. Lukyanov" <lav@long.yar.ru>
To: Michael Bacarella <mbac@nyct.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Trying to fix 3dfx.o + question about char drivers..
Date: Fri, 23 Feb 2001 22:51:59 +0300	[thread overview]
Message-ID: <20010223225159.A2555@long.yar.ru> (raw)

Michael Bacarella wrote:
> So, I upgrade to 2.4.0 and it's cool, except that I can't do
> anything neat with my voodoo3 anymore. I've been looking
> for a solution for weeks but to no avail. 3dfx's web site
> looks like it's gone and nothing on lk about it.
> 
> The process calls ioctl() after opening /dev/3dfx. That ioctl() triggers
> an mmap() call, the driver gets addresses it's totally not expecting,
> and it returns -EPERM.

struct file_operations has changed in 2.4.0. The following patch for 3dfx
module fixes the structure initialization and makes it work just fine.

--- 3dfx_driver.c	Sun Apr  9 03:44:10 2000
+++ 3dfx_driver.c	Fri Feb 23 22:42:06 2001
@@ -707,25 +707,10 @@
 #endif /* HAVE_MTRR */
 
 static struct file_operations fops_3dfx = {
-	NULL,			/* llseek (2.1) / lseek (2.0) */
-	NULL,			/* read */
-	NULL,			/* write */
-	NULL,			/* readdir */
-	NULL,			/* poll (2.1) / select (2.0) */
-	ioctl_3dfx,		/* ioctl */
-	mmap_3dfx,		/* mmap */
-	open_3dfx,		/* open */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 118)
-	NULL,			/* flush (2.1.118+) */
-#endif
-	release_3dfx,		/* release */
-	NULL,			/* fsync */
-	NULL,			/* fasync */
-	NULL,			/* check_media_change */
-	NULL,			/* revalidate */
-#ifdef KERNEL_VER_2_1
-	NULL			/* lock (2.1) */
-#endif
+	ioctl:		ioctl_3dfx,
+	mmap:		mmap_3dfx,
+	open:		open_3dfx,
+	release:	release_3dfx
 };
 
 #ifdef MODULE

             reply	other threads:[~2001-02-23 19:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-23 19:51 Alexander V. Lukyanov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-02-14 21:22 Trying to fix 3dfx.o + question about char drivers Michael Bacarella

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=20010223225159.A2555@long.yar.ru \
    --to=lav@long.yar.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbac@nyct.net \
    /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