[PATCHES] 11-pcmciaresource

Dominik Brodowski linux at dominikbrodowski.de
Fri Mar 26 16:59:52 GMT 2004

Hm. Is this safe?

In find_io_region()
        if (s->cb_dev) {
                ret = pci_bus_alloc_resource(s->cb_dev->bus, res, num, 1,
                                             min, 0, pcmcia_common_align,
        } else

the callback pcmcia_common_align doesn't check whether this port range was
made available in the PCMCIA resource database. An example:

For testing purposes, I only allowed the following resources:

cs: IO port probe 0x4000-0x40ff: clean.
cs: IO port probe 0x4400-0x44ff: clean.
cs: IO port probe 0x4800-0x48ff: clean.
cs: IO port probe 0x4c00-0x4cff: clean.

by setting /etc/pcmcia/config.opts accordingly.

Inserting a modem card, leads to this snippet in /proc/ioports:
03f8-03ff : pcmcia_socket1
  03f8-03ff : serial

If this is indeed _safe_, e.g. pci_bus_alloc_resource only allocates
resources which are known to be free? Else I fear that we might run into
trouble with legacy devices... but if it is indeed safe, the whole
adjust_resource stuff can be ignored for pci-pcmcia sockets

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-pcmcia/attachments/20040326/0c9eefcc/attachment.bin

More information about the linux-pcmcia mailing list