From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2A4DC433F5 for ; Tue, 30 Nov 2021 23:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ISwveTh3xcx5toEqQ083FTwcPGYD0ARXqFx70OZzRrY=; b=lpyeg0CRmuI6/s ZFPsqELGSkFozg5bslKpqX6PZlrxKIw8lN40D8BsOH8JWxRomo70Q3IasdPp8B4tGuRP531G4hdPF 9z/TpA15xx/c8NyvaponuedEgq/pILbNbF/zjUkJIIIJXgYzTF4TStT3338cb8qW0BSy8zU30nrwd PjpMXIbDyoeqe1v/61Pd6bKJBawwG+ISEFxiHrz6O93WKcxpxqXFJhtGBRhnR+tfL4XGl9bS4vSX1 8Utm/oNB617wU7r+SSieb5JpikYU9L6bMsrQNH+oMBFWg0/zyeosFJ42FGEY0zFbk1VDfjtXBQayD IP+6VjFG36Emtdn/x/cA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msCkX-007BHB-K0; Tue, 30 Nov 2021 23:41:25 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msCkR-007BGr-Hy for linux-arm-kernel@lists.infradead.org; Tue, 30 Nov 2021 23:41:21 +0000 Received: from ip6-localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 1AUNbo5u025795; Tue, 30 Nov 2021 17:37:51 -0600 Message-ID: <5d234a400a89f64ad183020b93b68f478f1addc7.camel@kernel.crashing.org> Subject: Re: [PATCH 2/3] usb: aspeed-vhub: support remote wakeup feature From: Benjamin Herrenschmidt To: Neal Liu , Felipe Balbi , Greg Kroah-Hartman , Joel Stanley , Andrew Jeffery , Cai Huoqing , Tao Ren , Julia Lawall , kernel test robot , Sasha Levin , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-aspeed@lists.ozlabs.org" Date: Wed, 01 Dec 2021 10:37:50 +1100 In-Reply-To: References: <20211126110954.2677627-1-neal_liu@aspeedtech.com> <20211126110954.2677627-3-neal_liu@aspeedtech.com> <279c42970790787e928ed017149e300835085235.camel@kernel.crashing.org> User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211130_154119_776200_349EA5EF X-CRM114-Status: GOOD ( 17.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 2021-11-30 at 09:47 +0000, Neal Liu wrote: > > Should this be controlled by d->wakeup_en ? IE, we have a feature for the > > host to enable/disable remote wakeup, should we honor it ? > > For KVM usage, remote keyboard packet would be sent if user wants to do remote wakeup. > In this case, d->wakeup_en is not used. > Set VHUB_CTRL_AUTO_REMOTE_WAKEUP to enable HW automatically signaling wakeup if > any packet would be transferred. Sorry, I don't fully understand your explanation here. Normally, a USB device will do remote wakeup if it's instructed to do so via the appropriate feature being set, which is what wakeup_en reflects. I hadn't originally plumbed it in, I forgot why, I think something was either not properly documented or not working when I wrote that driver. You seem to want to override the behaviour and always send a remote wakeup packet no matter what. I am not sure this is desirable for all use cases, and might be something we want to make configurable, no ? I'm trying to understand your sentence, you seem to imply that the only use case here is "KVM" (as in remote USB on a server system) which I can probably agree with... mostly. And you say in that case, we should always do remote wakeup whenever an emulated USB device has any activity (keyboard or otherwise), regardless of whether the server has enabled the feature or not. Am I correct ? What's the rationale here ? Cheers, Ben. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel