Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2282961rwb; Fri, 11 Nov 2022 07:23:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf5znQ918CyaXo1CrqOinOfYQfRMBA6POWkuxB+giB3uOeTSAy0gXp55ksm5EfR1lDVceXZ/ X-Received: by 2002:a05:6402:7da:b0:466:4168:6ea7 with SMTP id u26-20020a05640207da00b0046641686ea7mr1802977edy.273.1668180236008; Fri, 11 Nov 2022 07:23:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668180236; cv=pass; d=google.com; s=arc-20160816; b=IeZXLhvJ7E5jiu1LfqFO9bUX8vy64bRtbyr/WaMTzta5264w66+KNIh20J+f5OzRCN OhMQC/trPi9UdHGKwlrsumt7jR5sbQvnykeZJ1qayyN1ron5outu5kBONZnGw+PxOHrb sqbc+wITNmDr1pBhcMRec83GNhXuWzx5pOBJLLyAXy8Ymt7qhc7Lb/CxEcDXAZAcfjn8 ye9V8Lwz/bJYfkZTCJnCiT8Q6RfrFq8B5lYOMocLMSMR74AtsAeupYt6f3gGxk/EOpPw 3fBINmMHgdOs9QS50j6i3wwN8viuNumQ4Een/+U6C03/aOGZQbWA/wyVvyyA7WJXxNpG 3Aaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=DB65WcI7E1Bc55DkWnvXO+hjlWgOfMCVGeMzX8e1bUU=; b=Cm7Nuw78r3E4fRWxxXXHfnlzHNaomYfSXYSgpRb2hkAjpqfOqY6xZO34TPUt/oIpxt WKjFbvsjMLpQngI+jUMo04dkTe/BpHpBwCFB20jLUFx6bgCOwRmJOUBawaHyBCnYBBvl wYYn49Xu2r8oBFh1aJRB0G2/48EW1ItQPvFu88YE4C3dsAsSgWPUIL0Fh/A7CMk6vv0b vW8FyvTIiLafVy1lIqrERKKrEPhQuaaV+5A7EDr8nXsq9HHFnrvA4kkhaTj83qdojpcB loIY63JtEHpbKames05r4WZpLnwDj7GCdR/WL+OEIK2nzX3rX5L4MpYebqn4HzcXWUNs weNQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=eaZ+EKub; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); 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=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a1709062dd300b007806c141214si1912008eji.153.2022.11.11.07.23.33; Fri, 11 Nov 2022 07:23:55 -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=@Nvidia.com header.s=selector2 header.b=eaZ+EKub; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234744AbiKKOkN (ORCPT + 91 others); Fri, 11 Nov 2022 09:40:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234656AbiKKOji (ORCPT ); Fri, 11 Nov 2022 09:39:38 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DAA3654C5; Fri, 11 Nov 2022 06:39:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MoKHMbp6giilkJYauEIvgP+YVSpk03B455n7QhHL94t8KoPM68HNXiEXmFN/HCFIc20F3WXq0OcwEGXudonZt0gzBSMr2SSOU0UaQlaC8NMQOyz4i0Kg3m+inJKO5WtaqN/7O6NE+Ls1f/RFfz1EmYhPm0k4G5/uH+iQW0hsb7Q3jZVwCxTzlFv9vr+qmxJkjEfa2mdOtjLVwQJ5x/CFZsUa6V1hE1QG659cy+Jnam1vQwQNhdt9qGPtBoqun7f5eWLduN+QWB7h0CoaFRvjmXV8Z6eGuTsMYZ5mxz7ZS41tZMM/2IeZ2EFkTxgHZjih3M8/wTCm66Nj0dR8KEF/5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DB65WcI7E1Bc55DkWnvXO+hjlWgOfMCVGeMzX8e1bUU=; b=djD1clCvkOssbUF+a984+VxP1Z+q8mv8TRKygzuvg2GpVjw/nnL94Xe0kJk2I00TwaGyW6ndUfXDJ3SR05xLaFaQ5yduuEuA+rmlvrKlCzglMSVT1clFioW/ii+FAl9CbryE0fevPsBwragVlkG36o3U8CEcwH2k1v2aejV9o59sEOv3TLucP4G+8UQLyv3eR/bZ+KGMLyi5Flw5McJHHTLhgveOaXrl82gf9gZ5vathX0RpzFwUHr6jpDtGMMU5djs0AhQ10KHQUqeI1YKOvqQ5GkMjDgNsYYn6tWS1d61nd3nUP5QDhCbje6cVQ+TdHirHHDz3CvgzXvB2GarqcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DB65WcI7E1Bc55DkWnvXO+hjlWgOfMCVGeMzX8e1bUU=; b=eaZ+EKubb1tviS9bdVob/inhyweCuAP2Ct9vh0gzT7sT4AFBSdKQrzWOSJ4k5GE+RM8oIGbKXN25R8b0jbCeW/FsTvy3ZQzj/t4FTlhZ9HVOUNIxrO8w51xyPosJSsxMpI7+2cdm6J+1siiDfpVqUUce0D4s67KaZQILQ294SXwkstijrdK6V1tgidALHqiH9ujkHgsECbL1s6eA5Y795j7ebb/MrloV+UkL0rzepTXvGWkURoYxYDPUmVkpGQNA+fMRulgLwJbenmG0CwsvJT7E0XhCdqENu2Ud4L6kX5kwO60K5+U1pJ9ij1z5JFASnK8OKIOviP+qwJ6sCUtgHQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CO6PR12MB5444.namprd12.prod.outlook.com (2603:10b6:5:35e::8) by MW4PR12MB7118.namprd12.prod.outlook.com (2603:10b6:303:213::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Fri, 11 Nov 2022 14:39:26 +0000 Received: from CO6PR12MB5444.namprd12.prod.outlook.com ([fe80::1912:a3a8:1a8d:a960]) by CO6PR12MB5444.namprd12.prod.outlook.com ([fe80::1912:a3a8:1a8d:a960%4]) with mapi id 15.20.5791.030; Fri, 11 Nov 2022 14:39:26 +0000 Message-ID: <0cc025f5-0e1a-3666-9c39-3d09a37cea2d@nvidia.com> Date: Fri, 11 Nov 2022 14:39:20 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v7 1/3] xhci: Add hub_control to xhci_driver_overrides Content-Language: en-US To: Jim Lin , thierry.reding@gmail.com, gregkh@linuxfoundation.org Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org References: <20221111101813.32482-1-jilin@nvidia.com> <20221111101813.32482-2-jilin@nvidia.com> From: Jon Hunter In-Reply-To: <20221111101813.32482-2-jilin@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0086.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8::26) To CO6PR12MB5444.namprd12.prod.outlook.com (2603:10b6:5:35e::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR12MB5444:EE_|MW4PR12MB7118:EE_ X-MS-Office365-Filtering-Correlation-Id: 5240df62-a48b-4e9f-4aaf-08dac3f287ec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QA7CT07/Tf+9f5VohswYuXWqUNCI6wC2Y4JBDNYNSCrICM8fl8GpDdI+HGu3e/yb4tToMnjFlPVYLgycySp9fAaPQF3Ocq1to7NH8iUVnTMRlTlJSxwDoazGD9yjIYfzJnJwPAqL2LLdo2sb4QVPtvXPnichx4stZj8S6zKmKmQo3dBz+YvaOQHiwHnpHzZomYNlYlGYNWwu0kt5txtzEJH/M6Gx+mcWrAuNnKlh0W1WTiSZxE8Alip2vi4pZ4K5fr8FTYiKlwOqawmyHokExGF1f187WGcN7r3hwCX45GGuPKGmEs6+PmYSMOrG8LKIqQsDo/C1Dqce/S5emSA0PLK/gZqXXPgrD/BA0J1QPNMI/enz5U9MJh9mV0TOlL1xhU25GnJfpPGHI6VFhcdLgGc6fP3Mm4yGDfM/2v7O3RnFTJZjuMQA9ZaVWjkN0btMvDFmuHBe2ydXvmfclVn+s3ijSA1KPFXN/DCAU8ybAnfp1f1JHkgqxInj1CK52EofaS63sxXM+oHByCEdGhr0y4tWoKjwMnQxu/u/CXiPg/bXcg0SHbqOkIms2SlkgzLk1zDkHBFhQxlZgCf7WOLFHCkIzkL5RtDunv2Aw6mq65xWsm4H3BYH3SxRYKkb06oJjgk77x69TEBPr1LO71OVv9W1o+4zwhhQp81YifSzWrSLvsmlrGJvGR3ixU1MI4i01BBBYzFIz0DNXmIStdFOint/tywrQmRdLFn0ehNn9FbVsJ8cP6JJR/7AW+DjpilDvZs0SqDsC838fDlj1m1OmOqjY4Pr3InhnsFsjhiulnw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR12MB5444.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(136003)(376002)(346002)(39860400002)(396003)(366004)(451199015)(31686004)(41300700001)(38100700002)(5660300002)(36756003)(8676002)(478600001)(66476007)(2906002)(8936002)(66946007)(6486002)(316002)(4326008)(86362001)(66556008)(83380400001)(186003)(53546011)(2616005)(31696002)(6506007)(6512007)(6666004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V3AyWkk2T29WUWdQQk1WM0cyR1JDU090WEhpWTlScW1qSTV6Y0JJaFpNVnFz?= =?utf-8?B?ckFTUWpOd3dVOG1HWVBQY3JzOEZhMUhYQVV0Wms0RmMzQ3RSMXMvUExWNXpm?= =?utf-8?B?Sy9RRXFtVXRleDRMY2VtZnI3RS9HRHBpcElsOEpPTWluMHgra3FXOUtUYlp1?= =?utf-8?B?THdvUHBMSzVpL3pqS0JWY1YyRXhqRUtFVlNrakFNWFJ2MHZIT0d2b3k3b0tw?= =?utf-8?B?dWFiclovU1hSSVBudDRjU3hTTkNT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ZTZkbk5OaVNoaHdkMDcwOFVwVjEzK2NKcmFsSElNNnB3SmJYUndzSHR5K1VV?= =?utf-8?B?anc3R2N6b1pmK3huNkpZamFzZ1RSaWVKMUp5eFdUUU1WZG9jaCtiekFpM0ll?= =?utf-8?B?NzZGdDh0Sm9CZjlyYkxwenlTY3RJUTVHbTgvVzczMmQrdmlXYXZwUXlSL3E2?= =?utf-8?B?MWhTeFBmekt1aXdpTHFCbTdDNE9nPT0=?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5240df62-a48b-4e9f-4aaf-08dac3f287ec X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5444.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2022 14:39:25.9070 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GBwVnmR0YiqfIXLpHRpLbAXdkGNOBK2sN7hp+5zUK26+wEbkRgPziu2ILQqPRzIr/T/2Q1va3gglTmxGs1rokQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7118 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_NONE 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 On 11/11/2022 10:18, Jim Lin wrote: > Add a hub_control() callback to the xhci_driver_overrides structure to > allow host drivers to override the default hub_control function. This > is required for Tegra which requires device specific actions for power > management to be executed during USB state transitions. > > Signed-off-by: Jim Lin > > --- > v5: new change > v6: adjust parameter alignment (xhci.h hub_control) > v7: change commit message > > drivers/usb/host/xhci.c | 2 ++ > drivers/usb/host/xhci.h | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c > index 902f410874e8..3c7bf0a0e0b4 100644 > --- a/drivers/usb/host/xhci.c > +++ b/drivers/usb/host/xhci.c > @@ -5461,6 +5461,8 @@ void xhci_init_driver(struct hc_driver *drv, > drv->check_bandwidth = over->check_bandwidth; > if (over->reset_bandwidth) > drv->reset_bandwidth = over->reset_bandwidth; > + if (over->hub_control) > + drv->hub_control = over->hub_control; > } > } > EXPORT_SYMBOL_GPL(xhci_init_driver); > diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h > index 5a75fe563123..f51b674fc10c 100644 > --- a/drivers/usb/host/xhci.h > +++ b/drivers/usb/host/xhci.h > @@ -1943,6 +1943,8 @@ struct xhci_driver_overrides { > struct usb_host_endpoint *ep); > int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); > void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); > + int (*hub_control)(struct usb_hcd *hcd, u16 typeReq, u16 wValue, > + u16 wIndex, char *buf, u16 wLength); > }; > > #define XHCI_CFC_DELAY 10 Reviewed-by: Jon Hunter Tested-by: Jon Hunter Thanks Jon -- nvpublic