Embedded CF driver broken with recent kernel

Dirk Behme dirk.behme at de.bosch.com
Thu Sep 29 11:36:48 EDT 2005


Dirk Behme wrote:
> Some kernel versions ago (2.6.11, 2.6.12 ?) this worked fine. With
> recent 2.6.14-rc1 this seems to be broken (see messages below).

> => Insert CF card into boards CF slot:
> 
> hda: TOSHIBA THNCF256MDG, CFA DISK drive
> hda: IRQ probe failed (0x0)
> hdb: IRQ probe failed (0x0)

> 	if (omap_cf_present()) {
> 		struct omap_cf_socket	*cf;
> 
> 		*sp = SS_READY | SS_DETECT | SS_POWERON | SS_3VCARD;
> 		cf = container_of(s, struct omap_cf_socket, socket);
> 		s->irq.AssignedIRQ = cf->irq;
> 	} else

Looking into this shows that in drivers/pcmcia/pcmcia_resource.c there
was a change from

if (ret) {
	if (!s->pci_irq)
		return ret;
	irq = s->pci_irq; }

to

/* only assign PCI irq if no IRQ already assigned */
if (ret && !s->irq.AssignedIRQ) {
	if (!s->pci_irq)
		return ret;
	irq = s->pci_irq; }

With following patch in CF driver it seems to work again:

  		*sp = SS_READY | SS_DETECT | SS_POWERON | SS_3VCARD;
  		cf = container_of(s, struct omap_cf_socket, socket);
-		s->irq.AssignedIRQ = cf->irq;
+		s->irq.AssignedIRQ = 0;
+		s->pci_irq = cf->irq;
  	} else
  		*sp = 0;

Has this to be fixed in pcmcia code or in embedded CF driver with patch
above?

Dirk




More information about the linux-pcmcia mailing list