From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Wallis Subject: Re: [PATCH 1/2] usb: xhci: add relaxed timing quirk bit Date: Wed, 22 Nov 2017 18:32:43 -0500 Message-ID: <3c44d4d0-e10c-bacc-8e7f-df04bed5dc21@codeaurora.org> References: <1511284690-3878-1-git-send-email-awallis@codeaurora.org> <1511284690-3878-2-git-send-email-awallis@codeaurora.org> <20171121191103.5oczqvrlo4gtwjqc@rob-hp-laptop> <32f8dc7e-9fde-5e45-1570-a9ec372579fa@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: Content-Language: en-US Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mathias Nyman , Rob Herring Cc: "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" , Greg Kroah-Hartman , Mathias Nyman , Linux USB List , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Mark Rutland , Timur Tabi , Chunfeng Yun List-Id: devicetree@vger.kernel.org On 11/22/2017 10:24 AM, Mathias Nyman wrote: [..] > > We know have at least two hosts/platforms that need custom interrupt moderation > values > > How about adding a u32 device property for xhci with the interrupt moderation > interval in > nanoseconds?  And also add a u32 imod_interval variable to struct xhci_hcd? >   > imod_interval can be set to the current default 40000ns (160*250ns) and > overwritten if > device_property_read_u32() returns something else. > Isn't the 160 value quite aggressive anyway? Section 5.5.2.2 of the xHCI spec says that maximum observable interrupt rate should never exceed 8000 interrupts/second. I believe the IMOD value in the most aggressive case would then be 500 by this statement [ 1 / (250e-9 * 500) = 8000 irqs/second ] Perhaps I am misreading the spec or just doing the math wrong? With the default value of 160, we are interrupting 25,000 irq/second...which is over 3 times the maximum stated value (again, assuming I did the math right) Anyway, my preference would be to set the IMOD default val to 4000 (~1ms) per the recommended value in Table 49 of the spec and allow platforms to adjust as necessary from that point. Thoughts on this? > XHCI_MTK_HOST could then use whatever preferred device propery interval value, > and we can get rid of using XHCI_MTK_HOST quirk flag when setting up the IMODI >   > -Mathias > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at  http://vger.kernel.org/majordomo-info.html Adam -- Adam Wallis Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html