pccard_validate_cis() vs. antiquated SRAM PCMCIA-Cards
linux at dominikbrodowski.net
Thu Apr 15 13:25:56 EDT 2010
On Wed, Apr 14, 2010 at 11:36:24PM +0400, Alexander Kurz wrote:
> for the pcmciamtd driver there exists a Kconfig option
> CONFIG_MTD_PCMCIA_ANONYMOUS to support anonymous storage cards.
> At present, using this option has no effect at all,
> because anonymous PCMCIA-Cards are filtered out
> by pccard_validate_cis() in the pcmcia_card_add() stage.
> Access to this card is possible with the fixed version of the
> pcmciamtd driver, when pccard_validate_cis() is disabled. e.g.:
> # modprobe pcmciamtd mem_type=1 force_size=1 bankwidth=1
> Here is an example for a quasi-anonymous card,
> a Kingmax (maybe clone) 1MB SRAM-Card SJA-001M5C:
> # pccardctl status
> Socket 1:
> 5.0V 16-bit PC Card
> Subdevice 0 (function 0) bound to driver "pcmciamtd"
> # pccardctl info
> Should I build an exception, or should we declare those
> antiquated cards as "not supported"?
> An other alternative would be to skip the pccard_validate_cis()
> when CONFIG_MTD_PCMCIA_ANONYMOUS is set.
> What do you think about this?
I don't think it's a good idea to skip the test _in all cases_ if
CONFIG_MTD_PCMCIA_ANONYMOUS is set. We should at least be certain
a) either statically mapped sockets are used, or
b) the resource setup worked fine.
Else we might end up considering a network device (where we can't read the
CIS due to the socket not being set up properly) an MTD device. Possibly,
forcing an usersapce override (e.g. to a sysfs file) might be needed as
More information about the linux-pcmcia