From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796122632; b=hbMjWH9wvblhsWnm1aI95vcJqAyd3FXW+iZcJJa9GQaeia3tdxHxzN4HztCn2lmiB7ck xjRO6+GhVTp0GkvMCeXH2hUVK7SkgHo+XZ8SWb+HiZSkWJ0Mc2SqxlLwjPzpYLomdg+1R 4aFp8rVBufOUskt5N/Av5cS6idgt7t82Euppug9mOFlBYs4eneg/1ux6zWX6GzIpuyo/z Be7AJJUfkCArqk5/Z1jW9yPFCPLaXb41v6Nu52NC1zAluUqRDRKpHDTU2zTUyK+sHsmfs OOyWcRvgvVeyLW+VRZD3QqJAy7HWQGeEMQMiQMvw77J21NCu7BJNDoqgaASXvyJJYkQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796122632; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=jqlFFBBI/Yf/reBwk6ebFRp7L3XfXvahvQOMh6BBE0c=; b=O+z2knMb8AEDsSfPwLfMorUurHgz4JwDe+by4pVWIrVUQd7PoTkydOckK+mIloqjJNB2 FuNECoJUQtnt35dLs7IfjkGlDR7hqUggVToGrJ+DY4jdjRSaDlZsqd147uT5x3dvHJKOT Q/NefdAulBpN+TME82lxlHQHSuFln8hrHcYqlbe6CkVS8Mvjktoi38sFTyKrzP1ScyXoB gE/Lm9oU3aut3ne8DO4PQoQDEc0NnfnoWHUI/RmDflHI4w1Vi0Z0ze754p/KHNPMW+n3a 6loP9nq60Q/y7ls8AJK9caP16orxnJwV+HeRvtZR2XAzakvsPPbDBAfltkEGDFxM7qg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=lFsnP7tg; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEE45606A31A; Tue, 1 Dec 2026 10:57:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=lFsnP7tg Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93B191F00893; Tue, 1 Dec 2026 10:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796122632; bh=jqlFFBBI/Yf/reBwk6ebFRp7L3XfXvahvQOMh6BBE0c=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=lFsnP7tgu1FpmwVo3MiNwXstRGRlfNuogCvueVLqYdUwLEMYN9g2hk6NWOg7WR+6I +lDl5kasHIohiInUIFzeXyqIRGMB5S3T2QKdEUq1dE8Nl+TerGT7UhOThI5D6tafuS mPqGKIh23BUf0sLb17Jp9BqxC+gaYqS83MQxOP5I= Date: Tue, 1 Dec 2026 11:57:09 +0100 From: Greg Kroah-Hartman To: Amit Sunil Dhamne Cc: Josef Bacik , Alan Stern , linux-kernel@vger.kernel.org, Badhri Jagan Sridharan , Heikki Krogerus , stable , linux-usb@vger.kernel.org Subject: Re: [PATCH 12/19] usb: typec: tcpci: don't act on unread alerts Message-ID: <2026120112-payer-mascot-0528@gregkh> References: <20261027-llm-usb-v1-0-b9751ddb9c7c@linuxfoundation.org> <20261027-llm-usb-v1-12-b9751ddb9c7c@linuxfoundation.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Nov 02, 2026 at 02:23:57PM -0800, Amit Sunil Dhamne wrote: > > +/* > > + * An edge triggered ALERT# does not fire again while an alert is pending, so > > + * don't give up after one failed transfer. No alert if it cannot be read. > > + */ > > +static u16 tcpci_read_alert(struct tcpci *tcpci) > > +{ > > + u16 status; > > + int i; > > + > > + for (i = 0; i < 3; i++) > > + if (!tcpci_read16(tcpci, TCPC_ALERT, &status)) > > + return status; > > Retrying immediately on a transient bus failure is unlikely to help. Add a > small delay before retrying. Please keep in mind the Type-C/PD deadlines > when selecting a delay value. And what are those deadlines, 25–195 microseconds? I'll put in a short delay here and see if that does anything... > > + > > Please add some error log here to indicate consecutive alert read failures. Really? We don't want the kernel log to be spammed by broken hardware. What is an error here going to help with? I'll put in a debugging message, but that should be all that is needed. > > - /* Read complete, clear RX status alert bit */ > > +rx_done: > > Worth logging when you're dropping RX packets (due to ret!=0) given that the > tcpc has already sent a GoodCRC. Ok, will add a debug log message here too. thanks, greg k-h