mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] brcmfmac: remove unreachable poll mode for sdio
@ 2025-06-21 11:29 Rouven Czerwinski
  2025-06-21 11:29 ` [PATCH 2/2] brcmfmac: remove always true variable and code Rouven Czerwinski
  2025-07-08 16:32 ` [PATCH 1/2] brcmfmac: remove unreachable poll mode for sdio Arend Van Spriel
  0 siblings, 2 replies; 5+ messages in thread
From: Rouven Czerwinski @ 2025-06-21 11:29 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: kernel, Rouven Czerwinski, linux-wireless, brcm80211,
	brcm80211-dev-list.pdl, linux-kernel

The sdio interface implements an unreachable poll mode. Remove it since
the code can't be reached, if the poll mode needs to be implemented it
can simply be resurrected using the usual git means.

Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
---
 .../broadcom/brcm80211/brcmfmac/sdio.c        | 48 +------------------
 1 file changed, 2 insertions(+), 46 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index cf26ab15ee0c..26e09a7acb02 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -404,7 +404,6 @@ struct brcmf_sdio_hdrinfo {
 struct brcmf_sdio_count {
 	uint intrcount;		/* Count of device interrupt callbacks */
 	uint lastintrs;		/* Count as of last watchdog timer */
-	uint pollcnt;		/* Count of active polls */
 	uint regfails;		/* Count of R_REG failures */
 	uint tx_sderrs;		/* Count of tx attempts with sd errors */
 	uint fcqueued;		/* Tx packets that got queued */
@@ -476,11 +475,8 @@ struct brcmf_sdio {
 	u8 sdpcm_ver;	/* Bus protocol reported by dongle */
 
 	bool intr;		/* Use interrupts */
-	bool poll;		/* Use polling */
 	atomic_t ipend;		/* Device interrupt is pending */
 	uint spurious;		/* Count of spurious interrupts */
-	uint pollrate;		/* Ticks between device polls */
-	uint polltick;		/* Tick counter */
 
 #ifdef DEBUG
 	uint console_interval;
@@ -3178,7 +3174,7 @@ static int brcmf_debugfs_sdio_count_read(struct seq_file *seq, void *data)
 
 	seq_printf(seq,
 		   "intrcount:    %u\nlastintrs:    %u\n"
-		   "pollcnt:      %u\nregfails:     %u\n"
+		   "pollcnt:       0\nregfails:     %u\n"
 		   "tx_sderrs:    %u\nfcqueued:     %u\n"
 		   "rxrtx:        %u\nrx_toolong:   %u\n"
 		   "rxc_errors:   %u\nrx_hdrfail:   %u\n"
@@ -3192,7 +3188,7 @@ static int brcmf_debugfs_sdio_count_read(struct seq_file *seq, void *data)
 		   "tx_ctlpkts:   %lu\nrx_ctlerrs:   %lu\n"
 		   "rx_ctlpkts:   %lu\nrx_readahead: %lu\n",
 		   sdcnt->intrcount, sdcnt->lastintrs,
-		   sdcnt->pollcnt, sdcnt->regfails,
+		   sdcnt->regfails,
 		   sdcnt->tx_sderrs, sdcnt->fcqueued,
 		   sdcnt->rxrtx, sdcnt->rx_toolong,
 		   sdcnt->rxc_errors, sdcnt->rx_hdrfail,
@@ -3669,43 +3665,6 @@ static void brcmf_sdio_bus_watchdog(struct brcmf_sdio *bus)
 {
 	brcmf_dbg(TIMER, "Enter\n");
 
-	/* Poll period: check device if appropriate. */
-	if (!bus->sr_enabled &&
-	    bus->poll && (++bus->polltick >= bus->pollrate)) {
-		u32 intstatus = 0;
-
-		/* Reset poll tick */
-		bus->polltick = 0;
-
-		/* Check device if no interrupts */
-		if (!bus->intr ||
-		    (bus->sdcnt.intrcount == bus->sdcnt.lastintrs)) {
-
-			if (!bus->dpc_triggered) {
-				u8 devpend;
-
-				sdio_claim_host(bus->sdiodev->func1);
-				devpend = brcmf_sdiod_func0_rb(bus->sdiodev,
-						  SDIO_CCCR_INTx, NULL);
-				sdio_release_host(bus->sdiodev->func1);
-				intstatus = devpend & (INTR_STATUS_FUNC1 |
-						       INTR_STATUS_FUNC2);
-			}
-
-			/* If there is something, make like the ISR and
-				 schedule the DPC */
-			if (intstatus) {
-				bus->sdcnt.pollcnt++;
-				atomic_set(&bus->ipend, 1);
-
-				bus->dpc_triggered = true;
-				queue_work(bus->brcmf_wq, &bus->datawork);
-			}
-		}
-
-		/* Update interrupt tracking */
-		bus->sdcnt.lastintrs = bus->sdcnt.intrcount;
-	}
 #ifdef DEBUG
 	/* Poll for console output periodically */
 	if (bus->sdiodev->state == BRCMF_SDIOD_DATA && BRCMF_FWCON_ON() &&
@@ -4080,9 +4039,6 @@ brcmf_sdio_probe_attach(struct brcmf_sdio *bus)
 
 	/* Set the poll and/or interrupt flags */
 	bus->intr = true;
-	bus->poll = false;
-	if (bus->poll)
-		bus->pollrate = 1;
 
 	return 0;
 
-- 
2.49.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-15  8:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-21 11:29 [PATCH 1/2] brcmfmac: remove unreachable poll mode for sdio Rouven Czerwinski
2025-06-21 11:29 ` [PATCH 2/2] brcmfmac: remove always true variable and code Rouven Czerwinski
2025-06-22  3:58   ` kernel test robot
2025-07-08 16:32 ` [PATCH 1/2] brcmfmac: remove unreachable poll mode for sdio Arend Van Spriel
2025-07-15  8:30   ` Rouven Czerwinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®