From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935431AbdCLVrZ (ORCPT ); Sun, 12 Mar 2017 17:47:25 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:38553 "EHLO hera.aquilenet.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934858AbdCLVrR (ORCPT ); Sun, 12 Mar 2017 17:47:17 -0400 Date: Sun, 12 Mar 2017 22:47:13 +0100 From: Samuel Thibault To: Alan Stern Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, dave@mielke.cc, kevin.derome@epitech.eu, clause.andreabush@gmail.com, mengualjeanphi@free.fr Subject: Re: [PATCH] usb-core: Add MS_INTR_BINTERVAL USB quirk Message-ID: <20170312214713.dtefwa26z7xiyazn@var.youpi.perso.aquilenet.fr> Mail-Followup-To: Samuel Thibault , Alan Stern , gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, dave@mielke.cc, kevin.derome@epitech.eu, clause.andreabush@gmail.com, mengualjeanphi@free.fr References: <20170312201046.4jax6q5quugvpquh@var.youpi.perso.aquilenet.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: I am not organized User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alan Stern, on dim. 12 mars 2017 17:18:51 -0400, wrote: > Interesting. This is a high-speed device that mistakenly uses the > low/full-speed encoding for an interrupt bInterval value? Yes... > That's pretty unusual. Most HID devices (which includes the Braille > devices I have heard of) run at low speed, and a few of them run at > full speed. I can't remember any running at high speed. That's the first device for which we have such issue. We'll try to check whether some other devices need the same quirk. > > + */ > > + /* > > + * This quirk fixes bIntervals reported in ms. > > + */ > > + if (to_usb_device(ddev)->quirks & > > + USB_QUIRK_MS_INTR_BINTERVAL) > > + i = j = n; > > You want to use the bInterval value the device intended to provide, not > a default value. n is alreay computed as such above, but OK :) (and better clamp anyway) > > + /* Baum Vario Ultra */ > > + { USB_DEVICE(0x0904, 0x6101), .driver_info = > > + USB_QUIRK_MS_INTR_BINTERVAL }, > > + { USB_DEVICE(0x0904, 0x6102), .driver_info = > > + USB_QUIRK_MS_INTR_BINTERVAL }, > > + { USB_DEVICE(0x0904, 0x6103), .driver_info = > > + USB_QUIRK_MS_INTR_BINTERVAL }, > > You didn't read the comment at the start of the file. :-) This list > is supposed to remain sorted by vendor and product ID. D'oh, sorry :) Samuel