From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AACA3FA373D for ; Tue, 1 Nov 2022 09:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230394AbiKAJ53 (ORCPT ); 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> Precedence: bulk List-ID: X-Mailing-List: linux-usb@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