Maxim Sobolev wrote:
> 
> Konstantin Chuguev wrote:
> >
> > Hi All,
> >
> > FYI:
> >
> > Maxim Sobolev wrote:
> >
> > > I had started observing this problem about a 1.5 months ago - my
> > > PCMCIA modem (EigerCom 33.6) is detected/attached only on second
> > > insertion, i.e. if I'm booting with the card inserted I have to
> > > manually eject it and put back, while if the machine boots with
> > > an empty slot I have to do insert-eject-insert procedure. At the
> > > same time, another PCMCIA card (ed0-compatible ethernet adapter)
> > > doesn't have this problem. Following is related kernel output
> >
> > The funny thing is, I've got the opposite situation: I have to insert my
> > network card twice (Netgear - old version), but my modem card (Xircom) works
> > fine straight away. CURRENT, OLDCARD.
> 
> Warner, do you have any ideas?

Ok, I've investigated and found that the source of the problem was a
trivial misconfiguration. In my pccard.conf I've assigned IRQ 9 to
modem, while forgot to add this IRQ into the list of available IRQs (I
had 3 5 10 11 13 15). For some reason, this setup was working during
at least past 1 year, which is obviously the reason why
misconfiguration wasn't detected earlier.

However, the quiestion remains, whether it is a good that behaviour is
different on second insertion. Digging into pccardd revealed that this
happens because after the first failure the daemon resets IRQ field in
the configuration structure to be 0, so that at the next insertion the
daemon allocates a first free IRQ available. Attached patch is
expected to make behaviour more consistent. Please let me know what do
you think.

-Maxim
Index: cardd.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pccard/pccardd/cardd.c,v
retrieving revision 1.74
diff -d -u -r1.74 cardd.c
--- cardd.c     2001/10/05 20:38:32     1.74
+++ cardd.c     2001/11/15 19:19:26
@@ -532,6 +532,11 @@
                irqmin = 1;
                irqmax = 15;
        } else {
+               if (pool_irq[conf->irq] == 0) {
+                       logmsg("IRQ %d required for %s is not in the list of "
+                              "available IRQs", conf->irq, cp->manuf);
+                       return (NULL);
+               }
                irqmin = irqmax = conf->irq;
                conf->irq = 0;          /* Make sure we get it. */
        }

Reply via email to