Quoting Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
but I know that vendor driver uses these
endpoints with bulk urbs and using those solve/workaround CPU usage
problem. Increasing interrupt interval from 1 to 255 didn't help.
I think zd1211rw have been trying to use bulk urbs too, but
usb_bulk_msg() silently switches to interrupt mode. I don't know if
editing endpoint descriptors is right way solve this, or why CPU usage
is higher.
CPU usage comes from writing beacon frame to device, this is done
usually every 100ms on AP-mode. On Atom writing beacon (multiple
usb_bulk_msg() calls) with interrupt endpoints usually takes ~20msec
and this is when CPU usage goes up. By changing endpoints to bulk,
time to write beacon drops to 0~3msec.
That's part of the problem -- the driver shouldn't use usb_bulk_msg().
Create a bunch of URBs and submit them explicitly all at once; don't
wait for one to finish before submitting the next. Setting the
URB_NO_INTERRUPT flag on all but the last could also help. This might
use even less CPU time than you see currently.
I had been experimenting with making just that, bunch of URBs, not
waiting until end. Now I tested with URB_NO_INTERRUPT on all except
last urb and CPU usage dropped from 10% to 2%. Thanks :)
-Jussi
--
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