From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Amit Sunil Dhamne <amitsd@google.com>
Cc: Josef Bacik <josef@toxicpanda.com>,
Alan Stern <stern@rowland.harvard.edu>,
linux-kernel@vger.kernel.org,
Badhri Jagan Sridharan <badhri@google.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
stable <stable@kernel.org>,
linux-usb@vger.kernel.org
Subject: Re: [PATCH 12/19] usb: typec: tcpci: don't act on unread alerts
Date: Tue, 1 Dec 2026 11:57:09 +0100 [thread overview]
Message-ID: <2026120112-payer-mascot-0528@gregkh> (raw)
In-Reply-To: <d1557c0a-e82a-4eb6-bc91-d8106e1961f2@google.com>
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
next prev parent reply other threads:[~2026-12-01 10:57 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 14:57 [PATCH 00/19] USB: a bunch of llm-found fixes Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 01/19] usb: core: sysfs: take the port lock to read the BOS Greg Kroah-Hartman
2026-11-05 21:17 ` Alan Stern
2026-10-27 14:57 ` [PATCH 02/19] USB: core: signal the end of an sg request last Greg Kroah-Hartman
2026-11-05 21:08 ` Alan Stern
2026-10-27 14:57 ` [PATCH 03/19] usbip: vudc: free the unlink item if the send fails Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 04/19] usb: host: oxu210hp-hcd: fix oxu_qh_alloc() deadlock Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 05/19] usb: cdns3: switch the role unlocked on resume Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 06/19] usb: gadget: snps_udc_plat: lock out the interrupt Greg Kroah-Hartman
2026-10-27 18:17 ` Herve Codina
2026-10-27 14:57 ` [PATCH 07/19] usb: gadget: bdc: the resume callback is optional Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 08/19] usb: gadget: uvc: fix oops on a premature STREAMON Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 09/19] usb: gadget: f_fs: let the request keep its fence Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 10/19] usb: host: ehci-orion: fix the probe without DT Greg Kroah-Hartman
2026-11-05 21:20 ` Alan Stern
2026-10-27 14:57 ` [PATCH 11/19] usb: typec: tcpm: don't wait for the VDM discovery work Greg Kroah-Hartman
2026-11-06 12:49 ` Heikki Krogerus
2026-10-27 14:57 ` [PATCH 12/19] usb: typec: tcpci: don't act on unread alerts Greg Kroah-Hartman
2026-11-02 22:23 ` Amit Sunil Dhamne
2026-12-01 10:44 ` Greg Kroah-Hartman
2026-12-01 10:57 ` Greg Kroah-Hartman [this message]
2026-10-27 14:57 ` [PATCH 13/19] usb: typec: anx7411: zero on-stack alt mode descriptors Greg Kroah-Hartman
2026-10-28 16:20 ` Benson Leung
2026-11-06 12:51 ` Heikki Krogerus
2026-10-27 14:57 ` [PATCH 14/19] usb: typec: mux: it5205: fix oops on accessory modes Greg Kroah-Hartman
2026-11-06 14:54 ` Heikki Krogerus
2026-12-01 10:43 ` Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 15/19] usb: typec: mux: tusb1046: " Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 16/19] usb: renesas_usbhs: link URBs with interrupts disabled Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 17/19] usb: renesas_usbhs: unlink the URB if it is not queued Greg Kroah-Hartman
2026-10-27 14:57 ` [PATCH 18/19] usb: isp1760: wait for the TT clear in endpoint_disable Greg Kroah-Hartman
2026-10-27 15:21 ` Rui Miguel Silva
2026-10-27 14:57 ` [PATCH 19/19] usb: dwc2: " Greg Kroah-Hartman
2026-11-02 9:04 ` [PATCH 00/19] USB: a bunch of llm-found fixes Romain Gantois
2026-11-02 9:07 ` Romain Gantois
2026-11-02 9:06 ` Romain Gantois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2026120112-payer-mascot-0528@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=amitsd@google.com \
--cc=badhri@google.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=josef@toxicpanda.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stable@kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox