All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wu. JackBB (GSM)" <JackBB_Wu@compal.com>
To: "netdev-bot+sashiko@kernel.org" <netdev-bot+sashiko@kernel.org>
Cc: "loic.poulain@oss.qualcomm.com" <loic.poulain@oss.qualcomm.com>,
	"ryazanov.s.a@gmail.com" <ryazanov.s.a@gmail.com>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"wen-zhi.huang@mediatek.com" <wen-zhi.huang@mediatek.com>,
	"shi-wei.yeh@mediatek.com" <shi-wei.yeh@mediatek.com>,
	"Minano.tseng@mediatek.com" <Minano.tseng@mediatek.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>,
	"horms@kernel.org" <horms@kernel.org>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"skhan@linuxfoundation.org" <skhan@linuxfoundation.org>,
	"Yu. Robert (GSM)" <robert_yu@compal.com>,
	"Chang. Jeff (GSM)" <Jeff_Chang@compal.com>,
	"edumazet@kernel.org" <edumazet@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>
Subject: Re: [PATCH net-next v13 3/6] net: wwan: t9xx: Add control DMA interface
Date: Mon, 30 Nov 2026 08:01:53 +0000	[thread overview]
Message-ID: <4cd612a5ec1b4cb1a56184797f0fbcc1@compal.com> (raw)
In-Reply-To: <179593796434.3146.14992460300155341559@kernel.org>

Thanks for the review.

> The comments in mtk_cldma_hw_recovery() and mtk_cldma_drv_init() say the
> device can switch the CLDMA block's power domain off by itself. Is
> anything holding the domain on for this sequence?
>
> mtk_cldma_start_xfer()
>     mtk_cldma_get_tx_start_addr()      <- reads a non-zero address
>     [device gates the power domain here]
>     mtk_cldma_resume_queue() / mtk_cldma_start_queue()   <- write lost
>
> rearm_lock and ring_lock only serialize the host side. As far as I can
> tell, nothing stops the device from gating the domain between the address
> check and the doorbell write.
>
> If the write is lost, the descriptor stays at HWO=1, no XFER_DONE comes
> in and tx_done_work never runs. The queue then seems to stay stuck until
> a later TX submission reads the zero start address and recovers. In a
> request/response control exchange that is waiting for the reply to the
> stuck message, that later submission may never happen.
>
> The same applies if the domain is still off when mtk_cldma_hw_recovery()
> runs. The register rewrites in mtk_cldma_rearm_queues() would be lost and
> the read-back would be zero. The TX then fails with -EIO and gets flushed,
> and the device is never woken.
>
> I couldn't find a device sleep lock, a wake handshake or any pm_runtime
> use in the t9xx tree, including in the later patches of the series. For
> comparison, the t7xx CLDMA send path calls t7xx_pci_disable_sleep() and
> waits for t7xx_pci_sleep_disable_complete() before it touches CLDMA
> registers. Does this driver need a similar handshake?

Will fix in v14: probe holds the device's low-power state off, with the
same DISABLE_ASPM_LOWPWR write t7xx does in t7xx_pci_pm_init(), waits
for the device to report its resources active, and this series never
releases it, so the block is not gated while the driver is bound.  The
comments in mtk_cldma_hw_recovery() and mtk_cldma_drv_init() are
reworded to match.

> This isn't a bug, but the commit message doesn't mention that these writes
> turn ILLEGAL_MEMORY_CHECK off for both TX and RX. With the check off, the
> engine no longer flags a zero GPD/BD/data pointer.
>
> The commit message also doesn't mention that any TX kick can
> re-initialize the whole instance:
>
> mtk_cldma_start_xfer()
>     if (unlikely(!val))
>         mtk_cldma_hw_recovery()
>             mtk_cldma_rearm_queues()
>                 mtk_cldma_drv_init()
>                 reprograms every published TX queue
>                 sets need_restart on every RX queue
>
> The only reset behaviour the changelog describes is the escalation when a
> queue stop times out:
>
>   A queue that does not stop within the poll escalates to a reset of
>   its CLDMA instance, which also cuts the instance's other queues.
>
> Could both of these changes be described in the commit message? None of
> the later patches in the series describe them either.

Will fix in v14: the commit message says that mtk_cldma_drv_init() turns
the illegal memory check off for TX and RX, and that the check only
flags a zero GPD, BD or data pointer through an L3 interrupt the driver
does not service.  It also describes the second way into the re-arm: a
TX submission that reads a zero start address rewrites the configuration
and re-arms every open queue of the instance, like the reset after a
stop timeout.

Thanks,
Jack
--
pw-bot: cr

  reply	other threads:[~2026-11-30  8:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25  6:27 [PATCH net-next v13 0/6] net: wwan: t9xx: Add MediaTek T9XX WWAN driver Jack Wu
2026-11-25  6:27 ` Jack Wu via B4 Relay
2026-11-25  6:27 ` [PATCH net-next v13 1/6] net: wwan: t9xx: Add PCIe core Jack Wu
2026-11-25  6:27   ` Jack Wu via B4 Relay
2026-11-29  7:39   ` netdev-bot+sashiko
2026-11-30  7:58     ` Wu. JackBB (GSM)
2026-11-25  6:27 ` [PATCH net-next v13 2/6] net: wwan: t9xx: Add control plane transaction layer framework Jack Wu
2026-11-25  6:27   ` Jack Wu via B4 Relay
2026-11-25  6:27 ` [PATCH net-next v13 3/6] net: wwan: t9xx: Add control DMA interface Jack Wu
2026-11-25  6:27   ` Jack Wu via B4 Relay
2026-11-29  7:39   ` netdev-bot+sashiko
2026-11-30  8:01     ` Wu. JackBB (GSM) [this message]
2026-11-30 10:51   ` Loic Poulain
2026-12-01  3:06     ` Wu. JackBB (GSM)
2026-11-25  6:27 ` [PATCH net-next v13 4/6] net: wwan: t9xx: Add control port Jack Wu
2026-11-25  6:27   ` Jack Wu via B4 Relay
2026-11-29  7:39   ` netdev-bot+sashiko
2026-11-30  8:02     ` Wu. JackBB (GSM)
2026-11-25  6:27 ` [PATCH net-next v13 5/6] net: wwan: t9xx: Add FSM thread Jack Wu
2026-11-25  6:27   ` Jack Wu via B4 Relay
2026-11-29  7:39   ` netdev-bot+sashiko
2026-11-30  8:04     ` Wu. JackBB (GSM)
2026-11-25  6:27 ` [PATCH net-next v13 6/6] net: wwan: t9xx: Add AT & MBIM WWAN ports Jack Wu
2026-11-25  6:27   ` Jack Wu via B4 Relay

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=4cd612a5ec1b4cb1a56184797f0fbcc1@compal.com \
    --to=jackbb_wu@compal.com \
    --cc=Jeff_Chang@compal.com \
    --cc=Minano.tseng@mediatek.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robert_yu@compal.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=shi-wei.yeh@mediatek.com \
    --cc=skhan@linuxfoundation.org \
    --cc=wen-zhi.huang@mediatek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.