| 
      
      
      From: Kars de J. <jo...@li...> - 2001-06-15 18:20:51
      
     | 
| On Thursday 14 June 2001 20:04, Geert Uytterhoeven wrote:
> On Thu, 14 Jun 2001, Jouko Pynn=F6nen wrote:
> > On Thu, 14 Jun 2001, I wrote:
> > > The kernel hangs after detecting a PCMCIA card.
> >
> > It looks like the problem was in include/asm-m68k/amipcmcia.h, which
> > has some minor but fatal changes after 2.2:
> >
> > [diff 2.2.3-pre1 -> 2.4.5]
> >
> >  static inline void pcmcia_ack_int(u_char intreq)
> >  {
> > -       gayle.intreq =3D ((intreq & 0x2c) ^ 0x2c) | 0xc0;
> > +       gayle.intreq =3D 0xf8;
> >  }
> >
> >  static inline void pcmcia_enable_irq(void)
> >  {
> > -       gayle.inten =3D GAYLE_IRQ_IDE|GAYLE_IRQ_IRQ;
> > +       gayle.inten |=3D GAYLE_IRQ_IRQ;
> >  }
> >
> >  static inline void pcmcia_disable_irq(void)
> >  {
> > -       gayle.inten =3D GAYLE_IRQ_IDE;
> > +       gayle.inten &=3D ~GAYLE_IRQ_IRQ;
> >  }
> >
> >
> > After replacing the amipcmcia.h file with one taken from 2.2.3-pre1
> > source, the problem is gone and PCMCIA ethernet seems to work (at lea=
st
> > during this half an hour i've been using it). Does anyone know why th=
e
> > file was been changed that way?
>
> IIRC, Kars changed that to fix a problem on his machine.
(Sorry I have been away so long, due to me moving my Amiga was sitting in=
 a=20
box for the last 6 months)
Yes, and please don't revert the patch. It is needed to be able to proper=
ly=20
implement PCMCIA card services.
I expect the real problem lies in the fact that the Gayle IDE driver does=
n't=20
bother with enabling or disabling the IDE interrupt. Instead it used to b=
e=20
enable at bootup by the following piece of code in arch/m68k/amiga/amiint=
s.c:
        /* turn off PCMCIA interrupts */
        if (AMIGAHW_PRESENT(PCMCIA))
                pcmcia_disable_irq();
For m68k, this was changed to:
        /* turn off PCMCIA interrupts */
        if (AMIGAHW_PRESENT(PCMCIA))
                gayle.inten =3D GAYLE_IRQ_IDE;
because the pcmcia_disable_irq() function now does (IMHO) the right thing=
 by=20
not messing with any other bits than its own.
For now you can probably get it to work again by changing the code in=20
arch/ppc/amiga/amiints.c to match the code in the m68k tree.
What should probably be done is make the Gayle IDE driver enable its=20
interrupt.
Kind regards,
Kars de Jong
jo...@li...
 |