updated patch with throttling

Duncan Sands baldrick at free.fr
Fri Mar 25 07:00:03 EST 2005

Hi Roman,

> I thought so too, but upon closer inspection I realized that a failed
> urb submission didn't cause a break from the main loop in
> usbatm_process_{receive,send}, so it went over and over => livelock if
> the submission error was permanent.

that doesn't seem right.  For example, in usbatm_process_send there is:

                if ((err = usb_submit_urb(snd->urb, GFP_ATOMIC)) < 0) {
                        dbg("usbatm_process_send: urb submission failed (%d)!", err);
                        list_add(&snd->list, &instance->spare_senders);
                        list_add(&buf->list, &instance->filled_send_buffers);
                        return; /* bail out */

Notice the line commented /* bail out */?  I think the problem was more
to do with who schedules the tasklet.  IIRC, originally the send tasklet
wasn't rescheduled when the urb status was non-zero in the send completion
routine, but it seems to be rescheduled now, which is not so good (this is
not the only problem).



PS: Good to hear you're working on the stall problem - it's important.

More information about the Usbatm mailing list