Re: resource questions [initio driver fixes (?)]

From: Thomas Graichen (news-list.linux.kernel@innominate.de)
Date: Sun May 21 2000 - 13:00:07 EST


Jeff Garzik <jgarzik@mandrakesoft.com> wrote:

>> the question remaining now for me is: what is the proper way of
>> io and irq ressource management in linux now ? - does it somehow
>> map all the pci ressources by itself or why are the ports already
>> maped ? - can anyone please explain me a bit how all this would
>> look like in a "perfect" driver ? (or point me to some doc about
>> this ?)
>
> If the driver is PCI, you should look into using the pci_register_driver
> interface... (Documentation/pci.txt)

thanks - the thing is - its an already existing driver in the
normal kernel tree and i would like to understand how it works now
first :-) ... i have read the pci.txt but it does not help me a
lot ... maybe you can give me some more hints ...

here's the left situation:

the initio driver (ini9100u.c) calls request_region (and silently
fails) thus release_region says "freeing nonexistent ressource"
(at least this is what i think) - my question now is - why does
request_region fail ? - some more details: (btw. the release_region
is not in the tree version of the driver so far)

/proc/ioports says before the loading of the module

6100-61ff : Initio Corporation INI-940

and after loading it the same - but for instance for the 3c59x
driver (which does basically the same: request_region) it looks
like

6300-637f : 3Com Corporation 3c905B 100BaseTX [Cyclone]

before loading the module and like

6300-637f : 3Com Corporation 3c905B 100BaseTX [Cyclone]
  6300-637f : eth0

after loading it

i assume the entries for all the pci devices in ioports come from
the pci code itself (?) and it is somehow possible to request
regions ontop of them (this is at least what i assume due to the
3c59x behaviour) - but the how and why is not really clear to me

it will be very happy if anyone can point me to some docs or explain
this a bit here - i would really like to understand what happens here
(i already read some of the relevant pieces - kernel/resource.c for
instance - but i don't get the full picture)

>> one more quite small question: is the 0x100 correct in the
>> request_region call (i would assume 0xff) of both initio
>> drivers ? (ini9100u.c and inia100.c) - i would assume
>> 0xff ...

> Hardware specific, look at 'lspci' output or similar.

it says 256 which would be 0x100 - ok

a lot of thanks in advance

t

-- 
thomas.graichen@innominate.de
                                                        innominate AG
                                                    networking people
fon: +49.30.308806-13 fax: -77 web: http://innominate.de pgp: /pgp/tg

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:20 EST