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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 861ABC433F5 for ; Mon, 29 Nov 2021 23:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:Cc:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=amnGMX1hHDTRP+XZOQOV6uJ+Hfo/rfLJ3H0Hd/haKIc=; b=ahcdQfi5RK35+L wkBgq97EucUCzCzCB1uWQ03p6OQOd/6qlyugsmh3sEPM71J70Xt8WWDWuvV5aGW+9xMiamUK/Bd47 13NWp930u5w6nsWVqk2WGVRk8Yk7kNT035IOhmhJ2YAykL0UOfkHLyDc+A6nqR6AQcKM+E1jlxQ49 kVf8qj1iygry6k03XH2LlpNV1oIM3D9bp6Iy4m9CYTKx42n6PWFQh+tvUHZrmw6rLc6kMJYO1ZPQ2 /+E0KhWeEy1u4M2cWs5pZkdAQoaBn4cc3fJYmzqkKxZCW+qmhAtiNrGiYojwlWCRMhpcr+UnQJ5o3 2btKc/1ci7cGfJzr1Z+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrqRV-0038yH-4p; Mon, 29 Nov 2021 23:52:17 +0000 Received: from gate.crashing.org ([63.228.1.57]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrqRM-0038xO-6N for linux-arm-kernel@lists.infradead.org; Mon, 29 Nov 2021 23:52:14 +0000 Received: from ip6-localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 1ATNmnMv025112; Mon, 29 Nov 2021 17:48:49 -0600 Message-ID: <12cf11dc4326922ceb67ede7b63a53fe1840b6fd.camel@kernel.crashing.org> Subject: Re: [PATCH 3/3] usb: aspeed-vhub: fix ep0 OUT ack received wrong length issue From: Benjamin Herrenschmidt To: Neal Liu , Felipe Balbi , Greg Kroah-Hartman , Joel Stanley , Andrew Jeffery , Cai Huoqing , Tao Ren , Julia Lawall , kernel test robot , Sasha Levin , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org Cc: BMC-SW@aspeedtech.com Date: Tue, 30 Nov 2021 10:48:48 +1100 In-Reply-To: <20211126110954.2677627-4-neal_liu@aspeedtech.com> References: <20211126110954.2677627-1-neal_liu@aspeedtech.com> <20211126110954.2677627-4-neal_liu@aspeedtech.com> User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_155213_792089_018337B2 X-CRM114-Status: GOOD ( 13.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 2021-11-26 at 19:09 +0800, Neal Liu wrote: > > diff --git a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c > b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c > index 74ea36c19b1e..bea9cbb191a2 100644 > --- a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c > +++ b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c > @@ -251,6 +251,13 @@ static void ast_vhub_ep0_do_receive(struct > ast_vhub_ep *ep, struct ast_vhub_req > len = remain; > rc = -EOVERFLOW; > } > + > + /* HW return wrong data len */ > + if (len < ep->ep.maxpacket && len != remain) { > + EPDBG(ep, "using expected data len instead\n"); > + len = remain; > + } > + Wow, that is a nasty hw bug ! Patch looks good, I had to swap some of that logic back into my brain but it looks like it won't break any normal case :-) Acked-by: Benjamin Herrenschmidt Cheers, Ben. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel