public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Bacarella <mbac@nyct.net>
To: linux-kernel@vger.kernel.org
Subject: Trying to fix 3dfx.o + question about char drivers..
Date: Wed, 14 Feb 2001 16:22:22 -0500	[thread overview]
Message-ID: <20010214162222.A19995@sync.nyct.net> (raw)

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.

[ By all means, if someone has fixed this, do let me know ]

Tracing the Glide test programs shows that ioctl() is returning
-EPERM. Compiling the driver with 'make debug' shows:

[  To aid in the confusion, my machine's hostname is 'mmap' ]

[ insmod 3dfx.o ]
Feb 14 15:08:14 mmap kernel: 3dfx: Entering init_module()
Feb 14 15:08:14 mmap kernel: 3dfx: Successfully registered device 3dfx
Feb 14 15:08:14 mmap kernel: 3dfx: board vendor 4634 type 5 located at de000000/

[ ./test3Dfx ]
Feb 14 15:08:29 mmap kernel: 3dfx: Entering mmap_3dfx
Feb 14 15:08:29 mmap kernel: 3dfx: Couldn't match address 0 to a card
Feb 14 15:08:29 mmap kernel: 3dfx: Entering release_3dfx

mmap_3dfx is being called before ioctl_3dfx is ever reached. Looking
to make heads of the "Couldn't match address 0 to a card" message, I
stuck in some more debugging output:

[ VM_OFFSET is #define VM_OFFSET(vma) (vma->vm_pgoff << PAGE_SHIFT) ]

Feb 14 15:08:29 mmap kernel: 3dfx: Entering mmap_3dfx
Feb 14 15:08:29 mmap kernel: 3dfx: Entering decode_vma:
Feb 14 15:08:29 mmap kernel: 3dfx: start = c1270640, end = c5e40840
Feb 14 15:08:29 mmap kernel: 3dfx: offset = 0 (VM_OFFSET = 0)
Feb 14 15:08:29 mmap kernel: 3dfx: Leaving decode_vma
Feb 14 15:08:29 mmap kernel: 3dfx: compare de000000 or e2000000 to 0
Feb 14 15:08:29 mmap kernel: 3dfx: Couldn't match address 0 to a card
Feb 14 15:08:29 mmap kernel: 3dfx: Entering release_3dfx

Sure stumped me. By my guess, it seems that mmap_3dfx is provided by
the char driver so that a userland process can map a region of (video?)
memory on the card.

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.

Why does mmap get called first?? Am I reading this right?

-- 
Michael Bacarella <mbac@nyct.net>
Technical Staff / System Development,
New York Connect.Net, Ltd.

             reply	other threads:[~2001-02-14 21:19 UTC|newest]

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

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=20010214162222.A19995@sync.nyct.net \
    --to=mbac@nyct.net \
    --cc=linux-kernel@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