Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-24 Thread Greg KH
On Wed, Jul 24, 2013 at 12:38:13AM -0500, Josef Schimke wrote: On 07/23/2013 09:57 PM, Greg KH wrote: On Tue, Jul 23, 2013 at 04:30:29AM -0500, Josef Schimke wrote: wrt that: 1. Am I on the right track thinking like that? 2. Does the USB stuff in the kernel already have a way to test

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-24 Thread Alan Stern
On Tue, 23 Jul 2013, Josef Schimke wrote: @@ -80,20 +80,26 @@ static int hid_start_in(struct hid_devic unsigned long flags; int rc = 0; struct usbhid_device *usbhid = hid-driver_data; + int i; spin_lock_irqsave(usbhid-lock, flags); if (hid-open 0

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-23 Thread Jiri Kosina
On Sun, 21 Jul 2013, sgtcapslock wrote: I took Alan's excellent advice and read a good bit of that book last night. Definitely some good authors there! After pondering Alan's diagnosis for a bit, I went to inspect the usbhid driver code, and wound up creating a patch which works! I've

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-23 Thread Josef Schimke
On 07/23/2013 03:26 AM, Jiri Kosina wrote: Hi, as Greg mentioned already -- normally there shouldn't be any reason for private e-mail, Ccing proper mailinglists is always a good idea to get as much feedback as possible; feel free to drop me an e-mail. Hello, Ahh, apologies to both of

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-23 Thread Greg KH
On Tue, Jul 23, 2013 at 04:30:29AM -0500, Josef Schimke wrote: wrt that: 1. Am I on the right track thinking like that? 2. Does the USB stuff in the kernel already have a way to test this? 3. If not, I'm really stumped about how I can do this, so any advice would be great. :p Aside

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-23 Thread Josef Schimke
On 07/23/2013 09:57 PM, Greg KH wrote: On Tue, Jul 23, 2013 at 04:30:29AM -0500, Josef Schimke wrote: wrt that: 1. Am I on the right track thinking like that? 2. Does the USB stuff in the kernel already have a way to test this? 3. If not, I'm really stumped about how I can do this, so any

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-22 Thread sgtcapslock
Hello, I'd like to post the incomplete patch I've written so far and see if anybody has anything to say about it, and perhaps see if anyone can help me with a couple little problems I'm having trouble with. It's taken me a while to come back to this because I've been busy trying to make sure

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-21 Thread sgtcapslock
I took Alan's excellent advice and read a good bit of that book last night. Definitely some good authors there! After pondering Alan's diagnosis for a bit, I went to inspect the usbhid driver code, and wound up creating a patch which works! I've tested three different gaming mice, and they now

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-21 Thread Greg KH
On Sun, Jul 21, 2013 at 02:59:41PM -0500, sgtcapslock wrote: I took Alan's excellent advice and read a good bit of that book last night. Definitely some good authors there! After pondering Alan's diagnosis for a bit, I went to inspect the usbhid driver code, and wound up creating a patch

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-20 Thread Alan Stern
On Fri, 19 Jul 2013 sgtcapsl...@lavabit.com wrote: Can you provide usbmon traces showing what happens when the mouse is plugged in to an OHCI controller and when it is plugged in to an EHCI controller? Instructions are in Documentation/usb/usbmon.txt. Alan Stern Absolutely.

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-20 Thread sgtcapslock
On 07/20/2013 01:27 PM, Alan Stern wrote: I think I see what's going on. The usbhid driver uses a single interrupt URB to receive data from the device. When the URB completes, it gets resubmitted to receive the next packet of data. The OHCI controller issues interrupts at frame

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-20 Thread Alan Stern
On Sat, 20 Jul 2013, sgtcapslock wrote: This could be considered a bug in the usbhid driver. As far as I can see, the only way to fix it is to use two interrupts URBs rather than one. Alan Stern Thanks a lot for taking time to diagnose this, I appreciate it! I think I

[PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-19 Thread sgtcapslock
This is https://bugzilla.kernel.org/show_bug.cgi?id=60586 - I'm posting it here as directed by Greg Kroah-Hartman. -- usbhid's mousepoll parameter is setting all of the gaming mice I've tested to exactly 1/2 of the expected polling rate that I specify, but only if the gaming mice are using the

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-19 Thread Alan Stern
On Fri, 19 Jul 2013 sgtcapsl...@lavabit.com wrote: This is https://bugzilla.kernel.org/show_bug.cgi?id=60586 - I'm posting it here as directed by Greg Kroah-Hartman. -- usbhid's mousepoll parameter is setting all of the gaming mice I've tested to exactly 1/2 of the expected polling rate

Re: [PROBLEM/BUG] mouse polling at only half rate on ohci_hcd

2013-07-19 Thread sgtcapslock
Can you provide usbmon traces showing what happens when the mouse is plugged in to an OHCI controller and when it is plugged in to an EHCI controller? Instructions are in Documentation/usb/usbmon.txt. Alan Stern Absolutely. Ahh, I'm not really sure if I should send them as attachments to