Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8471201rwb; Tue, 13 Dec 2022 06:50:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4FVFjKx+kGVMCav9CP57NiB+2xmr2UeZC/8q3QGCeaAfgm0f45CMbbC7mjswuQA2/nfXAg X-Received: by 2002:a17:907:a504:b0:7c1:92b2:fa9e with SMTP id vr4-20020a170907a50400b007c192b2fa9emr1709275ejc.59.1670943041450; Tue, 13 Dec 2022 06:50:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670943041; cv=none; d=google.com; s=arc-20160816; b=DOntSXs6dv54STpRLmoRnN/Zf6X1K78CQHxhxwYWRBMzxEUWm2SZuqXNqJoKQl2sGH sUGUbKRuICAdvZ2a+g38jm8Qybn7ubA1902WAXTiTh4HNSA9fhyUg0zvZJzY4b/S2lLR 7kRwraFbKPzZ2cAwm3/kUuRYiC+oGWYoyRq/tWplek4/GcsylnZZcQ1a9LO5f8kJMFk4 QK01tqw7jqMsYd8uSSXNvy7ioQ3C6JNc/99lMAkVYOD+uehtR8PpGWYOfEg5WyGNYBv7 hiTpt3kqz5lJs9px0Y51BTkCF0vZTl9UhsCeX8EAtQiTCsqKdg60OeRyqf8flq6GpnTq 9XBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=Rri1C/o36RGpuqsNznRHQOSMU8c1Xc1sU+YfPaf6jlU=; b=udTPNO4UO9FkaH0AkH0jeHmv20eazVJlsJLkhisDCNHJWwfWhmqipADIuRvXhWc1V9 EDGzmJQ/z67LUhkYAe8vCsNvr2K6I+FLw5vVT8zrqtc0saWcdaLETGxP2cufO+3bC8tu 4T9lIvY/w3Rq4uYoA2G2ayrodx6tVzKJ28uuVWdVSzIpbBwvF3ZFHzXK5jcYnzxjXoqm 8fLeedaPYJVeYTb2hA+5Qg2I5/iDY7D6uqH1sOGk94rdsMPvythlrhTu9aVplIa9/dL1 kcl8XSLTtvOZ2ImcdKWeO66cF00gPZvlmhjjtPkvqNuF7AnK//UFq/rV9abvcTDhSBfC mY5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qOMVn54C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw22-20020a1709066a1600b007c07d0dbe85si8722700ejc.463.2022.12.13.06.50.23; Tue, 13 Dec 2022 06:50:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=qOMVn54C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235929AbiLMOL2 (ORCPT + 72 others); Tue, 13 Dec 2022 09:11:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235887AbiLMOKy (ORCPT ); Tue, 13 Dec 2022 09:10:54 -0500 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14DE820BF0 for ; Tue, 13 Dec 2022 06:10:11 -0800 (PST) Received: by mail-pj1-x104a.google.com with SMTP id v16-20020a17090a899000b00219b1f0ddebso2464119pjn.5 for ; Tue, 13 Dec 2022 06:10:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=Rri1C/o36RGpuqsNznRHQOSMU8c1Xc1sU+YfPaf6jlU=; b=qOMVn54CBQX+zS3dkqSqXuujsqCKjQbxFTj8NLINxd0QSFY7ao73U2rwISYqxHmGRn UfL1oqA6G7cWIT6jkcl8TTmPApDK3w53hI+Hg1T63gTUIL3PUP3vBUW1LX6d2n/ez6zi 27eMAeSmZqFSFoB1FP7B9cqhvtp/0emHq/QwkRP4bUNX6/NVV+MYnJR4U0kss5xmoPQH qQJ08rqwXR5mpGR+gC2w2/C+oC9VFNkvsRVq6JftPGyxBYsK8jpz5WWY5Y8F2Kqdm61T +t2qTj8nlP0hdzLrVMfJGTKqp0bV/8wAQ2u6aeiJpCJF2WyFdKJ8psxekovsKXjQeeSb zZEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Rri1C/o36RGpuqsNznRHQOSMU8c1Xc1sU+YfPaf6jlU=; b=gAxPjXwP0owuSLYLSYfTWOrOUNdWNK5X4DJBRfrLgbb5ADDZDu0qifxe+rmioLS4Gd ZHGzMP7eof+P/KQFZdDSPy3jsrtgMw+H0R6HRfTIKjvzriMZBwpVLVWBpkCDweaIF3C4 5rQtfJPnWWJFfiIMTGg4RkpPsoqPZCILbHP/SVlcRxMqQO5FEMexxm5MjJjyeeTET5H4 EZ0YgI+XU6mDLZIbgWAZqhR4UmKWTxhcysN5wotrJAte5VjNhc16EVyIs+nZN2F++QLq WMGt65fsIJwEqB72VaKDwW4k45fJGF4NGGQY6H5G5J5CCk99s12FfE8EtkYL1MRfLhDE LGkA== X-Gm-Message-State: ANoB5pn4p0Pwpk824jFcs/kBe674pKuFz9zEeFcGX7haCWmsG2suoizB i3Bbj2w0Y3qKQsGeJjdE149dQupn1w8K5tPXujM= X-Received: from albertccwang.c.googlers.com ([fda3:e722:ac3:cc00:3:22c1:c0a8:83d]) (user=albertccwang job=sendgmr) by 2002:a17:902:6804:b0:189:907c:8380 with SMTP id h4-20020a170902680400b00189907c8380mr49845920plk.104.1670940610549; Tue, 13 Dec 2022 06:10:10 -0800 (PST) Date: Tue, 13 Dec 2022 14:10:02 +0000 Mime-Version: 1.0 X-Mailer: git-send-email 2.39.0.rc1.256.g54fd8350bd-goog Message-ID: <20221213141005.3068792-1-albertccwang@google.com> Subject: [PATCH v3 0/3] add xhci hooks for USB offload From: Albert Wang To: mathias.nyman@intel.com, gregkh@linuxfoundation.org Cc: badhri@google.com, howardyen@google.com, pumahsu@google.com, raychi@google.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Albert Wang Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HK_RANDOM_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This serial patches enable the xhci driver to support USB offload, add hooks for vendor to have customized behavior for the initialization, memory allocation. Details are in each patch commit message. Meanwhile, the offload function implementations is uploaded as well. Albert Wang (1): usb: host: add the xhci offload hooks implementations Howard Yen (2): usb: host: add xhci hooks for USB offload usb: xhci-plat: add xhci_plat_priv_overwrite drivers/usb/host/aoc-usb.c | 198 ++++++++++++++ drivers/usb/host/aoc-usb.h | 108 ++++++++ drivers/usb/host/xhci-mem.c | 97 ++++++- drivers/usb/host/xhci-offload-impl.c | 396 +++++++++++++++++++++++++++ drivers/usb/host/xhci-plat.c | 43 +++ drivers/usb/host/xhci-plat.h | 8 + drivers/usb/host/xhci.c | 21 ++ drivers/usb/host/xhci.h | 31 +++ 8 files changed, 889 insertions(+), 13 deletions(-) create mode 100644 drivers/usb/host/aoc-usb.c create mode 100644 drivers/usb/host/aoc-usb.h create mode 100644 drivers/usb/host/xhci-offload-impl.c --- Changes in v3: - Add the offload implementation files -- 2.39.0.rc1.256.g54fd8350bd-goog