USB Serial device disconnect causes IRQ disable

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: amruth
Date: Wednesday, August 20, 2008 - 11:03 pm

Hi
Oliver

Everything works fine without plugging the device. I have memory stick 
which never creates any problem.


I understand the problem because I have 2 devices using the same driver.
One device requies only to read from bulk in pipe and other gets null packet interrupt followed by bulk in read to get data.

Previously I did only bulk in read for both the devices and no handler for interrupt.
When I use together, there is flooding of interrupts coming from the device but unhandled by the driver.

I need to separate out both the logics one for interrupt the other to get bulk pipe to read data directly.

Thanks Oliver for pointing the issue, I never understood why it happened but I see the data being read from bulk in pipe irrespective of handling interrupts which means we need to read interrupts otherwise spurious interrupts logic detects it and disables the USB bus 

I have another issue where I need to stop the bulk in read callback when it no longer has data to give to the application because the data length is dynamic. I see that we continue to read without even data in the urb.

 /* Continue to read if we have still urbs to do. */
                    port->read_urb->dev = port->serial->dev;
                 result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
                 if (result)
                         err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
                 dbg("%s - usb_submit_urb(read urb)", __FUNCTION__);

This logic is used in all drivers.
After close is called in the application, the driver continues to call read_bulk_in callback  function which continues to read and the error
"failed resubmitting read urb" is displayed. 

This particular functions below in close does not kill read_urb and hence the bulk in call back continues to read.
                    usb_kill_urb(port->write_urb);
                    usb_kill_urb(port->read_urb);

How to effectively stop urbs submitting read request into USB when no longer data is ther in the transfer buffer.
Thanks
Amruth p.v


--- On Thu, 8/21/08, Oliver Neukum <oliver@neukum.org> wrote:



      

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
USB Serial device disconnect causes IRQ disable, amruth, (Wed Aug 20, 12:34 pm)
Re: USB Serial device disconnect causes IRQ disable, Oliver Neukum, (Wed Aug 20, 1:23 pm)
Re: USB Serial device disconnect causes IRQ disable, Oliver Neukum, (Wed Aug 20, 10:19 pm)
USB Serial device disconnect causes IRQ disable, amruth, (Wed Aug 20, 11:03 pm)
Re: USB Serial device disconnect causes IRQ disable, Oliver Neukum, (Wed Aug 20, 11:09 pm)
USB Serial device disconnect causes IRQ disable, amruth, (Wed Aug 20, 11:18 pm)
Re: USB Serial device disconnect causes IRQ disable, Oliver Neukum, (Wed Aug 20, 11:28 pm)