Re: driver migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I moved the initialization and clean up code from the init_callback/release
callback to the port_init/port_remove callback. This did not help. What
prevents the driver from crashing is to initialize the spinlock via
spin_lock_init(&priv->lock). Not sure if I originally had forgotten the
command, and the driver worked despite an uninitialized spinlock with 
kernel V3.17, or whether the spin_lock_init procedure was added in  kernel
version later than 3.17.

When issuing a write command to the driver via echo "text" > /dev/ttyUSB0,
there is a delay of about 30 Seconds until echo completes (echo is blocking
for 30 seconds). This is also observable in the syslog. usbrsa_close is
started only around 30 secs after completion of the write function
usbrsa_write and the write completion handlers. I would think this might be
related to a change in the scheduling mechanism since 3.17.  I wonder
whether this can be fixed by using usb_serial_port_softint(port) at the
right places. It apparently calls the kernel schedulding interface ( 
usb_serial_port_softint calls schedule_work). I would appreciate a hint on
how to prevent the blocking and an explanaion of what
usb_serial_port_softint is intented to do.

Many thanks

Tilman

[ 7315.882927] usbrsa ttyUSB0: usbrsa_write_callback - length = 2, data = 0d 0a
[ 7315.882932] usbrsa ttyUSB0: usbrsa_write_callback(): Returned URB 1
[ 7315.882938] usbrsa_status_callback: nofTxBytesFree=4074,nofRxBytesReceived=0 
[ 7315.883002] usbrsa_status_callback: nofTxBytesFree=4072,nofRxBytesReceived=0 
[ 7346.332061] usbrsa_close - start
[ 7346.332070] usbrsa ttyUSB0: usbrsa_close - port 0 start
[ 7346.332076] usbrsa ttyUSB0: send_baudrate_lcr_register() CFLAG=3261 
[ 7346.332080] usbrsa ttyUSB0: send_baudrate_lcr_register()
ST16C550.DLL=50;ST16C550.DLM=0;ST16C550.LCR=3
[ 7346.332130] usbrsa ttyUSB0: usbrsa_baudrate_lcr_callback() - port = 0,
ep=0xc0028300
[ 7346.332142] usbrsa ttyUSB0: send_baudrate_lcr_register() leaving
[ 7346.332146] usbrsa ttyUSB0: usbrsa_close - #retries=3
[ 7346.332148] usbrsa_close - end
[ 7346.332151] usbrsa ttyUSB0: usbrsa_close - end 
[ 7346.332163] usbrsa ttyUSB0: usbrsa_status_callback(): wake_up





--
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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux