SS_CAP_STATIC_MAP and I/O resources manipulation in ide-cs and PCMCIA core

Dmitry Antipov <[email protected]> Thu, 13 Mar 2003 16:50:56 +0300
Newsgroups gmane.linux.pcmcia.devel
Message-ID <[email protected]>
Hello all,

  I'm working with a PCMCIA stuff on a custom PXA250-based board.
I know the question about (looks strange initially) resources 
manipulation in ide-cs.c was being discussed here already,
but it seems I have some misunderstanding of what should being done
if SS_CAP_STATIC_MAP is set.

  As I understand, PCMCIA core should allocate I/O region in 
alloc_io_space() in cs.c. Then, this region should be freed by
ide-cs in ide_config(). During the IDE shutdown, this region must be 
re-allocated again in ide_release() and freed while unloading PCMCIA 
core in release_io_space().

  Looks clear, but if SS_CAP_STATIC_MAP is set, no real resource 
allocation/freeing is performed by PCMCIA core, isn't it ? And, ide-cs 
knows nothing about it, and will try to free non-allocated resource in 
ide_config(). And, after unloading IDE stuff, PCMCIA core doesn't 
attempts to free resource re-allocated at ide-cs exit. As a result,
I have "lost" ("owned" by unloaded module) resource. This is obviously 
wrong, and causes kernel panic while 'cat /proc/ioports'.

  Bumm... I'm confused. What I should do ?

TIA,
Dmitry



-------------------------------------------------------
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