public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@redhat.com>
To: Alan Kilian <kilian@bobodyne.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Solaris developer wants a Linux Mentor for drivers.
Date: Wed, 06 Oct 2004 13:10:27 -0400	[thread overview]
Message-ID: <41642703.8030700@redhat.com> (raw)
In-Reply-To: <200410061625.i96GPVu01974@raceme.attbi.com>

Alan Kilian wrote:
> 
>   Kernel folks,
> 
>     I am in the process of porting a Sun Solaris PCI bus driver
>     that I wrote over to a 2.4 kernel, and I could use a mentor
>     just to get me over the initial bumps.
> 
>     I have a module that can be loaded, and detects my card, and
>     responds to ioctl() calls properly, so I'm moving right along,
>     but I do have some problems now.
> 
>     1) If I "oops" in my module, I cannot unload it with:
>        # /sbin/rmmod sse    
>        sse: Device or resource busy
somebody is holding a reference to your device, either through your 
modules use of the MOD_INC_USE_COUNT macro (which I believe is 
depricated), or through the use of one of the macros that the kernel 
uses to prevent module remove race conditions (dev_hold is the only one 
that jumps to mind at the moment).  You can only get the module to 
remove by balancing the MOD_INC/DEC macros, or massaging your kernel to 
release any references to your module.  However, after an oops, its 
usually best practice to reboot, lest you run a kernel with corrupted 
memory somewhere.

> 
>        I have only figured out that a reboot cleans things up again.
> 
>     2) An example of using pci_ops read_dword() would be superb.
> 
I don't believe you call the operation in a pci_ops structure directly. 
  check the kernel for references to 
pci_[read|write]_config_[byte|word|dword] instead.

HTH
Neil
>     By the way, this development environment is really slick
>     compared to Solaris. When I "oops" in Solaris, the kernel
>     panics and I'm in for a messy fsck on the way back up. This
>     is a great improvement.
> 
>     Thanks in advance for any help any of you may provide.
> 
>     After this, there will be one more Linux PCI bus driver developer
>     in the world, and that can't be a bad thing.
> 
>                           -Alan
> 


-- 
/***************************************************
  *Neil Horman
  *Software Engineer
  *Red Hat, Inc.
  *nhorman@redhat.com
  *gpg keyid: 1024D / 0x92A74FA1
  *http://pgp.mit.edu
  ***************************************************/

  reply	other threads:[~2004-10-06 17:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-06 16:25 Solaris developer wants a Linux Mentor for drivers Alan Kilian
2004-10-06 17:10 ` Neil Horman [this message]
2004-10-06 17:22 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2004-10-06 18:21 Alan Kilian
2004-10-06 21:33 ` Greg KH

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=41642703.8030700@redhat.com \
    --to=nhorman@redhat.com \
    --cc=kilian@bobodyne.com \
    --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