Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp2059979rwi; Tue, 1 Nov 2022 03:24:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6s48S2BziIgd+chPhOgHT61RDiZaME5Q25QOVSph7ZKRDBarHMilqJB/IB5NgKTOu7dflc X-Received: by 2002:a17:90b:3013:b0:213:ab5f:d388 with SMTP id hg19-20020a17090b301300b00213ab5fd388mr17773868pjb.66.1667298294279; Tue, 01 Nov 2022 03:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667298294; cv=none; d=google.com; s=arc-20160816; b=JVxNWcMs9W/+9R7pI+WR8h9ot//isnbRnDpJm3BznFhzJmvjdNaQ/9TlKKl4WuFBWa 3ebKRtXxoJTnPQxzi4PAkT0ip7vWtZ42MjF9aGYj4JbXJoTkRnie7qD2UXO66uHtZ7uv Bnqf+3wf14oHAf3lA2Ct1uRuzopGM9ywR5GnQbgZN16ZaksuyMYKmZoltyhJZ+Vct93P bjZ93mjRNtkS88n2ozABWTF7vM1/Ui91DgQbHGpXQuHUUJ+A7zTgJ7sh17QKC89S7vbB 0+2bhrGImczrSuECN5R795IDiZtHrmqV+eFLkuGzmRe/XyfQAy9HJ+5gwoZb/pNNRYFK x/iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=M5eSbkR+uyMDkP/uznLXH7I3vsxbYipQ0WfbffN/+v4=; b=ZsjTktTr1ZygfgSJCoGg1wVec66/gewB5iREI3Xr8oGVXEy7W2uKr8cYleCcDGMy8r f41jD5LykMBEQtrug1ZogfsICUmJCD+OoxUBDmvDNIuCw1Tn5jILC4828hCjQRFfbwz7 tbTSlZdxQzmx2AnsEzLKhANEvRvKAvMszjzZmkZ9TUpY6WTVrn1naSKaN+bstTLqajXN X19fqERX9GVX74iey6JuZByd3UUZ83Uf4H6uWjBE7AajL0FKJ3HFlwdRu4I53kc4RVuM epN+ti2csHk8qW5ycHD22uHwiX+oMvNOYsceoYDHJqLgx2NArXpqhnbEqmEs9hGq971C XXjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VYs5eN00; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020a170902b28900b00176b8c373ddsi11198004plr.257.2022.11.01.03.24.40; Tue, 01 Nov 2022 03:24:54 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=VYs5eN00; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230418AbiKAJ53 (ORCPT + 98 others); Tue, 1 Nov 2022 05:57:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230317AbiKAJ5Y (ORCPT ); Tue, 1 Nov 2022 05:57:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 816AC193C7; Tue, 1 Nov 2022 02:57:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1BB716153B; Tue, 1 Nov 2022 09:57:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38897C433D6; Tue, 1 Nov 2022 09:57:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1667296642; bh=WasZXVU7s1HS+z+NeBIed/22dFD0Q7UuAxT94f1Stwc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VYs5eN00k/EhhFOxGnarzvgNFkGAUXMao19T1Hc+uZI6AEq/xhkJxZsvsmlvLf0hD 5bU4b4nVDVqw8oYRBXtpD2HGqUdr4RtsApkBv2UMJr0d4w8Dyc+MPkvo0LUzHALujW ofY6jU/jmb5WjMH21XiVJ+Tu7BOIdaV67m+21XWk= Date: Tue, 1 Nov 2022 10:43:21 +0100 From: Greg KH To: Jing Leng Cc: pawell@cadence.com, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v3] usb: cdnsp: Fix wrong transmission direction of EP0 Message-ID: References: <20221101044433.5627-1-3090101217@zju.edu.cn> <20221101061730.8991-1-jleng@ambarella.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221101061730.8991-1-jleng@ambarella.com> X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Tue, Nov 01, 2022 at 02:17:30PM +0800, Jing Leng wrote: > EP0 transfer is bi-directional, but in the cdnsp gadget, the > transmission direction of EP0 is not changed after it is > initialized to IN, so the OUT data from EP0 received by the host > is invalid. > > The value of ep0_expect_in will change according to the value of > bRequestType in the SETUP transaction of control transfer, so we > can use it as the transmission direction of EP0. > > Signed-off-by: Jing Leng > --- > ChangeLog v2->v3: > - Repair my email address. Yes, it works, and it's validated! Nice job, thanks. I'll let the cdns3 maintainer review it first, but just wanted to say thanks for fixing this up, it makes my life a lot easier when accepting patches. greg k-h