Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14073200ybl; Mon, 30 Dec 2019 03:35:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxxBs1rDivIiYXTHzO/8trGE/7mSorJaZpRLFpYXuvvTL+I3ryc06bnWjCHqkTSiCN/BOJn X-Received: by 2002:a9d:6502:: with SMTP id i2mr46519276otl.206.1577705724227; Mon, 30 Dec 2019 03:35:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577705724; cv=none; d=google.com; s=arc-20160816; b=x3l4PUaC3EHhY+9+IzP/5eQhoEy+v87kmGlZ+d3rUuasi+CSTE6PAvEleA3AXtYatS rmyOstae/TRLJrFOICHb/fCXn2Yt9vXjIWvbCyUPQk3/Gl/csmBNd7tXynZWgstPqjhG U9KMYNS4g8mwkJeOO8JukpsWb4YVq7n6T6i62caHgFlIwr1o/E4OGfaYmKBYmt2RY4Hg MA1gURNflWdyMdV+Oo1aOMBjtz/Ec5JJ2N5Z34ILh8/0ILQLbnDY3azw4opVriMgHw9n qa0LFlVXpIkgX153nIoLQp7uoH3g3nXivXQ4Mdf6cHde/rC20WSxyJxYyHtni7w/2ObX vPbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Y6b6aiB0eLBpD5GJZBqwF/xfhDBtIopgwLVQlcYtocs=; b=RHWwXLVpl5xY6y8pSRcjDp50AiqpE9uU5w80qgLedhvJT1VcGIzpe6lZFIxHyw9IbF oY2fHW0WPJrqEPzIE4iwBhQcFJjzX1LFVqGUCT9UD/on5M7D4+YGR4al5qU9AK/DSiAH nr6Od5a2NM9dA3XST9ZO2KynglQ4k0tfOYyEzSYacDVfqgo95K1HgXNoMrHa0x6HY3aR vN0kdmPCifw/RFV5HvYhrLYtPbT9wuEn5HFWxEoqAXqwajbpJsrXqZAJ3I9KQgQdwwns flSfvctX5LSbWBbkt2gWXdTaiFzdt5VM5l4+za/u7w6zFWTk6BLIbuvDPjJA0K1/RpUq EKWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iDejW0Wa; 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 v7si27788317otr.44.2019.12.30.03.35.12; Mon, 30 Dec 2019 03:35:24 -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=iDejW0Wa; 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 S1727425AbfL3Led (ORCPT + 99 others); Mon, 30 Dec 2019 06:34:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:35506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727360AbfL3Lec (ORCPT ); Mon, 30 Dec 2019 06:34:32 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 4B7AB206E4; Mon, 30 Dec 2019 11:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577705671; bh=ZF4QpeWMRzVNh/7YVGePhghEgMWqiWlwc6VbNwNqTFo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iDejW0Watpe54MljfLJtjmUxDSOm8qGIALDCJBuUPqBOFPA2MPo4/KZXVhiEo4d9Q 4dU1MbheR5qbe9OAtlUJ06v8AePEYByODwt7JGtu/0U15E1dY0AcVWtWf9krXrOanF 5Cinl6LiulKKrK2c7J+xiOBJ3Otq5ghCTjL0Hmr0= Date: Mon, 30 Dec 2019 12:25:09 +0100 From: Greg KH To: Douglas Gilbert Cc: linux-usb@vger.kernel.org, linux@roeck-us.net, stable@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB-PD tcpm: bad warning+size, PPS adapters Message-ID: <20191230112509.GA884080@kroah.com> References: <20191230033544.1809-1-dgilbert@interlog.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191230033544.1809-1-dgilbert@interlog.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 29, 2019 at 10:35:44PM -0500, Douglas Gilbert wrote: > Augmented Power Delivery Objects (A)PDO_s are used by USB-C > PD power adapters to advertize the voltages and currents > they support. There can be up to 7 PDO_s but before PPS > (programmable power supply) there were seldom more than 4 > or 5. Recently Samsung released an optional PPS 45 Watt power > adapter (EP-TA485) that has 7 PDO_s. It is for the Galaxy 10+ > tablet and charges it quicker than the adapter supplied at > purchase. The EP-TA485 causes an overzealous WARN_ON to soil > the log plus it miscalculates the number of bytes to read. > > So this bug has been there for some time but goes > undetected for the majority of USB-C PD power adapters on > the market today that have 6 or less PDO_s. That may soon > change as more USB-C PD adapters with PPS come to market. > > Tested on a EP-TA485 and an older Lenovo PN: SA10M13950 > USB-C 65 Watt adapter (without PPS and has 4 PDO_s) plus > several other PD power adapters. > > Signed-off-by: Douglas Gilbert > --- > drivers/usb/typec/tcpm/tcpci.c | 20 +++++++++++++++----- > 1 file changed, 15 insertions(+), 5 deletions(-) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.