From patchwork Thu Nov 10 08:00:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Albert Wang X-Patchwork-Id: 1430 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp9452wru; Thu, 10 Nov 2022 00:04:59 -0800 (PST) X-Google-Smtp-Source: AMsMyM7Cy+UKdr3ZkqPJkYSurHbPjtZsnS8B8QD5md5tR390FInUpJbSH48wJccU+tGXig4yv8AQ X-Received: by 2002:a17:906:2743:b0:78e:1046:c52a with SMTP id a3-20020a170906274300b0078e1046c52amr2436944ejd.713.1668067499304; Thu, 10 Nov 2022 00:04:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668067499; cv=none; d=google.com; s=arc-20160816; b=wi+1tEIjIyQUuDQjjiFh4wZCmPw6dm+q6hwH+B8MRhxatlaWH9mPTxKFBwAbTI1mWQ ZVifv+X6Iv+GvM7xi7syhOtqAy3dqX6K0B73pS4JHJwNW6NuSisKjP5F8MN6KfP7RFMe CJeEQDpkxY6KDfsNfCuvAEBUSPoURjL4SKW5zsBp6XSZVemTFc/NxW9wH6szzcqCqO6A 6yKFfpfWF1VKQ89jbEXsWuB8cAh2lV2eLPJqF4r+8DMenJR/5pMIvB0QaZZw2qEhepWo QY36YaxgTyOUkv/KHpnNoiAfWmCjGcpRQ4Nf+hqpUOOq2Cv1jLzUEKoIFx0k1LEVcSbk 6i0A== 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:mime-version:message-id:date :dkim-signature; bh=Ra6xv4EwBUlp+/+o0IyX2+LKj8mBup5fBpvBRS5zZok=; b=q/AOfxSjiapgeV4/XImJFvAzfKvqrzLhYb3ChawT9auYY2K9eVwiqViGnz3O/6MhYG 1GM1XySnk3Iixh7XeM3Fu77KIYw7OZE54mAsdyYw+11vD2hZUiQ0LlYsofukjwczsggq gonJaOHV5ItF6CDH6YiUahpRsiP87lG553xLMgpPdicLBfD3osU1wK7BHyXLJO1A99pL 4ErKj611mu2yL0SMGjo12RO8CHbCPEjsW1x9SWqgWNgdrWlC++NyY81DGA3aHm5Gw3cD 3uFGnPK2p5ABHZ/qUqS/oNmEzeLL5e7lQ8jPfCcvy1fgpFZJVxMR/CA7IXAeaACL+Uxz tRiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VUWwElpX; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di19-20020a170906731300b0078de8d119d5si21407732ejc.899.2022.11.10.00.04.35; Thu, 10 Nov 2022 00:04:59 -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=VUWwElpX; 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 S231298AbiKJIAQ (ORCPT + 99 others); Thu, 10 Nov 2022 03:00:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232199AbiKJIAO (ORCPT ); Thu, 10 Nov 2022 03:00:14 -0500 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D946E20981 for ; Thu, 10 Nov 2022 00:00:13 -0800 (PST) Received: by mail-pl1-x649.google.com with SMTP id x18-20020a170902ec9200b001869f20da7eso899331plg.10 for ; Thu, 10 Nov 2022 00:00:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=Ra6xv4EwBUlp+/+o0IyX2+LKj8mBup5fBpvBRS5zZok=; b=VUWwElpXRlILV2Efpj7hFU2vGpaSavpX+8Q1d2yFC82xC8HUVErZC8XPVHHzPox94f +Kegl9at6hxuVKYffF67ybMX1aB4kUOpNK34uWvUXza5Vyr/hZgzhPtq76kQRjXpS35A QLGbXBqQIcV0KBe/dT7tCYQLLrPmu85cXnKu9HUwO0atedAggCJDKV/Weo85lLiQImFq jGKmFmWcUCZAqcz2TuzeRg4pfsoFkL/OqxCTqbjxQ5nA+Nxqvk5Q29om1o5y8gEtNbcB 2W24pgeVYpqDO8oDW5V5OcRc8a6gDB2c9/y77D80qm1ROnFwHg6pzdXARjhDZ8qEDTxx SW2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Ra6xv4EwBUlp+/+o0IyX2+LKj8mBup5fBpvBRS5zZok=; b=n6UGWYnN9NWkFuMFjC7d8yGfVjpWzZvP1/q7jMlcULQ32fHnkMYGaU/X+72sSJ88XQ KZ1zEzkmosVdaLuEBYD4/0ypRYI/+D6DtlLV7CpJvYpXaMAimayFHIVFzz/S6H0gDzIx kgFpezdeNkcLTAJwgQsHLIeXcOZgexHXgzUAtbTC3hQdX2IOX23E0lUc8exgKTN8PLSR sZmUrsrJrl3qDeSMDosoTGt1TDVFbs51ocaP0858x2isQr0XpIN2Y8EITgfy/QECeqEv oHxPAHqtYpFSo4SBoIoLeJiugQro9P3pYBwMZId9NWqOpgg2nX0PqxjYudS5IBrTNE+0 yHmw== X-Gm-Message-State: ACrzQf3My8CYR9VDcjD245HZ3oqt+2U1+dTd6XWnqAwSsg0i0QztPGH2 UsWIXmm/08j+mNyOyJyNyuc/85m6w5L0mDYIMzg= X-Received: from albertccwang.ntc.corp.google.com ([2401:fa00:fc:202:2c6f:5c28:5579:9e27]) (user=albertccwang job=sendgmr) by 2002:a17:90b:374a:b0:212:8f7:acf with SMTP id ne10-20020a17090b374a00b0021208f70acfmr1248125pjb.13.1668067213306; Thu, 10 Nov 2022 00:00:13 -0800 (PST) Date: Thu, 10 Nov 2022 16:00:03 +0800 Message-Id: <20221110080006.3563429-1-albertccwang@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog Subject: [PATCH v2 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, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Albert Wang 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749095546034297491?= X-GMAIL-MSGID: =?utf-8?q?1749095546034297491?= 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/xhci-mem.c | 97 +++++- drivers/usb/host/xhci-offload-impl.c | 492 +++++++++++++++++++++++++++ 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 ++ 6 files changed, 679 insertions(+), 13 deletions(-) create mode 100644 drivers/usb/host/xhci-offload-impl.c --- Changes in v2: - Optimize the code change - Add the offload implementation file