Message ID | 20240117114742.2587779-1-badhri@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-28928-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp850798dye; Wed, 17 Jan 2024 03:48:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvcVmieX+fvfp1Vfw4CyCtE2nrkDrn/Qk/JgmsD/WhDuTu9homcUcc86hjjxqRSzbfrH21 X-Received: by 2002:a17:906:c317:b0:a2d:6b8e:fb17 with SMTP id s23-20020a170906c31700b00a2d6b8efb17mr701747ejz.20.1705492095475; Wed, 17 Jan 2024 03:48:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705492095; cv=pass; d=google.com; s=arc-20160816; b=jd/KO9f1PdI/RbuF5EnQndSXMDqV8Zp8rNl4oXzpMTJuO9j7yYvGsB+DkZ2mX0L6y3 nX7kMrJtGpdnFHV32LeBuEtikqIZewfLJYnfoxxNq7beHyfSEBM1F7bho4M0W65yk2Pf /BNnjKr4MmmyUoHyV+ZpKqz6V5oMusVq4VeXqZtoia1Zi6zQUwRwfFyBkoUcMOVqUz+2 3u+7TaUKD4YWgnikPvpm7DwBXoEsllOcdaV7iRdGqZ5UY2e8cMXiaSjma6cZE7OxyRMS OAcby1C07jj7a8HPRVjFAuykNZkuvf6f50aIud0k6T/voZ31CkeLZKz8M0FAQwCIMdm9 iEnQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=W4MUqY7qziRkIoVCBAjHtlR0P63yXdlU8r3ZOJ0yHa4=; fh=B+oj6DUB0h1EkKUqYsLPup2ZsjMvE42iJbI7wEnAyok=; b=OAVvCymL4D2jgf09qlS74lhWLBr9ZrzOiikVB/mRbfPZyU/2urO8QI8fCOMN5P6AxW eEfkv3VXSR7rQIQ37m/ShaMw3rKZS10uusJB/UuxlVs32poxt4AqQpcC28dg3bvbFvQz BxrRLKGM8O6xwar+j2TjIys74Kg+BoObR4T/uLZB1GkuxjNUraQKlfQB7sc2sTzYHmOm dyBbSxCk4JOkFe8gQbVLz577Zf0c8OywjzSnjS9QTdaBNrN+9r8QYoFncrwHkTV7+8lJ mJJ9j4CdwxRe3hYyLausSuEwg37zeNLZXHBK2oQY/YCiiAYWGMravv7CcUZJLviXzoPZ GQ3g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=EwsqLbLw; arc=pass (i=1 spf=pass spfdomain=flex--badhri.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-28928-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28928-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r10-20020a170906350a00b00a2af02c94f4si5713336eja.259.2024.01.17.03.48.15 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 03:48:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28928-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=EwsqLbLw; arc=pass (i=1 spf=pass spfdomain=flex--badhri.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-28928-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28928-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E52391F21D08 for <ouuuleilei@gmail.com>; Wed, 17 Jan 2024 11:48:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49F011DFCF; Wed, 17 Jan 2024 11:47:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="EwsqLbLw" Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37D571D697 for <linux-kernel@vger.kernel.org>; Wed, 17 Jan 2024 11:47:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705492068; cv=none; b=VESMJNMk945lEsdMD7gU6poSA6Jl2KH2zck8DUZdvbg+18cUuxY3vjhQGWZnKSqQTVsQYoM+tRbvS9MLgXUao+lJa7bQ86/GiC+AgAtqXTmmSXwUv1BrGf5f4WuNAH/ZRsWrY8k6qHrHYunf5Vob9M+xdfBcKAdoGkgMlGP0iXE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705492068; c=relaxed/simple; bh=Nui8zu8V3ndYddOaheaEne/imbsV07hHxFFahrvH2Sg=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Date: Mime-Version:X-Mailer:Message-ID:Subject:From:To:Cc:Content-Type; b=NIwt3HVCTMtoeUAR7mruhiK114qTKoCNUjL7qgNXj5v7bmDrYLzj+Vhdh6vN6chZgpY+KybmM7BcAw4utx9vSqXwDtAK+/6CXeg9IZwTJK09kZQcZr2Up62uvzQCTyn/f6zwm+RTbyAFCLgtdayvSwMlLc4LM47o7ZshtHB2+Go= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--badhri.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=EwsqLbLw; arc=none smtp.client-ip=209.85.216.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--badhri.bounces.google.com Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-28bc9e1f43eso11160901a91.0 for <linux-kernel@vger.kernel.org>; Wed, 17 Jan 2024 03:47:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705492065; x=1706096865; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=W4MUqY7qziRkIoVCBAjHtlR0P63yXdlU8r3ZOJ0yHa4=; b=EwsqLbLwrHC+6uec1zex3MPtORgYgWFtDZ6TP9jbVleJwmOBNJmyr49VRSFO3xKtje tGYknPHymYsxUZuWNYD7QahGByjQ8hFrsaaTDJa3YLPSshOgLuHfvBgWdqMHRse4FPVW mtm6xhudADl1OiO6tb1Xi1PSTh9mBlTQgWcxMHrCcERYI5QzBfS8G5YRc1yJcWAqP50Q J4iVDzbXCiI73XO8EP4KFFC8WZ/hYrG8uaViZVgTSYV9hvt3Yb/YvoBvNqtvS42MYLQp p0IOJ/qZpVVGdY4m8NoXLdWY5fm8P8R6ySNszP/bxDBtnjsjaOhM61w89c+A9ymhyN6a LrzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705492065; x=1706096865; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=W4MUqY7qziRkIoVCBAjHtlR0P63yXdlU8r3ZOJ0yHa4=; b=Mn/6kjpNdHwqIfmV+vHV72hnOTajzyA2WvCtUgCQxan+oKTRXag+ri6sqyvfUENlIG iAfrqIkMkMpNpI6R1wfnWGo3W0eI1rIu4qXRYB7GdiDjwQiV2A954Av2dCOdXpWqphhc 0mxhSIoH36FEwg19TZun9dQgOiFnsmwZlwtSYc9ssjIa1NRxOz+eRp4UF1A7Uu+dgDBB AVyAAcBbgt12OYo8/gZp5RMzH8jUcTwIquWUxtBCckw9eoxXXm/h/HDJGVpQmgmLX44Y AMPGfTgqaOUOPWci3HdvvCtEWHqM7vMuFW0NCVf2LV37wpXiDIB6I0PjFomXxOVs6qoJ Hn+A== X-Gm-Message-State: AOJu0Ywq/HzkZlrGe0KrLqXgAixu5uqw8EW31lRA8pJXDMVvOcHlko4r tZcbuZPZvIm3xTWQEtdw1R+6HL54kU9xNnEsZQ== X-Received: from badhri.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:6442]) (user=badhri job=sendgmr) by 2002:a17:90b:5292:b0:28b:d1dc:8836 with SMTP id si18-20020a17090b529200b0028bd1dc8836mr381586pjb.5.1705492065692; Wed, 17 Jan 2024 03:47:45 -0800 (PST) Date: Wed, 17 Jan 2024 11:47:42 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Message-ID: <20240117114742.2587779-1-badhri@google.com> Subject: [PATCH v2] Revert "usb: typec: tcpm: fix cc role at port reset" From: Badhri Jagan Sridharan <badhri@google.com> To: gregkh@linuxfoundation.org, linux@roeck-us.net, heikki.krogerus@linux.intel.com Cc: kyletso@google.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, rdbabiera@google.com, amitsd@google.com, stable@vger.kernel.org, frank.wang@rock-chips.com, Badhri Jagan Sridharan <badhri@google.com> Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788337475529372634 X-GMAIL-MSGID: 1788338079474035777 |
Series |
[v2] Revert "usb: typec: tcpm: fix cc role at port reset"
|
|
Commit Message
Badhri Jagan Sridharan
Jan. 17, 2024, 11:47 a.m. UTC
This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434.
Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing
the CC pins, setting CC pins to default state during PORT_RESET
breaks error recovery.
4.5.2.2.2.1 ErrorRecovery State Requirements
The port shall not drive VBUS or VCONN, and shall present a
high-impedance to ground (above zOPEN) on its CC1 and CC2 pins.
Hi-Zing the CC pins is the inteded behavior for PORT_RESET.
CC pins are set to default state after tErrorRecovery in
PORT_RESET_WAIT_OFF.
4.5.2.2.2.2 Exiting From ErrorRecovery State
A Sink shall transition to Unattached.SNK after tErrorRecovery.
A Source shall transition to Unattached.SRC after tErrorRecovery.
Cc: stable@vger.kernel.org
Cc: Frank Wang <frank.wang@rock-chips.com>
Fixes: 1e35f074399d ("usb: typec: tcpm: fix cc role at port reset")
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
---
drivers/usb/typec/tcpm/tcpm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
base-commit: 933bb7b878ddd0f8c094db45551a7daddf806e00
Comments
On 1/17/24 03:47, Badhri Jagan Sridharan wrote: > This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434. > > Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing > the CC pins, setting CC pins to default state during PORT_RESET > breaks error recovery. > > 4.5.2.2.2.1 ErrorRecovery State Requirements > The port shall not drive VBUS or VCONN, and shall present a > high-impedance to ground (above zOPEN) on its CC1 and CC2 pins. > > Hi-Zing the CC pins is the inteded behavior for PORT_RESET. intended > CC pins are set to default state after tErrorRecovery in > PORT_RESET_WAIT_OFF. > > 4.5.2.2.2.2 Exiting From ErrorRecovery State > A Sink shall transition to Unattached.SNK after tErrorRecovery. > A Source shall transition to Unattached.SRC after tErrorRecovery. > Makes sense to me. Reviewed-by: Guenter Roeck <linux@roeck-us.net> > Cc: stable@vger.kernel.org > Cc: Frank Wang <frank.wang@rock-chips.com> > Fixes: 1e35f074399d ("usb: typec: tcpm: fix cc role at port reset") > Signed-off-by: Badhri Jagan Sridharan <badhri@google.com> > --- > drivers/usb/typec/tcpm/tcpm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index 5945e3a2b0f7..9d410718eaf4 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -4876,8 +4876,7 @@ static void run_state_machine(struct tcpm_port *port) > break; > case PORT_RESET: > tcpm_reset_port(port); > - tcpm_set_cc(port, tcpm_default_state(port) == SNK_UNATTACHED ? > - TYPEC_CC_RD : tcpm_rp_cc(port)); > + tcpm_set_cc(port, TYPEC_CC_OPEN); > tcpm_set_state(port, PORT_RESET_WAIT_OFF, > PD_T_ERROR_RECOVERY); > break; > > base-commit: 933bb7b878ddd0f8c094db45551a7daddf806e00
Hi, On Wed, Jan 17, 2024 at 11:47:42AM +0000, Badhri Jagan Sridharan wrote: > This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434. > > Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing > the CC pins, setting CC pins to default state during PORT_RESET > breaks error recovery. > > 4.5.2.2.2.1 ErrorRecovery State Requirements > The port shall not drive VBUS or VCONN, and shall present a > high-impedance to ground (above zOPEN) on its CC1 and CC2 pins. > > Hi-Zing the CC pins is the inteded behavior for PORT_RESET. > CC pins are set to default state after tErrorRecovery in > PORT_RESET_WAIT_OFF. > > 4.5.2.2.2.2 Exiting From ErrorRecovery State > A Sink shall transition to Unattached.SNK after tErrorRecovery. > A Source shall transition to Unattached.SRC after tErrorRecovery. > > Cc: stable@vger.kernel.org > Cc: Frank Wang <frank.wang@rock-chips.com> > Fixes: 1e35f074399d ("usb: typec: tcpm: fix cc role at port reset") > Signed-off-by: Badhri Jagan Sridharan <badhri@google.com> > --- > drivers/usb/typec/tcpm/tcpm.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index 5945e3a2b0f7..9d410718eaf4 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -4876,8 +4876,7 @@ static void run_state_machine(struct tcpm_port *port) > break; > case PORT_RESET: > tcpm_reset_port(port); > - tcpm_set_cc(port, tcpm_default_state(port) == SNK_UNATTACHED ? > - TYPEC_CC_RD : tcpm_rp_cc(port)); > + tcpm_set_cc(port, TYPEC_CC_OPEN); > tcpm_set_state(port, PORT_RESET_WAIT_OFF, > PD_T_ERROR_RECOVERY); > break; Gábor had some concerns with this in v1. thanks,
On Wed, Jan 17, 2024 at 11:47:42AM +0000, Badhri Jagan Sridharan wrote: > This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434. > > Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing > the CC pins, setting CC pins to default state during PORT_RESET > breaks error recovery. Between -rc2 and -rc3 I started seeing boot issues in mainline on rk3399-roc-pc running arm64 defconfig, a bisection identified this patch as having broken things. The issues manifest as a hang while loading modules from the initd, you can see a full boot log at: https://lava.sirena.org.uk/scheduler/job/558789 which shows a bunch of video drivers loading at the end of the log but I suspect that's not related the actual failure. A successful boot can be seen here: https://lava.sirena.org.uk/scheduler/job/559222 I do note that the board is powered by USB PD, I've got it connected to a PD power supply which seems potentially relevant to the commit. The board had been working for a long time, at least as far as boot to initrd goes. Full bisect log: git bisect start # status: waiting for both good and bad commits # bad: [54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478] Linux 6.8-rc3 git bisect bad 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478 # status: waiting for good commit(s), bad commit known # good: [41bccc98fb7931d63d03f326a746ac4d429c1dd3] Linux 6.8-rc2 git bisect good 41bccc98fb7931d63d03f326a746ac4d429c1dd3 # good: [4f18d3fd2975c943be91522d86257806374881b9] Merge tag 'iommu-fixes-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu git bisect good 4f18d3fd2975c943be91522d86257806374881b9 # good: [6b89b6af459fdd6f2741d0c2e33c67af8193697e] Merge tag 'gfs2-v6.8-rc2-revert' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 git bisect good 6b89b6af459fdd6f2741d0c2e33c67af8193697e # good: [bdda52cc664caaf030fdaf51dd715ef5d1f14a26] Merge tag 'i2c-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux git bisect good bdda52cc664caaf030fdaf51dd715ef5d1f14a26 # bad: [0214960971939697f1499239398874cfc3a52d69] Merge tag 'tty-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty git bisect bad 0214960971939697f1499239398874cfc3a52d69 # bad: [3caf2b2ad7334ef35f55b95f3e1b138c6f77b368] usb: ulpi: Fix debugfs directory leak git bisect bad 3caf2b2ad7334ef35f55b95f3e1b138c6f77b368 # good: [7c4650ded49e5b88929ecbbb631efb8b0838e811] xhci: handle isoc Babble and Buffer Overrun events properly git bisect good 7c4650ded49e5b88929ecbbb631efb8b0838e811 # good: [cc509b6a47e7c8998d9e41c273191299d5d9d631] usb: chipidea: core: handle power lost in workqueue git bisect good cc509b6a47e7c8998d9e41c273191299d5d9d631 # good: [b2d2d7ea0dd09802cf5a0545bf54d8ad8987d20c] usb: f_mass_storage: forbid async queue when shutdown happen git bisect good b2d2d7ea0dd09802cf5a0545bf54d8ad8987d20c # bad: [b717dfbf73e842d15174699fe2c6ee4fdde8aa1f] Revert "usb: typec: tcpm: fix cc role at port reset" git bisect bad b717dfbf73e842d15174699fe2c6ee4fdde8aa1f # good: [032178972f8e992b90f9794a13265fec8c8314b0] usb: gadget: pch_udc: fix an Excess kernel-doc warning git bisect good 032178972f8e992b90f9794a13265fec8c8314b0 # first bad commit: [b717dfbf73e842d15174699fe2c6ee4fdde8aa1f] Revert "usb: typec: tcpm: fix cc role at port reset"
Linux regression tracking (Thorsten Leemhuis)
Feb. 10, 2024, 7:38 a.m. UTC |
#4
Addressed
Unaddressed
On 08.02.24 23:01, Mark Brown wrote: > On Wed, Jan 17, 2024 at 11:47:42AM +0000, Badhri Jagan Sridharan wrote: >> This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434. >> >> Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing >> the CC pins, setting CC pins to default state during PORT_RESET >> breaks error recovery. > > Between -rc2 and -rc3 I started seeing boot issues in mainline on > rk3399-roc-pc running arm64 defconfig, a bisection identified this patch > as having broken things. The issues manifest as a hang while loading > modules from the initd, you can see a full boot log at: Thanks for the report. To be sure the issue doesn't fall through the cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression tracking bot: #regzbot ^introduced b717dfbf73e842d15174699fe2c6ee4fdde8a #regzbot title usb: typec: boot issues on rk3399-roc-pc due to revert #regzbot ignore-activity Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) -- Everything you wanna know about Linux kernel regression tracking: https://linux-regtracking.leemhuis.info/about/#tldr That page also explains what to do if mails like this annoy you.
That's exactly what I predicted would happen. Mark Brown <broonie@kernel.org> ezt írta (időpont: 2024. febr. 8., Cs, 23:03): > > On Wed, Jan 17, 2024 at 11:47:42AM +0000, Badhri Jagan Sridharan wrote: > > This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434. > > > > Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing > > the CC pins, setting CC pins to default state during PORT_RESET > > breaks error recovery. > > Between -rc2 and -rc3 I started seeing boot issues in mainline on > rk3399-roc-pc running arm64 defconfig, a bisection identified this patch > as having broken things. The issues manifest as a hang while loading > modules from the initd, you can see a full boot log at: > > https://lava.sirena.org.uk/scheduler/job/558789 > > which shows a bunch of video drivers loading at the end of the log but I > suspect that's not related the actual failure. A successful boot can be > seen here: > > https://lava.sirena.org.uk/scheduler/job/559222 > > I do note that the board is powered by USB PD, I've got it connected to > a PD power supply which seems potentially relevant to the commit. The > board had been working for a long time, at least as far as boot to > initrd goes. > > Full bisect log: > > git bisect start > # status: waiting for both good and bad commits > # bad: [54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478] Linux 6.8-rc3 > git bisect bad 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478 > # status: waiting for good commit(s), bad commit known > # good: [41bccc98fb7931d63d03f326a746ac4d429c1dd3] Linux 6.8-rc2 > git bisect good 41bccc98fb7931d63d03f326a746ac4d429c1dd3 > # good: [4f18d3fd2975c943be91522d86257806374881b9] Merge tag 'iommu-fixes-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu > git bisect good 4f18d3fd2975c943be91522d86257806374881b9 > # good: [6b89b6af459fdd6f2741d0c2e33c67af8193697e] Merge tag 'gfs2-v6.8-rc2-revert' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 > git bisect good 6b89b6af459fdd6f2741d0c2e33c67af8193697e > # good: [bdda52cc664caaf030fdaf51dd715ef5d1f14a26] Merge tag 'i2c-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux > git bisect good bdda52cc664caaf030fdaf51dd715ef5d1f14a26 > # bad: [0214960971939697f1499239398874cfc3a52d69] Merge tag 'tty-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty > git bisect bad 0214960971939697f1499239398874cfc3a52d69 > # bad: [3caf2b2ad7334ef35f55b95f3e1b138c6f77b368] usb: ulpi: Fix debugfs directory leak > git bisect bad 3caf2b2ad7334ef35f55b95f3e1b138c6f77b368 > # good: [7c4650ded49e5b88929ecbbb631efb8b0838e811] xhci: handle isoc Babble and Buffer Overrun events properly > git bisect good 7c4650ded49e5b88929ecbbb631efb8b0838e811 > # good: [cc509b6a47e7c8998d9e41c273191299d5d9d631] usb: chipidea: core: handle power lost in workqueue > git bisect good cc509b6a47e7c8998d9e41c273191299d5d9d631 > # good: [b2d2d7ea0dd09802cf5a0545bf54d8ad8987d20c] usb: f_mass_storage: forbid async queue when shutdown happen > git bisect good b2d2d7ea0dd09802cf5a0545bf54d8ad8987d20c > # bad: [b717dfbf73e842d15174699fe2c6ee4fdde8aa1f] Revert "usb: typec: tcpm: fix cc role at port reset" > git bisect bad b717dfbf73e842d15174699fe2c6ee4fdde8aa1f > # good: [032178972f8e992b90f9794a13265fec8c8314b0] usb: gadget: pch_udc: fix an Excess kernel-doc warning > git bisect good 032178972f8e992b90f9794a13265fec8c8314b0 > # first bad commit: [b717dfbf73e842d15174699fe2c6ee4fdde8aa1f] Revert "usb: typec: tcpm: fix cc role at port reset"
Linux regression tracking (Thorsten Leemhuis)
Feb. 16, 2024, 6:56 a.m. UTC |
#6
Addressed
Unaddressed
On 10.02.24 08:38, Linux regression tracking #adding (Thorsten Leemhuis) wrote: > On 08.02.24 23:01, Mark Brown wrote: >> On Wed, Jan 17, 2024 at 11:47:42AM +0000, Badhri Jagan Sridharan wrote: >>> This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434. >>> >>> Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing >>> the CC pins, setting CC pins to default state during PORT_RESET >>> breaks error recovery. >> >> Between -rc2 and -rc3 I started seeing boot issues in mainline on >> rk3399-roc-pc running arm64 defconfig, a bisection identified this patch >> as having broken things. The issues manifest as a hang while loading >> modules from the initd, you can see a full boot log at: > > Thanks for the report. To be sure the issue doesn't fall through the > cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression > tracking bot: > > #regzbot ^introduced b717dfbf73e842d15174699fe2c6ee4fdde8a > #regzbot title usb: typec: boot issues on rk3399-roc-pc due to revert > #regzbot ignore-activity #regzbot monitor: https://lore.kernel.org/all/20240212-usb-fix-renegade-v1-1-22c43c88d635@kernel.org/ #regzbot fix: usb: typec: tpcm: Fix issues with power being removed during reset #regzbot ignore-activity Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) -- Everything you wanna know about Linux kernel regression tracking: https://linux-regtracking.leemhuis.info/about/#tldr That page also explains what to do if mails like this annoy you.
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 5945e3a2b0f7..9d410718eaf4 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -4876,8 +4876,7 @@ static void run_state_machine(struct tcpm_port *port) break; case PORT_RESET: tcpm_reset_port(port); - tcpm_set_cc(port, tcpm_default_state(port) == SNK_UNATTACHED ? - TYPEC_CC_RD : tcpm_rp_cc(port)); + tcpm_set_cc(port, TYPEC_CC_OPEN); tcpm_set_state(port, PORT_RESET_WAIT_OFF, PD_T_ERROR_RECOVERY); break;