Alexander Hoogerhuis <[EMAIL PROTECTED]> writes:
> Tried it here, and the ifconfig-bit seems to run fine, although the
> output from smc-ircc's init is printed twice in /var/log/messages:
> found SMC SuperIO Chip (devid=0x0a rev=00 base=0x00e0): FDC37N971
> SMC IrDA Controller found
> IrCC version 2.0, firport 0x100, sirport 0x3e8 dma=2, irq=3
> found SMC SuperIO Chip (devid=0x0a rev=00 base=0x00e0): FDC37N971
> SMC IrDA Controller found
> IrCC version 2.0, firport 0x100, sirport 0x3e8 dma=2, irq=3
> IrDA: Registered device irda0
>
> And if I now type pppd /dev/ircomm0 the machine freezes instantly...
>
> FYI I run 2.4.17 with Robert Loves preempt-patch, and apart from that
> it is a stock RedHat 7.2 system.
>
> Any pointers?
Ugh, I just saw the same yesterday when I tricked a colleague to try
it ;-) Didn't make the connection then, but I think I do now...
The thing that happens is that your serial driver probably have found
and taken control over /dev/ttyS2 (which really is the IrDA port). This
causes smc-ircc to fail the first time, but succeed the second time
you (or the system) try to load it. So you get a double set of
messages.
This happened without my patch too, but I introduced an ugly bug in
ircc_close so it became a bit more fatal than it should be. Impressive
given the low number of changed lines, eh? Which proves that Jean was
perfectly right not to accept any patch without proper testing. New
version attached.
But you should really run 'setserial /dev/ttyS2 uart none' before
loading smc-ircc in any case. I don't know too much about about
RedHat, but there is probably some startup script where such things
should be. In Debian you would put it in /etc/serial.conf.
Bj�rn
--- linux-2.4.17-orig/drivers/net/irda/smc-ircc.c Fri Oct 5 03:41:09 2001
+++ linux-2.4.17/drivers/net/irda/smc-ircc.c Sat Jan 12 20:35:46 2002
@@ -1117,16 +1117,19 @@
{
MESSAGE("%s, Suspending\n", driver_name);
+#if 0
if (self->io->suspended)
return;
ircc_net_close(self->netdev);
self->io->suspended = 1;
+#endif
}
static void ircc_wakeup(struct ircc_cb *self)
{
+#if 0
unsigned long flags;
if (!self->io->suspended)
@@ -1138,6 +1141,7 @@
ircc_net_open(self->netdev);
restore_flags(flags);
+#endif
MESSAGE("%s, Waking up\n", driver_name);
}
@@ -1173,6 +1177,10 @@
IRDA_DEBUG(0, __FUNCTION__ "\n");
ASSERT(self != NULL, return -1;);
+
+ /* unregister with PM system */
+ if (self->pmdev)
+ pm_unregister(self->pmdev);
iobase = self->irport->io.fir_base;