qca_spi: Count unexpected WRBUF_SPC_AVA after reset
authorStefan Wahren <wahrenst@gmx.net>
Mon, 7 Oct 2024 11:33:11 +0000 (13:33 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Oct 2024 01:00:26 +0000 (18:00 -0700)
After a reset of the QCA7000, the amount of available write buffer
space should match QCASPI_HW_BUF_LEN. If this is not the case
this error should be counted as such.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Link: https://patch.msgid.link/20241007113312.38728-2-wahrenst@gmx.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/qualcomm/qca_spi.c

index 8f7ce6b51a1c9b42f5cf8d120a0f855bc6828643..fde7197372fe8b4d3e1332b73dd2d052e8092f49 100644 (file)
@@ -505,6 +505,7 @@ qcaspi_qca7k_sync(struct qcaspi *qca, int event)
                        if (wrbuf_space != QCASPI_HW_BUF_LEN) {
                                netdev_dbg(qca->net_dev, "sync: got CPU on, but wrbuf not empty. reset!\n");
                                qca->sync = QCASPI_SYNC_UNKNOWN;
+                               qca->stats.buf_avail_err++;
                        } else {
                                netdev_dbg(qca->net_dev, "sync: got CPU on, now in sync\n");
                                qca->sync = QCASPI_SYNC_READY;