Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2557025imu; Thu, 29 Nov 2018 06:52:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/WcKaaXYbjtnrbXiuLfVetmUlam4hDK22Gly11456OykXQz0MWPsWF2Wa33Dk+QoxL9sadz X-Received: by 2002:a65:4049:: with SMTP id h9mr1479065pgp.304.1543503132271; Thu, 29 Nov 2018 06:52:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543503132; cv=none; d=google.com; s=arc-20160816; b=dR0TzeGhL4PojM0xXa21hk+szIfSjP8PN2egD1vRUue8VA8lK/TQGwBc+u6eRE5zx6 qyJr8bbUeYl6NrIP0U/jO7KUo9sMlc9y6TEAa34zg1C8LuuUgBdxISkMoSTvBCwe/Hft vHwu0yLzZ+VrRkmN5kWaonTgT74RZmBsMQ4D203QTdJ0J+NdRtaFk0s8rnMBlDzUJRbt 0+E0Mufn13p0dCXaxcmTn8ZrF/GJSgre2hfJDBUSZKzG6cY0mrL8hnIFqXZ7coo57n/a 5UoR3ez6LlCK9E9UTEZM3fJPo6Zaf3rmrYN7iI+ksD8Q+YgHb0NROua3nLqu6c2b5Keb Wxng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AWYhjgv51bIoMIxWMLXVwA/WG8TPJM1h0DUDXOLX2tE=; b=TZf5Gq1PGW1NOXpXNsablrrWR6YCdWzv4I3ehYoYFtk0EIyXsL6IVxYKQaxWX5TLmt lq4H8jm0jzS+6t7Hv7XUW1TIpaVW/iae0D2oanPR4GGG9uX6i444tNF+54PVjhbsYH4L atGppdoG5j71PQ+0KgjZLOg0RV9pJm3DEC2xsyXPaaBlNXvPhCHx4L0E5reQ8w8a8RG1 G3UwV/2NllHTaMo5e6nxOtPC29ZR+jb1hxWJpE5d638wxwnBTNon+9apBUBM1O1Cztk5 P5orua8irQOcgRXZY72dDB1J76SBSLHy+akrp4P11Kcjx6Yj05f7hD/bH6XuETiZssOu IS0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wo8gQuYG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t74si1960543pgc.150.2018.11.29.06.51.53; Thu, 29 Nov 2018 06:52:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wo8gQuYG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732758AbeK3BaU (ORCPT + 99 others); Thu, 29 Nov 2018 20:30:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:57280 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728616AbeK3BaT (ORCPT ); Thu, 29 Nov 2018 20:30:19 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 930002145D; Thu, 29 Nov 2018 14:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543501487; bh=15ZDFBeCbi4PNIHf+9wWO3hJKWfkyB7RXha/rb/wyis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wo8gQuYGS4R6gchep5OswLWAkO3RWvkMqMgPuPJ2BPedcaOJjx/UPp20jpKJLr7TH vBeNPu/ljehSWSu2Su3MqzvFwpMYi/6+kS3z0qWTLgnLPeZ+kB3WD4natPEX7Z5m1X ny5YrKUlEfKYJHtDm7A95N/vfK1oeQgyCGfpqpPQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sandeep Singh , Nehal Shah , Shyam Sundar S K , Mathias Nyman Subject: [PATCH 4.14 010/100] xhci: Add check for invalid byte size error when UAS devices are connected. Date: Thu, 29 Nov 2018 15:11:40 +0100 Message-Id: <20181129140059.851469378@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140058.768942700@linuxfoundation.org> References: <20181129140058.768942700@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sandeep Singh commit d9193efba84fe4c4aa22a569fade5e6ca971f8af upstream. Observed "TRB completion code (27)" error which corresponds to Stopped - Length Invalid error(xhci spec section 4.17.4) while connecting USB to SATA bridge. Looks like this case was not considered when the following patch[1] was committed. Hence adding this new check which can prevent the invalid byte size error. [1] ade2e3a xhci: handle transfer events without TRB pointer Cc: Signed-off-by: Sandeep Singh cc: Nehal Shah cc: Shyam Sundar S K Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-ring.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2335,6 +2335,7 @@ static int handle_tx_event(struct xhci_h goto cleanup; case COMP_RING_UNDERRUN: case COMP_RING_OVERRUN: + case COMP_STOPPED_LENGTH_INVALID: goto cleanup; default: xhci_err(xhci, "ERROR Transfer event for unknown stream ring slot %u ep %u\n",