* Re: Solaris developer wants a Linux Mentor for drivers.
@ 2004-10-06 18:21 Alan Kilian
2004-10-06 21:33 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Alan Kilian @ 2004-10-06 18:21 UTC (permalink / raw)
To: linux-kernel
Forwarded message:
> From: Greg KH <greg@kroah.com>
>
> Why not 2.6? No new Linux distros are shipping 2.4 kernels anymore...
Well, I down loaded and installed RedHat-9 5 weeks ago, and it
is a 2.4 kernel, so I thought that would be fine.
(See what a novice I am?)
> And a PCI bus driver?
> What kind of hardware is this?
> Is this a driver for a pci card, or a pci bus controller?
This is a driver for talking to my hardware which is a PCI bus card.
This card has 5 large FPGAs, SRAM and dram on it which is used to
accelerate bioinformatics search algorithms.
The card works under Sun Solaris and Windows/2000, and of course,
we would like to add Linux to the list.
Eventually, I'll need to support DMA to and from the card, but
I can get by for a while just doing single-dword I/O.
I just hacked in dev->bus->ops->read_dword(dev,1,&retval);
and I can read memory on the card! (Well, things don't crash anyway)
If this is absolutely the wrong way to do this, please let me know!
Note: I have no idea what the second parameter to read_dword() is!
-Alan
--
- Alan Kilian <kilian(at)timelogic.com>
Director of Bioinformatics, TimeLogic Corporation 763-449-7622
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Solaris developer wants a Linux Mentor for drivers.
2004-10-06 18:21 Solaris developer wants a Linux Mentor for drivers Alan Kilian
@ 2004-10-06 21:33 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-10-06 21:33 UTC (permalink / raw)
To: Alan Kilian; +Cc: linux-kernel
On Wed, Oct 06, 2004 at 01:21:09PM -0500, Alan Kilian wrote:
> Forwarded message:
> > From: Greg KH <greg@kroah.com>
> >
> > Why not 2.6? No new Linux distros are shipping 2.4 kernels anymore...
>
> Well, I down loaded and installed RedHat-9 5 weeks ago, and it
> is a 2.4 kernel, so I thought that would be fine.
> (See what a novice I am?)
Heh, Red Hat 9 is quite old now (a few years old I think.) Try the
latest Red Hat Fedora Core 2 for a more up to date distro if you like to
use Red Hat.
> > And a PCI bus driver?
> > What kind of hardware is this?
> > Is this a driver for a pci card, or a pci bus controller?
>
> This is a driver for talking to my hardware which is a PCI bus card.
So, it's a card, not a PCI bus controller, right? That's much simpler.
> This card has 5 large FPGAs, SRAM and dram on it which is used to
> accelerate bioinformatics search algorithms.
>
> The card works under Sun Solaris and Windows/2000, and of course,
> we would like to add Linux to the list.
>
> Eventually, I'll need to support DMA to and from the card, but
> I can get by for a while just doing single-dword I/O.
>
> I just hacked in dev->bus->ops->read_dword(dev,1,&retval);
> and I can read memory on the card! (Well, things don't crash anyway)
What's wrong with using readl() instead? Use pci_read_config_dword() if
you want access to the config space.
> If this is absolutely the wrong way to do this, please let me know!
>
> Note: I have no idea what the second parameter to read_dword() is!
Try getting a copy of the Linux Device Drivers book (it's also online if
you don't want to buy it) and taking a look at the pci chapter. It
should help you out.
Do you have a pointer to your Linux driver that we might be able to help
you out with?
Good luck,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Solaris developer wants a Linux Mentor for drivers.
@ 2004-10-06 16:25 Alan Kilian
2004-10-06 17:10 ` Neil Horman
2004-10-06 17:22 ` Greg KH
0 siblings, 2 replies; 5+ messages in thread
From: Alan Kilian @ 2004-10-06 16:25 UTC (permalink / raw)
To: linux-kernel
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
I have only figured out that a reboot cleans things up again.
2) An example of using pci_ops read_dword() would be superb.
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
--
- Alan Kilian <kilian(at)timelogic.com>
Director of Bioinformatics, TimeLogic Corporation 763-449-7622
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Solaris developer wants a Linux Mentor for drivers.
2004-10-06 16:25 Alan Kilian
@ 2004-10-06 17:10 ` Neil Horman
2004-10-06 17:22 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Neil Horman @ 2004-10-06 17:10 UTC (permalink / raw)
To: Alan Kilian; +Cc: linux-kernel
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
***************************************************/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Solaris developer wants a Linux Mentor for drivers.
2004-10-06 16:25 Alan Kilian
2004-10-06 17:10 ` Neil Horman
@ 2004-10-06 17:22 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2004-10-06 17:22 UTC (permalink / raw)
To: Alan Kilian; +Cc: linux-kernel
On Wed, Oct 06, 2004 at 11:25:31AM -0500, 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.
Why not 2.6? No new Linux distros are shipping 2.4 kernels anymore...
And a PCI bus driver? What kind of hardware is this? Is this a driver
for a pci card, or a pci bus controller?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-06 21:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-06 18:21 Solaris developer wants a Linux Mentor for drivers Alan Kilian
2004-10-06 21:33 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2004-10-06 16:25 Alan Kilian
2004-10-06 17:10 ` Neil Horman
2004-10-06 17:22 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox