lkml.org 
[lkml]   [2004]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Solaris developer wants a Linux Mentor for drivers.
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
***************************************************/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.038 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site