[PATCH 2.6.12-rc5] m32r: Update m32r_cfc.[ch] to support Mappi-III platform

Dominik Brodowski linux at dominikbrodowski.net
Sun Jun 5 13:41:25 EDT 2005


[lkml removed from CC for this pcmcia-specific discussion]

Hi,

On Wed, Jun 01, 2005 at 08:57:44PM +0900, Hirokazu Takata wrote:
> I'm now in trouble with CF device detection at boot time in case of
> pccard_static_ops.
> 
> I guess it has a relationship with that CS_UNSUPPORTED_FUNCTION is 
> returned by rsrc_mgr.c:pcmcia_adjust_resource_info() in !CONFIG_NONSTATIC.
> But I'm not sure...
> 
> So, I will show you the driver's status as following.
> I hope any comments if possible.

OK, here's what I think causes the trouble:

pccard_static_ops are for bridges where the ioports and iomem windows are
statically assigned by the firmwire, by the driver or some other entity
during the boot initialization time. Therefore, there must not be any
userspace interaction  (most notably no /etc/pcmcia/config.opts), but the
driver must be able to determine these "windows" itself.

pccard_nonstatic_ops means that the PCMCIA bridge is able to select ioports
and iomem differently for each card inserted.

AFAICS your driver is clearly of the former category -- i.e. the memory and
ioports area the device has available is known in advance. The fact that
your driver works after "pccardctl insert" is a clear indication that this
is the correct approach...

>     NG ... In STATIC (!CONFIG_NONSTATIC, pccard_static_ops) case,
>            a CF disk/memory device can *not* be probed automatically now.
>            But a CF device can be mounted after "pccardctl insert" command
>            execution, and also a CF device insert event can be handled 
>            correctly.

... so now we have to determine why it doesn't work at boot time. Somewhen
during initialization pcmcia_register_socket() is called (can you check
_when_ this happens in your case), then pcmcia_parse_events() should lead to
socket_detect_change() being called eventually. If a card is present, it
should call socket_insert(); which in turn should cause ds_event() with
event==CS_EVENT_CARD_INSERTION being called eventually. Can you check
whether all this happens as expected for pccard_static_ops? Then we'll also
be much closer to finding the cause for this bug.

Thanks,
	Dominik



More information about the linux-pcmcia mailing list