Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Nov 2001 21:22:48 +0200
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        Konstantin Chuguev <Konstantin.Chuguev@dante.org.uk>, imp@FreeBSD.org, current@FreeBSD.org
Subject:   Re: PCMCIA modem is detected/attached only on second insertion
Message-ID:  <3BF41608.4A686712@FreeBSD.org>
References:  <200110231419.f9NEJjH94445@vega.vega.com> <3BD57E20.85806DC3@dante.org.uk> <3BDFAFB7.B42AE8BC@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------DDCC4E63AE3E12F95CAFCAEB
Content-Type: text/plain; charset=x-user-defined
Content-Transfer-Encoding: 7bit

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
--------------DDCC4E63AE3E12F95CAFCAEB
Content-Type: text/plain; charset=x-user-defined;
 name="cardd.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="cardd.c.diff"

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. */
 	}

--------------DDCC4E63AE3E12F95CAFCAEB--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BF41608.4A686712>