[packages/kernel] up to 6.1.8

atler atler at pld-linux.org
Tue Jan 24 19:19:46 CET 2023


commit 8ba2a77d10c03086ea2fa1b751093d8db24aef11
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Jan 24 19:18:22 2023 +0100

    up to 6.1.8

 kernel-aufs.patch      |   2 +-
 kernel.spec            |   6 +-
 typec-tcpm-fixes.patch | 375 -------------------------------------------------
 3 files changed, 3 insertions(+), 380 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index c01e9b99..93b28944 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -67,7 +67,7 @@
 
 %define		rel		1
 %define		basever		6.1
-%define		postver		.7
+%define		postver		.8
 
 # define this to '-%{basever}' for longterm branch
 %define		versuffix	%{nil}
@@ -121,7 +121,7 @@ Source0:	https://www.kernel.org/pub/linux/kernel/v6.x/linux-%{basever}.tar.xz
 # Source0-md5:	475320de08f16c9fa486fc4edfe98b30
 %if "%{postver}" != ".0"
 Patch0:		https://www.kernel.org/pub/linux/kernel/v6.x/patch-%{version}.xz
-# Patch0-md5:	299a204c0c3537ebcd05f57a97582859
+# Patch0-md5:	73819a74f7a811f76ab1b12fdbe5bc84
 %endif
 Source1:	kernel.sysconfig
 
@@ -215,7 +215,6 @@ Patch8000:	rpi-sound.patch
 Patch8001:	kernel-pinebook-pro.patch
 Patch8002:	atheros-disallow-retrain-nongen1-pcie.patch
 Patch8003:	odroid-n2-fan.patch
-Patch8004:	typec-tcpm-fixes.patch
 
 # Do not remove this line, please. It is easier for me to uncomment two lines, then patch
 # kernel.spec every time.
@@ -669,7 +668,6 @@ cd linux-%{basever}
 %patch8001 -p1
 %patch8002 -p1
 %patch8003 -p1
-%patch8004 -p1
 %endif
 
 %if %{with rt}
diff --git a/kernel-aufs.patch b/kernel-aufs.patch
index 7e799343..c54bcb61 100644
--- a/kernel-aufs.patch
+++ b/kernel-aufs.patch
@@ -571,8 +571,8 @@ index 214c70e1d059..dccbb939d2a9 100644
  			region = pregion;
  			result = start;
 @@ -1241,10 +1241,10 @@ unsigned long do_mmap(struct file *file,
- 	up_write(&nommu_region_sem);
  error:
+ 	mas_destroy(&mas);
  	if (region->vm_file)
 -		fput(region->vm_file);
 +		vmr_fput(region);
diff --git a/typec-tcpm-fixes.patch b/typec-tcpm-fixes.patch
deleted file mode 100644
index e849d6c5..00000000
--- a/typec-tcpm-fixes.patch
+++ /dev/null
@@ -1,375 +0,0 @@
-From mboxrd at z Thu Jan  1 00:00:00 1970
-Return-Path: <linux-usb-owner at kernel.org>
-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 224DEC001B2
-	for <linux-usb at archiver.kernel.org>; Fri, 16 Dec 2022 03:35:25 +0000 (UTC)
-Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand
-        id S229625AbiLPDbd (ORCPT <rfc822;linux-usb at archiver.kernel.org>);
-        Thu, 15 Dec 2022 22:31:33 -0500
-Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53942 "EHLO
-        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
-        with ESMTP id S229544AbiLPDbb (ORCPT
-        <rfc822;linux-usb at vger.kernel.org>); Thu, 15 Dec 2022 22:31:31 -0500
-Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on2077.outbound.protection.outlook.com [40.107.15.77])
-        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62BE237221
-        for <linux-usb at vger.kernel.org>; Thu, 15 Dec 2022 19:31:30 -0800 (PST)
-ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
- b=ng+6xR7SurQDW2RRVDT18TzSsAN+W/CvwAR9bX1YTQicRXrYnQRqMzT7Jo8ZcMOd1Ajmr2p5hJ+tGnPmOwAYNLtICWlr3qyRDrWXZDwIXNM7STrd6kE55WHsx/1mi7KSq15+JaieEAoNQ5tGLxTpAoZu36WNPu272X0NbD0lyrg73yiZzj+yHOaRp+RSuc/RxWDItNqw7OnzHaX0zM3J2qrlzRCcvJ2EyTsbfcpCStxgV3zmAHWrPjwUMYWVT/LBCXTmzLRbLFjxXxMaFdo+YTujs+PANBS3J7oaDTjMHjToYaw/pz7nupRe9wvGWqw8WOwQF1NLsx0NcOTO1rQEoQ==
-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
- s=arcselector9901;
- h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
- bh=b2kX1pD8/zbdFO9PIm1hpCXb6yl1DjK1hTKsA9e9ii8=;
- b=kobXaL+iFbykbYMBvF1ETwlO7IypmshVqJ5yRAJChSm+WtevFiWUsYzm/UfovupXCV14zPrHmrTnes/3i3c2m8lmcbLuOfBDiw3eueSvSAY3ICOJolYLP/iR2Fj8OdXwO6D9F32B6UhE8tFqerh7QsUe4sBooIfcxR4duAZmOlYCnJVo1JmGSa3f806orKaEXwB+mHHZRFjsoKRais9FDkIuV+BKgaKadtaeSCUKszN+WNhDQ4leRCvkWz2rABucmSzjPpVUx4IJCbOWB43r47SSt5w6Y6wZ1Xxb3Ow0Re9aHYbt4+QuTqSVm/h9uZ+UWhXfzxyO/b3+3lWRVC7MTA==
-ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
- smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass
- header.d=nxp.com; arc=none
-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2;
- h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
- bh=b2kX1pD8/zbdFO9PIm1hpCXb6yl1DjK1hTKsA9e9ii8=;
- b=f+O93Pcz0ekQ136g2nZFH2bFtpweVXSkG3NENf0Ur1/X4D5Iwj0AYl1D7nWjqpNUPslCcTdaUHIiQkndiyYlyJaoheQAyGpeWDRlqnUDfJUxFdjbUQFFUVWf0fcpV3C52uKRNjanlidRDqDqo/n4ZXEEvZskuZ1xRegl8WOGGCo=
-Authentication-Results: dkim=none (message not signed)
- header.d=none;dmarc=none action=none header.from=nxp.com;
-Received: from PA4PR04MB9591.eurprd04.prod.outlook.com (2603:10a6:102:270::18)
- by AS1PR04MB9583.eurprd04.prod.outlook.com (2603:10a6:20b:472::10) with
- Microsoft SMTP Server (version=TLS1_2,
- cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.11; Fri, 16 Dec
- 2022 03:31:28 +0000
-Received: from PA4PR04MB9591.eurprd04.prod.outlook.com
- ([fe80::8184:d5e2:3c61:b493]) by PA4PR04MB9591.eurprd04.prod.outlook.com
- ([fe80::8184:d5e2:3c61:b493%5]) with mapi id 15.20.5924.011; Fri, 16 Dec 2022
- 03:31:27 +0000
-From:   Xu Yang <xu.yang_2 at nxp.com>
-To:     linux at roeck-us.net, heikki.krogerus at linux.intel.com
-Cc:     gregkh at linuxfoundation.org, linux-usb at vger.kernel.org,
-        linux-imx at nxp.com, jun.li at nxp.com, xu.yang_2 at nxp.com
-Subject: [PATCH] usb: typec: tcpm: fix create duplicate source/sink-capabilities file
-Date:   Fri, 16 Dec 2022 11:31:50 +0800
-Message-Id: <20221216033150.2683718-1-xu.yang_2 at nxp.com>
-X-Mailer: git-send-email 2.34.1
-Content-Transfer-Encoding: 8bit
-Content-Type: text/plain
-X-ClientProxiedBy: SG2PR02CA0065.apcprd02.prod.outlook.com
- (2603:1096:4:54::29) To PA4PR04MB9591.eurprd04.prod.outlook.com
- (2603:10a6:102:270::18)
-MIME-Version: 1.0
-X-MS-PublicTrafficType: Email
-X-MS-TrafficTypeDiagnostic: PA4PR04MB9591:EE_|AS1PR04MB9583:EE_
-X-MS-Office365-Filtering-Correlation-Id: 2194a93c-5207-4126-84b6-08dadf1603ff
-X-MS-Exchange-SenderADCheck: 1
-X-MS-Exchange-AntiSpam-Relay: 0
-X-Microsoft-Antispam: BCL:0;
-X-Microsoft-Antispam-Message-Info: emZFXRsfitvOgo9JoYlfeAgqMGxui5NvX00qtb+vHxH/MeM86krF9ND5RM8sYE9JOXPfhdK3/aP2QhWxUABNCiSW6pD9Xeaqd9sHc2Xnhs6IEPtLOPZaYoVWtWEnyZ2sky/h9iQ3TFdNk3uDUoegzsD0YEe+OLeMTEXgm9wPI8kB/g/3hjZ5K42KXVnncZ6+cU1ujsCFV3yGxL87dUXm3zC+uamJd3XRW64JBFvUQXbBGyQlLpIyYjC+JGpbVyQ6rAQtL+qOkkYX+9K371+Kv0lLUo9ZUXh7bEk+8yjQeCEMLQ6PVKb32DjNHeBoaAGfpzkHHZmQtb5MTKsSjowbi/6gZKE6HiAv+6DQjfKm11K89rSzG8igX3uydXnM1c0XZtvMGUrHKmBG7mpquZ2gR43f4DRgcec9nyhT8QoTawMWCguPEAIk7S+z2+pir6OJF0qukV9b4rwYRcgJKSKFxQ+cDPB53/1a4I+5bDBxaxOJmT5+OevUBr+77K5o3rnD6cCnDtutH7yijLzNX0xjLHYsnF6t1Amt+wzZt21OBp7TCRXf1OC1/rZjd1vDPTREAvGtvK8lkaJrkpuw6f0PMr+ILnYuEj/LRohlKodCMOYyLOI/oAA18OeMyobPg62K5iQxrO7wCy1ADLyHUg4WbqyeBoOzvl4MphL6Ew/+a8YQtKez8htTU4zpkR1hTd6X
-X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR04MB9591.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(136003)(346002)(396003)(366004)(39860400002)(451199015)(6506007)(6512007)(52116002)(478600001)(186003)(26005)(2906002)(6486002)(6666004)(41300700001)(38100700002)(66476007)(66556008)(8676002)(66946007)(4326008)(2616005)(38350700002)(8936002)(1076003)(36756003)(316002)(5660300002)(86362001);DIR:OUT;SFP:1101;
-X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
-X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?WdoztsYspp+nQCpexUOUuy+2DaSLhf275fycU6j6muTfZLCJk9C9jO9RCsBQ?=
- =?us-ascii?Q?r4rRMdjYxJOCOwS1JLfqQzlRcWB314i4SWuThSyF4/x582dfnk0lr2VJ+8lD?=
- =?us-ascii?Q?mPF+kEUdITdV2ITbNUO1ySwhUL26uAVFJ1wV19cmpPjtuHjay5WpR89sWwgl?=
- =?us-ascii?Q?QrKZkG0s3N9bWS5tcqQ/UNg975D+oGifYeaeDnwTmTN0gmenfYVy55m5sxqm?=
- =?us-ascii?Q?YQG9UWMaPEy3Y+qK5rrJ855q5WaVmPyDmpehXMpWYrjeIFqIy1STyOYaO3jS?=
- =?us-ascii?Q?7AL4wdh6gcQdIdURw7aVUTwBQLru1QmHPXMpH8oXe8EGy5lV01Wz3CHE5EgN?=
- =?us-ascii?Q?LiYhCQg91Zy0jKAY2euL/9KMycC4FLeLOLZrFYu13cW/ulR78zIAzsDN35ss?=
- =?us-ascii?Q?DjQuqvczAzDbgLgfHMScAJW6L9jA97HStWqVxXRgW1R43A5hNnwAR7wAF50j?=
- =?us-ascii?Q?h5OBch8YY53cH0fAc/eIbvbs7DCysbTa09ON7M9AdUYrRA1Of64aY+85rqHg?=
- =?us-ascii?Q?mPnITwzZ1J8k6iK19E+rCoGtk3zSyfLFAZ4o12ZvEx2zEuo4hs+YOtPinJVr?=
- =?us-ascii?Q?/IeDNzFK+/M4wc3swLfghsei6bzpu5xwlHCII0cF2fx3P6zw8f2jvGdxYY4w?=
- =?us-ascii?Q?rIhaBiVO+bgxYyrqzwoJYRzNFEOfc8I2LsVWpOzgI/wz6t7kTIdd6WVurr3L?=
- =?us-ascii?Q?PrIggmKbjz7PkX17sr9FmvQ6ZfMGhZ8lCl6ojyWl9SSScvQxfvFZUNYjGy0N?=
- =?us-ascii?Q?WCjsSuxnXDdew4BS5NGCZX46wKqW/2kF8BlbfsdWHbYnTy1XmdPwAbYmPEVG?=
- =?us-ascii?Q?RzIvOtQ2CVHNKcyEGLEGQ0zh2dm6qnqtFVJULE5lL0l7CRru19XrxTUXocqc?=
- =?us-ascii?Q?v2UYYptCzIq9Jn0vxPOb8Ftu6lu2b0v+lnishtBnk3v5niG0G5Of2+U081p8?=
- =?us-ascii?Q?KUfNvCbT2sJSUfOs57GQBYezQdm88X2bA9dwp0COqlXU3zGLbEuPCABW5XMS?=
- =?us-ascii?Q?Okvyzsja/OZMI1JlGCIHl7z/IqW3XPqrRqMHMLO66/ar0bMACSw/F9hIT4d+?=
- =?us-ascii?Q?h7dL5sIuvNHlR1YNq8uyzwXEQw2/7YHJSQ1FWgrH11SgtlCIgrUKndhKEgKk?=
- =?us-ascii?Q?Fea5HM2xiN0l1R16x4cvkFw8cw8tfVeZ9TWhM80q9+K0cUoNs5qMRtaEQ5Vr?=
- =?us-ascii?Q?zetNoXE29fmPfu/QhZWWnC7e9GKGE1D1tDIgy711o7/hIRVxbEcSfY+yjGig?=
- =?us-ascii?Q?HNH9mpehxUkchmfEExGg5tLMYE2ZQvK5+Z43WLcqQz5OYWpXnOD28tQbYZFC?=
- =?us-ascii?Q?vRzFQov0e7q4n5ubiIBk4qRd4Qz8KrX/pf0A1Mw5OKpjY7BbbiihuZf6Ktvu?=
- =?us-ascii?Q?gxHK3fD4Y7KuOPc/xB3GwkJAzkfyV8W56j2foDhdAbbARYkO0rD4z29C+wAg?=
- =?us-ascii?Q?4bz5NHu8XN8NOeqRbVyJ5qjC67p4YQm48TZeN4KQV7FOByfKy9cvCnnFiQ98?=
- =?us-ascii?Q?hFrvz+bxyWfpOrg9SeytTJiRs+4EiDMGSghGFR74nqwZMyIn93RgjFib1F07?=
- =?us-ascii?Q?oe6OvaXTEalj+OFHprNLG0KAPBvqDfdvIzwwDu4T?=
-X-OriginatorOrg: nxp.com
-X-MS-Exchange-CrossTenant-Network-Message-Id: 2194a93c-5207-4126-84b6-08dadf1603ff
-X-MS-Exchange-CrossTenant-AuthSource: PA4PR04MB9591.eurprd04.prod.outlook.com
-X-MS-Exchange-CrossTenant-AuthAs: Internal
-X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Dec 2022 03:31:27.7260
- (UTC)
-X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
-X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635
-X-MS-Exchange-CrossTenant-MailboxType: HOSTED
-X-MS-Exchange-CrossTenant-UserPrincipalName: fkY1vi4XnXC/yiNQpmqZLiSwIOIovzlPUtvNQQXuMrzXbIzu5F/vvHm9PrLwN2S8BybYWiu1cX0WPAbEuuAEuw==
-X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9583
-Precedence: bulk
-List-ID: <linux-usb.vger.kernel.org>
-X-Mailing-List: linux-usb at vger.kernel.org
-
-After soft reset has completed, an Explicit Contract negotiation occurs.
-The sink device will receive source capabilitys again. This will cause
-a duplicate source-capabilities file be created.
-
-And the kernel will dump:
-sysfs: cannot create duplicate filename '/devices/virtual/usb_power_delivery/pd1/source-capabilities'
-
-This will unregister existing capabilities before register new one.
-
-Fixes: 8203d26905ee ("usb: typec: tcpm: Register USB Power Delivery Capabilities")
-cc: <stable at vger.kernel.org>
-Signed-off-by: Xu Yang <xu.yang_2 at nxp.com>
----
- drivers/usb/typec/tcpm/tcpm.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
-index 904c7b4ce2f0..02d8a704db95 100644
---- a/drivers/usb/typec/tcpm/tcpm.c
-+++ b/drivers/usb/typec/tcpm/tcpm.c
-@@ -2371,6 +2371,9 @@ static int tcpm_register_source_caps(struct tcpm_port *port)
- 	if (IS_ERR(port->partner_pd))
- 		return PTR_ERR(port->partner_pd);
- 
-+	/* remove existing capabilities since got new one */
-+	usb_power_delivery_unregister_capabilities(port->partner_source_caps);
-+
- 	memcpy(caps.pdo, port->source_caps, sizeof(u32) * port->nr_source_caps);
- 	caps.role = TYPEC_SOURCE;
- 
-@@ -2394,6 +2397,9 @@ static int tcpm_register_sink_caps(struct tcpm_port *port)
- 	if (IS_ERR(port->partner_pd))
- 		return PTR_ERR(port->partner_pd);
- 
-+	/* remove existing capabilities since got new one */
-+	usb_power_delivery_unregister_capabilities(port->partner_sink_caps);
-+
- 	memcpy(caps.pdo, port->sink_caps, sizeof(u32) * port->nr_sink_caps);
- 	caps.role = TYPEC_SINK;
- 
--- 
-2.34.1
-
-
-From mboxrd at z Thu Jan  1 00:00:00 1970
-Return-Path: <linux-usb-owner at kernel.org>
-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 8EA9BC00145
-	for <linux-usb at archiver.kernel.org>; Thu, 15 Dec 2022 09:22:04 +0000 (UTC)
-Received: (majordomo at vger.kernel.org) by vger.kernel.org via listexpand
-        id S229914AbiLOJWC (ORCPT <rfc822;linux-usb at archiver.kernel.org>);
-        Thu, 15 Dec 2022 04:22:02 -0500
-Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59672 "EHLO
-        lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
-        with ESMTP id S229947AbiLOJV7 (ORCPT
-        <rfc822;linux-usb at vger.kernel.org>); Thu, 15 Dec 2022 04:21:59 -0500
-Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631])
-        by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E36CCD6;
-        Thu, 15 Dec 2022 01:21:55 -0800 (PST)
-Received: by mail-pl1-x631.google.com with SMTP id g10so6189237plo.11;
-        Thu, 15 Dec 2022 01:21:55 -0800 (PST)
-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
-        d=gmail.com; s=20210112;
-        h=message-id:date:subject:cc:to:from:from:to:cc:subject:date
-         :message-id:reply-to;
-        bh=tKq+74lFzjG0ld+n/1zNhWFFCw+s5cZPvJZHWPcwlfs=;
-        b=Z8ftD08MnvO6lYokc6C0FaaznWFY7oZ2o88H4jjh1XTIGX6LCllsoCoAxrA/N8wBug
-         UTR2e/IWhyja/+QvOSxfe8qeW/TykJjcGxshfabALZTM0BPoTQ994q6LWQhnDU5bWH7M
-         dQWeF7BF5wj3Ye0QzJIrUbhazEzJXRvTPtEkPz1WFFq1Tzsz0vibXrETarxlClMVtlBk
-         eGJUNgHRgFszz48swWN2wMgNypMj3VWBODgPMWoH4YzOJC4EVQl/Z4IbC2dRp1o0vAV6
-         kwi54D/CUUdcx4EBco/m5r+z9lDAuOKrsjh7yC51H23U8y3vhBwXVAQkxmt1Ynn6nupS
-         9dYw==
-X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
-        d=1e100.net; s=20210112;
-        h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
-         :subject:date:message-id:reply-to;
-        bh=tKq+74lFzjG0ld+n/1zNhWFFCw+s5cZPvJZHWPcwlfs=;
-        b=uqQuLsS8gFcaO46Wz/k6ogXjcOGnM+dXnqYwzosCvDGJxe9OTOQUP6sXXH3zJtulII
-         zbMPdncdFCDN25MsgZXWVMkFJFtrRQuWhDxDMIaKB4UNq6gXkDZSxLygMv3gYoPdcc9L
-         A+f+lKtw+bEPmu4u36kvmft9VnBti3Bs4Gh0bqpi16/HX8w03kIAL4iUpXwrHhgNkrQS
-         AlM6dAs7h9COJZR+el/23yOFgCSiQxEIpxBwgRd+P+DPkiX5xmZH2NrSIapwmmHI+pjL
-         uk/FlKDV/plhZ8eS0EcU2m4x42SrPVfVtmH/gXOHlRAbWTcMjSVTnObiU1EyTKxbP4L9
-         syLA==
-X-Gm-Message-State: ANoB5pkd3DwV5i0xEo8e7xPmb76wt2lTiB1gK50xozFW3LLqOglwsFax
-        nOHJbAvuBKMkW1IrLRpRdaA=
-X-Google-Smtp-Source: AA0mqf4M/m6d20Wa2QLk2x8QrsVMGAZaeNnv4gUOVoyKz4OfGf8lZpjqzPtas5y6ZGgoyfOzR4Bkcg==
-X-Received: by 2002:a17:902:f610:b0:185:441e:2349 with SMTP id n16-20020a170902f61000b00185441e2349mr31031911plg.63.1671096114339;
-        Thu, 15 Dec 2022 01:21:54 -0800 (PST)
-Received: from localhost.localdomain ([2402:7500:486:1c9c:f86e:3e0f:1a37:f7a5])
-        by smtp.gmail.com with ESMTPSA id k13-20020a170902c40d00b0017a032d7ae4sm3334796plk.104.2022.12.15.01.21.49
-        (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
-        Thu, 15 Dec 2022 01:21:53 -0800 (PST)
-From:   cy_huang <u0084500 at gmail.com>
-To:     linux at roeck-us.net, heikki.krogerus at linux.intel.com,
-        matthias.bgg at gmail.com
-Cc:     gregkh at linuxfoundation.org, tommyyl.chen at mediatek.com,
-        macpaul.lin at mediatek.com, gene_chen at richtek.com,
-        linux-usb at vger.kernel.org, linux-kernel at vger.kernel.org,
-        linux-arm-kernel at lists.infradead.org,
-        linux-mediatek at lists.infradead.org,
-        ChiYuan Huang <cy_huang at richtek.com>, stable at vger.kernel.org
-Subject: [PATCH] usb: typec: tcpm: Fix altmode re-registration causes sysfs create fail
-Date:   Thu, 15 Dec 2022 17:21:36 +0800
-Message-Id: <1671096096-20307-1-git-send-email-u0084500 at gmail.com>
-X-Mailer: git-send-email 2.7.4
-Precedence: bulk
-List-ID: <linux-usb.vger.kernel.org>
-X-Mailing-List: linux-usb at vger.kernel.org
-
-From: ChiYuan Huang <cy_huang at richtek.com>
-
-There's the altmode re-registeration issue after data role
-swap (DR_SWAP).
-
-Comparing to USBPD 2.0, in USBPD 3.0, it loose the limit that only DFP
-can initiate the VDM command to get partner identity information.
-
-For a USBPD 3.0 UFP device, it may already get the identity information
-from its port partner before DR_SWAP. If DR_SWAP send or receive at the
-mean time, 'send_discover' flag will be raised again. It causes discover
-identify action restart while entering ready state. And after all
-discover actions are done, the 'tcpm_register_altmodes' will be called.
-If old altmode is not unregistered, this sysfs create fail can be found.
-
-In 'DR_SWAP_CHANGE_DR' state case, only DFP will unregister altmodes.
-For UFP, the original altmodes keep registered.
-
-This patch fix the logic that after DR_SWAP, 'tcpm_unregister_altmodes'
-must be called whatever the current data role is.
-
-Fixes: ae8a2ca8a221 ("usb: typec: Group all TCPCI/TCPM code together)
-Reported-by: TommyYl Chen <tommyyl.chen at mediatek.com>
-Cc: stable at vger.kernel.org
-Signed-off-by: ChiYuan Huang <cy_huang at richtek.com>
----
-Hi,
-
-Below's the issue log for the reference.
-
-*TCPM
-[    3.856679] AMS DISCOVER_MODES start
-[    3.856687] PD TX, header: 0x188f
-[    3.858827] PD TX complete, status: 0
-[    3.865330] PD RX, header: 0x2daf [1]
-[    3.865340] Rx VDM cmd 0xff01a043 type 1 cmd 3 len 2
-[    3.865348] AMS DISCOVER_MODES finished
-[    3.865352]  Alternate mode 0: SVID 0xff01, VDO 1: 0x001c0045
-[    3.865362] AMS DISCOVER_MODES start
-[    3.865367] PD TX, header: 0x1a8f
-[    3.867802] PD TX complete, status: 0
-[    3.875208] PD RX, header: 0x2faf [1]
-[    3.875216] Rx VDM cmd 0x413ca043 type 1 cmd 3 len 2
-[    3.875222] AMS DISCOVER_MODES finished
-[    3.875225]  Alternate mode 1: SVID 0x413c, VDO 1: 0x00000001
-[    3.938243] AMS GET_SINK_CAPABILITIES start
-[    3.938255] state change SNK_READY -> AMS_START [rev3 GET_SINK_CAPABILITIES]
-[    3.938266] state change AMS_START -> GET_SINK_CAP [rev3 GET_SINK_CAPABILITIES]
-[    3.938274] PD TX, header: 0xe88
-[    3.940268] PD TX complete, status: 0
-[    3.940310] pending state change GET_SINK_CAP -> GET_SINK_CAP_TIMEOUT @ 60 ms
-[rev3 GET_SINK_CAPABILITIES]
-[    3.946291] PD RX, header: 0x13a4 [1]
-[    3.946295] Port partner FRS capable partner_frs_current:0 port_frs_current:0 enable:n
-[    3.946298] state change GET_SINK_CAP -> SNK_READY [rev3 GET_SINK_CAPABILITIES]
-[    3.946304] AMS GET_SINK_CAPABILITIES finished
-[    4.239342] CC1: 5 -> 4, CC2: 0 -> 0 [state SNK_READY, polarity 0, connected]
-[    4.256594] PD RX, header: 0x5a9 [1]
-[    4.256603] state change SNK_READY -> DR_SWAP_ACCEPT [rev3 DATA_ROLE_SWAP]
-[    4.256609] PD TX, header: 0x83
-[    4.258528] PD TX complete, status: 0
-[    4.258584] state change DR_SWAP_ACCEPT -> DR_SWAP_CHANGE_DR [rev3 DATA_ROLE_SWAP]
-[    4.258591] Requesting mux state 1, usb-role 1, orientation 1
-[    4.259588] AMS DATA_ROLE_SWAP finished
-[    4.259592] state change DR_SWAP_CHANGE_DR -> SNK_READY [rev3 NONE_AMS]
-[    4.259605] AMS DISCOVER_IDENTITY start
-[    4.259609] Sink TX No Go
-[    4.260874] CC1: 4 -> 5, CC2: 0 -> 0 [state SNK_READY, polarity 0, connected]
-[    4.359636] AMS DISCOVER_IDENTITY start
-[    4.359642] PD TX, header: 0x12af
-[    4.361884] PD TX complete, status: 0
-[    4.369433] PD RX, header: 0x578f [1]
-[    4.369439] Rx VDM cmd 0xff00a041 type 1 cmd 1 len 5
-[    4.369448] AMS DISCOVER_IDENTITY finished
-[    4.369515] Identity: 413c:c013.0712
-[    4.369521] AMS DISCOVER_SVIDS start
-[    4.369524] PD TX, header: 0x14af
-[    4.371696] PD TX complete, status: 0
-[    4.378564] PD RX, header: 0x398f [1]
-[    4.378573] Rx VDM cmd 0xff00a042 type 1 cmd 2 len 3
-[    4.378579] AMS DISCOVER_SVIDS finished
-[    4.378582] SVID 1: 0xff01
-[    4.378584] SVID 2: 0x413c
-[    4.378594] AMS DISCOVER_MODES start
-[    4.378597] PD TX, header: 0x16af
-[    4.380696] PD TX complete, status: 0
-[    4.387008] PD RX, header: 0x2b8f [1]
-[    4.387014] Rx VDM cmd 0xff01a043 type 1 cmd 3 len 2
-[    4.387021] AMS DISCOVER_MODES finished
-[    4.387023]  Alternate mode 0: SVID 0xff01, VDO 1: 0x001c0045
-[    4.387029] AMS DISCOVER_MODES start
-[    4.387031] PD TX, header: 0x18af
-[    4.389134] PD TX complete, status: 0
-[    4.395528] PD RX, header: 0x2d8f [1]
-[    4.395538] Rx VDM cmd 0x413ca043 type 1 cmd 3 len 2
-[    4.395546] AMS DISCOVER_MODES finished
-[    4.395548]  Alternate mode 1: SVID 0x413c, VDO 1: 0x00000001
-
-*Kernel TRACE
-sysfs: cannot create duplicate filename
-'/devices/platform/soc/11d01000.i2c/i2c-0/0-0034/mt6360-tcpc.6.auto/typec/port0/port0.0/partner'
-CPU: 2 PID: 299 Comm: mt6360-tcpc.6.a Tainted: GO      5.15.37-mtk+g880abc5122e7 #1
-Hardware name: MediaTek MT8195 demo board (DT)
-Call trace:
- dump_backtrace+0x0/0x1ac
- show_stack+0x24/0x30
- dump_stack_lvl+0x68/0x84
- dump_stack+0x1c/0x38
- sysfs_warn_dup+0x70/0x90
- typec_probe+0xa4/0x134 [typec]
- really_probe.part.0+0xa4/0x310
- __device_attach_driver+0x100/0x16c
- bus_for_each_drv+0x84/0xe0
- __device_attach+0xe0/0x1ac
- device_add+0x39c/0x8b0
- device_register+0x2c/0x40
- typec_register_altmode+0x1f4/0x360 [typec]
- typec_partner_register_altmode+0x1c/0x30 [typec]
- tcpm_pd_rx_handler+0x19d4/0x1c0c [tcpm]
- kthread_worker_fn+0xb8/0x290
- kthread+0x15c/0x170
- ret_from_fork+0x10/0x20
-[    4.395962] typec_displayport port0-partner.2: failed to create symlinks
-[    4.395967] typec_displayport: probe of port0-partner.2 failed with error -17
-
-It seems it's a common issue if typec port supports the modal operation.
-
----
- drivers/usb/typec/tcpm/tcpm.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
-index 904c7b4..59b366b 100644
---- a/drivers/usb/typec/tcpm/tcpm.c
-+++ b/drivers/usb/typec/tcpm/tcpm.c
-@@ -4594,14 +4594,13 @@ static void run_state_machine(struct tcpm_port *port)
- 		tcpm_set_state(port, ready_state(port), 0);
- 		break;
- 	case DR_SWAP_CHANGE_DR:
--		if (port->data_role == TYPEC_HOST) {
--			tcpm_unregister_altmodes(port);
-+		tcpm_unregister_altmodes(port);
-+		if (port->data_role == TYPEC_HOST)
- 			tcpm_set_roles(port, true, port->pwr_role,
- 				       TYPEC_DEVICE);
--		} else {
-+		else
- 			tcpm_set_roles(port, true, port->pwr_role,
- 				       TYPEC_HOST);
--		}
- 		tcpm_ams_finish(port);
- 		tcpm_set_state(port, ready_state(port), 0);
- 		break;
--- 
-2.7.4
-
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/8ba2a77d10c03086ea2fa1b751093d8db24aef11



More information about the pld-cvs-commit mailing list