All of lore.kernel.org
 help / color / mirror / Atom feed
* possible bug on ppp_async
@ 2008-06-09 18:23 Gustavo Fernando Padovan
  2008-06-09 18:52 ` Charlie Brady
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Gustavo Fernando Padovan @ 2008-06-09 18:23 UTC (permalink / raw)
  To: linux-ppp

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 2325 bytes --]

Hello,

I found out a problem on drivers/net/ppp_async.c: I'm testing a modem
(Motorola SM56 Data Fax Modem [1057:3052] that uses the slmodem
driver) and I noted that it stopped to work correctly with kernel
2.6.24 or greater. The modem connects once and at the second try it
becomes busy and I have to restart its driver to put it to work again.
I tested this only with this hardware, but I think this is a hardware
independent issue.

Theses changes make it stop to work:

http://lkml.org/lkml/2007/11/2/100
http://lkml.org/lkml/2007/11/2/131

The problem occurs when the execution enters on switch's default case
and call tty_mode_ioctl() and the cmd is not TCGETS or cmd is not
TCGETA. I don't know why this happens, but happens. On kernel 2.6.23
the switch's default case returns immediately with an error. But now
on kernel 2.6.24 and 2.6.25 switch's default case call
tty_mode_ioctl(). This is the unique real change between the two
versions, the others are only code restructuring. Then I made this
patch to revert part of changes and make modem works again. I don't
know if this is correct. I just put the modem to work.

--- a/drivers/net/ppp_async.c.     2008-06-09 13:12:25.000000000 -0300
+++ b/drivers/net/ppp_async.c      2008-06-09 13:15:57.000000000 -0300
@@ -309,6 +309,11 @@
                err = 0;
                break;

+       case TCGETS:
+       case TCGETA:
+               err = tty_mode_ioctl(tty, file, cmd, arg);
+               break;
+
        case TCFLSH:
                /* flush our buffers and the serial port's buffer */
                if (arg = TCIOFLUSH || arg = TCOFLUSH)
@@ -324,8 +329,7 @@
                break;

        default:
-               /* Try the various mode ioctls */
-               err = tty_mode_ioctl(tty, file, cmd, arg);
+               err = -ENOIOCTLCMD;
        }

        ap_put(ap);



-------------------------------------------
Gustavo Fernando Padovan
Engenharia de Computação 2006
LAS - Laboratório de Administração e Segurança de Sistemas
Instituto de Computação - UNICAMP

gfpadovan@gmail.com
ra061316@students.ic.unicamp.br
pao@jabber.org
-------------------------------------------

Seja Livre, use Software Livre
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þšiþ)í…æèw*\x1fjg¬±¨\x1e¶‰šŽŠÝ¢jÿ¾\a«þG«éÿ¢¸\f¢·¦j:+v‰¨ŠwèjØm¶Ÿÿþø\x1e¯ù\x1e®w¥þŠàþf£¢·hšâúÿ†Ù¥

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-06-16 17:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 18:23 possible bug on ppp_async Gustavo Fernando Padovan
2008-06-09 18:52 ` Charlie Brady
2008-06-09 19:06 ` Gustavo Fernando Padovan
2008-06-09 21:03 ` Alan Cox
2008-06-11 20:55 ` Gustavo Fernando Padovan
2008-06-13 18:01 ` Gustavo Fernando Padovan
2008-06-13 18:19 ` Charlie Brady
2008-06-13 19:38 ` Alan Cox
2008-06-16 12:54 ` Gustavo Fernando Padovan
2008-06-16 17:09 ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.