PCMCIA (ray_cs) and CONFIG_ISA

From: Andrew Pimlott
Date: Tue Oct 28 2003 - 01:38:16 EST


I just tried to use the in-kernel ray_cs driver in 2.4.22 (after
having used the stand-alone PCMCIA driver for years). I encountered
much frustration, and while I don't have a complete understanding of
the issues, it seems that there is a tangled relationship between
CONFIG_ISA and allocating interrupts for PCMCIA devices. In short,
everything works with CONFIG_ISA enabled (even only in cs.c and
rsrc_mgr.c) and fails otherwise. I'm pretty sure my notebook
doesn't have any ISA, and there is nothing in kconfig to require
CONFIG_ISA, leaving a nasty trap.

Looking at pcmcia_request_irq, it seems that there is no chance to
pick an irq if CONFIG_ISA is disabled and the IRQ_HANDLE_PRESENT
flag is set. The only chance is if the socket irq_mask is zero, but
this doesn't seem to be the case for PC sockets (I'm using
yenta_socket). So it ends up requesting irq 0, which doesn't work
out so well (CS_IN_USE).

The code is basically the same in the stand-alone drivers, but I
noticed that the Debian build scripts for the stand-alone drivers
force CONFIG_ISA on. I didn't find any documentation of why. I
guess that's why I never had a problem before.

So how are things supposed to work? Is this driver doing something
wrong (I observed the pcnet_cs driver works fine without CONFIG_ISA:
it doesn't get its own irq and is happy with that)? Pilot error?
Or just an undocumented pitfall?

Here are the kernel messages for a failed attempt to use the
in-kernel ray_cs driver:

Linux Kernel Card Services 3.1.22
options: [pci] [cardbus] [pm]
cs.c 1.279 2001/10/13 00:08:28 (David Hinds)
PCI: Found IRQ 11 for device 00:0b.0
PCI: Found IRQ 11 for device 00:0b.1
Yenta IRQ list 06b0, PCI irq11
Socket status: 30000007
cs: pcmcia_register_socket(0xd0b9f360)
Yenta IRQ list 06b0, PCI irq11
ray_cs Detected: WebGear PC Card WLAN Adapter Version 4.88 Jan 1999
ray_cs: AccessConfigurationRegister: Resource in use

Andrew

Cc: Rusty King since he seems to have submitted some maybe-related
patches for 2.5.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/