From patchwork Mon Jun 18 18:56:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrew thomas X-Patchwork-Id: 931158 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="EyYAid6I"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 418gLN5B0rz9s2R for ; Tue, 19 Jun 2018 04:56:44 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 56B31C21F3D; Mon, 18 Jun 2018 18:56:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_PASS, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3145BC21EE8; Mon, 18 Jun 2018 18:55:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8C96AC21DED; Mon, 18 Jun 2018 18:55:23 +0000 (UTC) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by lists.denx.de (Postfix) with ESMTPS id F19BCC21DFA for ; Mon, 18 Jun 2018 18:55:22 +0000 (UTC) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5IIsF6K147960 for ; Mon, 18 Jun 2018 18:55:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=M28DJPGLg5yObnV9Oou4iQHFJMBDrDknIeqsxsJ/A5E=; b=EyYAid6IZvpqKh494GvlRBPVJyR/lnfm2W9i60f62Yfm89K5NvjHZAtsVn0r5R7CgG84 DhmbjddRIBTP8LkVI7RSpMaKOIhV0mp4ZTt3LqoXEVQFTWiGh/nsbBmN7n+3hRCsytOy iuLp/R5sDXJ/5Fr5CAHkANGa5DGzXbdH0+6hGm/+BNpZ+lDfMS3RwIEjs58rUUDBuMZ5 gj8bCndfUCta1RY9E/yMed6gKaBdPNh6jBF+x6dnZEyNjmy2xp8VsGjLhj7nlsac6G1z BV/rmLArJrfmtt5jD/4PuMT9vYBo2N80VSNuGRojrCXAMH0a+yvUI3SBggCGpnkUFJno Pw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2jmt01dd18-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 18 Jun 2018 18:55:21 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w5IItKIc005182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 18 Jun 2018 18:55:20 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5IItJ0M018848 for ; Mon, 18 Jun 2018 18:55:20 GMT Received: from serenity.us.oracle.com (/10.211.44.116) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Jun 2018 11:55:19 -0700 From: Andrew Thomas To: u-boot@lists.denx.de Date: Mon, 18 Jun 2018 11:56:06 -0700 Message-Id: <1529348166-130059-2-git-send-email-andrew.thomas@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1529348166-130059-1-git-send-email-andrew.thomas@oracle.com> References: <1529348166-130059-1-git-send-email-andrew.thomas@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8928 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=642 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806180217 X-Mailman-Approved-At: Mon, 18 Jun 2018 18:55:56 +0000 Cc: Andrew Thomas Subject: [U-Boot] [PATCH 1/1] dwc2 USB controller hangs with lan78xx X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This bug is the combination of dwc2 USB controller and lan78xx USB ethernet controller, which is the combination in use on the Raspberry Pi Model 3 B+. When the host attempts to receive a packet, but a packet has not arrived, the lan78xx controller responds by setting BIR (Bulk-In Empty Response) to NAK. Unfortunately, this hangs the USB controller and requires the USB controller to be reset. The fix proposed is to have the lan78xx controller respond by setting BIR to ZLP. Signed-off-by: Andrew Thomas Tested-by: Peter Robinson Reviewed-by: Alexander Graf --- drivers/usb/eth/lan78xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/eth/lan78xx.c b/drivers/usb/eth/lan78xx.c index c5ff379..e8ee665 100644 --- a/drivers/usb/eth/lan78xx.c +++ b/drivers/usb/eth/lan78xx.c @@ -296,7 +296,7 @@ static int lan78xx_basic_reset(struct usb_device *udev, ret = lan7x_read_reg(udev, LAN78XX_USB_CFG0, &val); if (ret) return ret; - val |= LAN78XX_USB_CFG0_BIR; + val &= ~LAN78XX_USB_CFG0_BIR; return lan7x_write_reg(udev, LAN78XX_USB_CFG0, val); }