Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5497748ybl; Tue, 10 Dec 2019 07:03:59 -0800 (PST) X-Google-Smtp-Source: APXvYqx0zaxcMlKShIbjSHE4ni7l1qPt9MpmeybemjB5V6Yd2wEf8vrudeLFHpf4ar9o2kmi7kXG X-Received: by 2002:a05:6830:56a:: with SMTP id f10mr18884945otc.368.1575990238999; Tue, 10 Dec 2019 07:03:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575990238; cv=none; d=google.com; s=arc-20160816; b=V1yiG/jiIXgR+joK+2r7rTAXrVVRNa6Gt+kcMwrfFSsKkFg/7Mzyi7czd928UVDK8f HB4aBqT6GpIUZcOAIq+sVFJTWbsdqsA7/EEH0OSR6ZN1Y75f+/CKWx0WHGTz9yDbJZft qCe7Vh7+/c5MYvSjgBmVDXCPDDi1EpJmTWZsuT9+D33x1ui/IaIYqX2yovzWVdsmGrd9 I6O4bP6AvPr8fSx2a5bYuoNLmzza3LHuFHg3bAu7Qw5A5Qk2LaMZTgKemfQLc3SajQcH BqdQFvaqozARiV5ce76RzFMbNyMnLni+e6sMTkQhBvbQzEn777jgqsqxfCYuotdXWKw/ DTiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=zZvlC4T9nIKrmQ0za8Fs/QkXcNOS/gB1wIJZfDFQaxw=; b=TmXxS+5lVG2ueno4Y18z+HCzq+pCFJzHFQjlQO1CcRQ/lXr3NxcLrhX9T2CTEpTnAy OJbYjkHusOqIsbZuXQJGY3D62V8GCglF26j7bnPR5XQj9qn8gjUjyGFSclMjcMz3FBvb +vqZIvN89GPVCf5ok6oQxdR3GH6Dvs08zTJcOHjvaUUQoW7oN3smk/Xn+/hCTdxquNUp 2trxtpF/XDkGFpbpUbqA2S6GET7NTpFt+IzbO5w3fOCsUIofq+8XnP6PlC3FeP4RPYEg jGp1KL8woRzCrnavXaR/QMz0AAfqDaHS4Q1tg0wTIW9HOsTOTEI4iVJ4sgyonxsxfWYg ylnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2si2257973otd.190.2019.12.10.07.03.44; Tue, 10 Dec 2019 07:03:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727518AbfLJPDA (ORCPT + 99 others); Tue, 10 Dec 2019 10:03:00 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:38766 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727272AbfLJPDA (ORCPT ); Tue, 10 Dec 2019 10:03:00 -0500 Received: by mail-lj1-f193.google.com with SMTP id k8so20232792ljh.5; Tue, 10 Dec 2019 07:02:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=zZvlC4T9nIKrmQ0za8Fs/QkXcNOS/gB1wIJZfDFQaxw=; b=NUecQHZ3IkeyD16Naef7ZaGgEeLuY5VXoi+u9DxfhKmzYjm21jH36a1ucl9QRzow0N CvZmHfvhw9dyXdWLvS7amu+1llZXCMdu2JZ7wfzg3TGgRLz6EyQRqtUyBi4Q1WpK6ezZ k9t6wecnzk7O8f8VERMFDM6Sqm/Au256B1UxlKFaK6tIOfXz+EUz91z22Tv8gqZcQR/C 4AscOLwy3irOIMC5Cx8W1Fcj86iNjHk0gutplRHYTxfrl8zEc5aDHCjLy51GdvCyEDSE S7TdtpNhRMntZ5mtxxmnzzH7/S2Uu3lp2dxFmWh/ORK9W55SldPqIlg3TkD4FE+pP6MX Xx3w== X-Gm-Message-State: APjAAAVafjyDw9UJED8RpQJ7IL2UmahkaQFH4hDyfTsFeoM52dzQZIW7 0wJg8klEzZ9vLXS+oaioH6A43QPZ X-Received: by 2002:a2e:9e16:: with SMTP id e22mr12832375ljk.220.1575990178082; Tue, 10 Dec 2019 07:02:58 -0800 (PST) Received: from xi.terra (c-14b8e655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.184.20]) by smtp.gmail.com with ESMTPSA id i19sm2047375ljj.24.2019.12.10.07.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2019 07:02:57 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.92.3) (envelope-from ) id 1ieh2Q-0007jT-Bt; Tue, 10 Dec 2019 16:02:58 +0100 Date: Tue, 10 Dec 2019 16:02:58 +0100 From: Johan Hovold To: Ikjoon Jang Cc: Johan Hovold , linux-usb@vger.kernel.org, GregKroah-Hartman , RobHerring , MarkRutland , AlanStern , SuwanKim , "GustavoA . R . Silva" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Boichat , Mathias Nyman Subject: Re: [PATCH v4 2/2] usb: overridable hub bInterval by device node Message-ID: <20191210150258.GR10631@localhost> References: <20191203101552.199339-1-ikjn@chromium.org> <20191203165301.GH10631@localhost> <20191204075533.GI10631@localhost> <20191205142641.GL10631@localhost> <20191206152604.GO10631@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 09, 2019 at 12:05:53PM +0800, Ikjoon Jang wrote: > On Fri, Dec 6, 2019 at 11:25 PM Johan Hovold wrote: > > > > On Fri, Dec 06, 2019 at 11:57:30AM +0800, Ikjoon Jang wrote: > > > On Thu, Dec 5, 2019 at 10:26 PM Johan Hovold wrote: > > > > The fundamental problem here is that you're using devicetree, which is > > > > supposed to only describe the hardware, to encode policy which should be > > > > deferred to user space. > > > > > > The hub hardware has a default bInterval inside which is actually > > > adjustable. So I can think setting bInterval is to describe the hardware > > > rather than policy. > > > > No, the USB spec says bInterval is a maximum requested value and that > > the host is free to poll more often. And that's policy. > > Honestly I'm a bit confused on the border line between hardware > and software definition. That's quite reasonable it's policy that software > can poll more often than hardware specified, but can we think it's just > overriding hardware property specifying maximum value from beginning? > Is it still policy? or 'overriding hardware property' part is already not > a hardware description? :-S The hardware is supposed to give you the upper limit, and then software is allowed to poll more often if it wants to and is able to do so. In this case that decision depends partly on what is connected to the hub but also on how that device in turn has been configured, specifically, whether runtime PM has been enabled or not. Someone who doesn't use the downstream device, or who prefers to never suspend it, may not be willing to pay the price for polling the hub more frequently, for example. So this ends up being very much a policy decision which should be left for user space. But if you can come up with a generic interface for this, it could be useful in other setups as well (non-DT, hot-pluggable, etc). Johan