Re: SS_CAP_STATIC_MAP and I/O resources manipulation in ide-cs and PCMCIA core
David Hinds <[email protected]> Thu, 13 Mar 2003 10:44:19 -0800
| Newsgroups | gmane.linux.pcmcia.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Mar 13, 2003 at 05:31:51PM +0000, Russell King wrote: > > Linus has also expressed an interest in making PCMCIA allocate resources > for regions it uses, but not marking them busy. How do you do that? I argued with Linus about that a few years ago but he did not want the resource management system to have that capability. Has it been added?? > Note that I think Dmitry's panic occurs because something is successfully > requesting a resource, but not freeing it. I don't think that's related > to the PCMCIA core though, but probably ide-cs. If ide-cs itself requests > a resource, it is responsible for freeing that resource. It is an interaction between the core and ide-cs; I'm not sure who is "really" responsible. For non-static controllers, ide-cs jumps through some hoops to make resource management seem to mostly work. The PCMCIA core wants to manage resources because only it knows when resources are actually committed to a piece of hardware; anything else invites conflicts with any other subsystem that needs to dynamically allocate resources. But the IDE driver also wants to do conflict checking and claim resources for itself. To resolve the conflicting claims, the core allocates the resource, and ide-cs frees it just prior to calling register_ide() so that the IDE driver won't complain. Then, when the card is released, ide-cs allocates the resource back so that the PCMCIA core can free it. Yes this sucks, but a simple alternative doesn't seem to present itself. We could modify the IDE driver so that when a device is registered at a specific location, it skips its checks for resource conflicts. Or add a flag so that the ide-cs driver can tell the core to not actually register resources with the kernel in this case. -- Dave ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en