« Return to Thread: Some development questions

Re: Some development questions

by Nicolas Boullis :: Rate this Message:

Reply to Author | View in Thread

Hi,

On Mon, Sep 15, 2008 at 06:00:14AM +0000, Christian Gmeiner wrote:

>
> If you want I will explain it to you, but I think my linux driver
> programming book is too old :( I
> had a quick look at drivers/pci/pci.c and found out, that all those
> check, if our device supports
> busmastering are not needed, as pci_set_master does all the hard work.
> So.. I have ordered
> a fresh book.
>
> So please change the whole block to:
>
>
> static int em8300_pci_setup(struct pci_dev *dev)
> {
> struct em8300_s *em = pci_get_drvdata(dev);
> unsigned char revision;
> int rc = 0;
> u16 cmd;
>
> rc = pci_enable_device(dev);
> if (rc < 0) {
> printk(KERN_ERR "em8300: Unable to enable PCI device\n");
> return rc;
> }
>
> pci_set_master(dev);
>
> em->adr = pci_resource_start(dev, 0);
> em->memsize = pci_resource_len(dev, 0);
>
> pci_read_config_byte(dev, PCI_CLASS_REVISION, &revision);
> em->pci_revision = revision;
>
> return 0;
> }

I did it and merged your other patches.
(Edit: I've just seen you have new ones...)


> I am sorry for this trouble, but I have learned much from it and hope
> such situations will
> never happen again, as I will have a look at the sources of the kernel
> if I am not sure.

It's no problem.


> By the way... which kernel version do we support?

As far as I am concerned, I'm willing to support all 2.4 and 2.6
kernels.
I know most developers don't care about 2.4 any more, but:
 * I know at least one person who uses the em8300 drivers with a 2.4
   kernel;
 * I hate the way the 2.6 kernel is managed (unstable API, invasive
   changes, ...), so I understand why one may prefer to keep the
   rock-solid 2.4 branch.

It'd be ok for me, if needed, to drop support for old 2.4 and old 2.6
kernels.


Cheers,

Nicolas

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

 « Return to Thread: Some development questions