Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp706339pxb; Wed, 27 Jan 2021 20:05:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTmUYKl0/qwiugD/8tnHfC+m6vMdavK/cqOcJ3T3gy50PmSvfCA6gtnasbonoTpyF9wmVv X-Received: by 2002:a17:907:7785:: with SMTP id ky5mr9595047ejc.176.1611806729649; Wed, 27 Jan 2021 20:05:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611806729; cv=none; d=google.com; s=arc-20160816; b=qQsHUs2f2Oa64FfJ3RJp1fqZ8YBsVDEnIMhr85Fp7uF0nUZMNHz89/mLk6Q5RLMurw UfKSimgkR8aEXX6kUv3GQnYGlzdtS1ekTvJ+5nzb0NzM072M/m+mAOTZoESnGyFbO9tL a00aC860Tfi02kd3IMByoDJXPJOfiebeVE2bH2OHKRFdNZO0Evx3EyiRkSxZtHhxZMSb nH+ZZR2FoamZgSoLnEzkoLV09LqnKzUhdBW9DokDiTpJY8+C7Ml1At/lq7sUwA34RWYH jF/MnQI26CD7NwXe+lhdGb0Xrw8TOmiwDkk5az5NiTmeNdQ81q6RDiP2r5jVf80xPKkr hilQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jr6oZPut6R5xADAqmuwrtlULXRHD5ex1ji/nfSHLdjI=; b=p0paNLrqQ7iF4YJhLTEY8dHZt+v7wOOczAZIQBdhME6AsCYlHRF6nNjrqOJ7FJkhcc CwLH5ebxnDRqJBhqXVC94F2tiVMZrfvAeox6BFkuRCc9rbqtA3xuXBiG7VdKQx84qsby VIOmsDhCciAiHUdgDdNJWpAKKBHxHPnyq8AXjqaw9/gYTjLp2vYNKMLEAEHG9IpKZILU 4XOD3pX1Tu71XLm4i1+tYzoTZZQvFj/ChpgxfkDrhx4BkbnRIQeaZ7pY32kU5NAaOPPr 5tPgZfpdKJnKfKbo9TVBoAjm45mTCAxhuZFcJhEfAJq047RBeYrYWAtMaRYkyRbw04tJ mCBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VwegR629; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id os13si1761344ejb.680.2021.01.27.20.04.31; Wed, 27 Jan 2021 20:05:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=VwegR629; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229739AbhA1D6Z (ORCPT + 99 others); Wed, 27 Jan 2021 22:58:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbhA1DjC (ORCPT ); Wed, 27 Jan 2021 22:39:02 -0500 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CE91C06174A for ; Wed, 27 Jan 2021 19:38:21 -0800 (PST) Received: by mail-io1-xd2c.google.com with SMTP id u17so4209821iow.1 for ; Wed, 27 Jan 2021 19:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jr6oZPut6R5xADAqmuwrtlULXRHD5ex1ji/nfSHLdjI=; b=VwegR629zsG5eWgMolbdrVoWKF5kPCL2ZDQZ81vzE4H7W4ea+7lL1d1NEA5CTFJy2e lhByZQy/GPod8TIk7DU2hSBCD74OchArhHoaxO4pIXI04rWcfGDHuQy4aMgXC3IRHtiy S/AbetCzzXy/XMJg5uHlir5dxTgjxFoSsi8C6eMDBFfEPPkjQ5VTR3eU5END04lAgcXy SUNWO/yDDhOcByiHH2T3FTjkXqZRypiab+XbQ5yORXTO7kBeDQqlYkjd4uVH0aNbl40z a3CoCweDW/7S3EgVjIgQLDySV6uufuzaATnOdTgXQvoRmKvXIJGpunFKOgaamYwPb/7U Llmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jr6oZPut6R5xADAqmuwrtlULXRHD5ex1ji/nfSHLdjI=; b=ohmGWlPWAM9U+CApo9Zj1vPXzWSPXeoKeInnPs+KDtMFgtHX0hG3L1skzjLnBoqo4g tj0Hp7pgwnLRXDhzp01laTzwvmwLCX3wAivDePQQ7pttpCwjwQlWTaOfMFy8lJMnhgXF Z17iQPAHzLcRONP/I//RHKvYm/BnRp0iyymuEy6bBNTHI8skAbPH6iPn7GRwmNhAf6aD eABBN4cBdQpIr3LorVo4LAW1mln9xhNuga/nNzrt5GMt5lQ9l8LQn39dLZe6KlOKJjno k1y0JOka7dU6VJgfYs+Sf/bQjgKJw9x7+67RY2ivVsONMqi9dw3AcEgzavu/ugbpq514 eQqw== X-Gm-Message-State: AOAM532jajt75Bj2H7llksKjT2YcFs8PdSp3LfYNiuV/3HCvcV4U4Y/K DHCGMMYPWvOXFMTbKDxA2MWeKRYZRPUOQr7IOwXO8g== X-Received: by 2002:a02:6a50:: with SMTP id m16mr11376167jaf.129.1611805100433; Wed, 27 Jan 2021 19:38:20 -0800 (PST) MIME-Version: 1.0 References: <20210119101044.1637023-1-howardyen@google.com> In-Reply-To: From: Howard Yen Date: Thu, 28 Jan 2021 11:38:09 +0800 Message-ID: Subject: Re: [PATCH 0/4] add xhci hooks for USB offload To: Greg KH Cc: Mathias Nyman , Mathias Nyman , robh+dt@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 26, 2021 at 10:19 PM Greg KH wrote: > > On Fri, Jan 22, 2021 at 05:32:58PM +0200, Mathias Nyman wrote: > > On 20.1.2021 12.04, Howard Yen wrote: > > > On Tue, Jan 19, 2021 at 8:47 PM Mathias Nyman wrote: > > >> > > >> On 19.1.2021 12.10, Howard Yen wrote: > > >>> To let the xhci driver support USB offload, add hooks for vendor to have > > >>> customized behavior for the initialization, memory allocation, irq work, and > > >>> device context synchronization. Detail is in each patch commit message. > > >> > > >> Is this related to the usb audio sideband capability that was added to the xHCI specification? > > >> If yes, then we should probably implement the generic parts first, and then add > > >> the vendor specific hooks. > > >> > > >> -Mathias > > >> > > >> > > > > > > This is for offloading, no matter what type of offloading. > > > I made the hooks generically and can be used for usb audio on the xhci > > > which is not including the usb audio sideband capability. > > > > > > > Ok, before adding hooks like this I think we need to see how they are used. > > Do you have the rest of the patches that go on top of this series? > > > > Maybe it could make sense to use overrides for the functions in struct hc_driver > > instead in some cases? There is support for that already. > > What overrides could be done for these changes? At first glance that > would seem to require a lot of duplicated code in whatever override > happens to be needed. > > thanks, > > greg k-h This patch series is all the changes for the offload hooks currently. I thought about this, but if I tried to override the functions in struct hc_driver, that'll need to copy many code to the override function, and it won't follow the latest change in the core xhci driver. - Howard