On 12 sep 2009, at 20:09, Joris van Rantwijk wrote:
rv = tty_port_block_til_ready(&acm->port, tty, filp);
With this line commented out, I can open /dev/ttyACM0 and it
appears to work correctly.
The thing is, tty_port_block_til_ready() checks that acm->port.flags
has the ASYNC_INITIALIZED bit set.
If this bit is not set, it returns -ERESTARTSYS. In turn,
acm_tty_open also returns -ERESTARTSYS (without cancelling its URBs
and tasklet). This results in tty_open infinitely retrying the call
to acm_tty_open. I still don't get why that locks up my entire system
though.
Shopping around in other serial drivers, I see that most drivers
explicitly set the ASYNC_INITIALIZED bit at some point. Indeed, my
problem seems to disappear if I insert
acm->port.flags |= ASYNC_INITIALIZED
right before the call to tty_port_block_til_ready().
Greetings, Joris.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html