Skip to contentSkip to conversation

sfc: remove efx_writed_page_locked

PATCH Applied [email protected] 3 participants 3 messages Dec 18, 2024 – Dec 20, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sfc: remove efx_writed_page_locked

From: Andy Moreton <[email protected]>

From: Andy Moreton <[email protected]>

efx_writed_page_locked is a workaround for Siena hardware that is not needed on later adapters, and has no callers. Remove it.

---
 drivers/net/ethernet/sfc/io.h | 24 ------------------------
 1 file changed, 24 deletions(-)
drivers/net/ethernet/sfc/io.h +0 -24
index 4cc7b501135f..ef374a8e05c3 100644
@@ -217,28 +217,4 @@ _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value,
 					   (reg) != 0xa1c),		\
 			 page)
 
-/* Write TIMER_COMMAND.  This is a page-mapped 32-bit CSR, but a bug
- * in the BIU means that writes to TIMER_COMMAND[0] invalidate the
- * collector register.
- */
-static inline void _efx_writed_page_locked(struct efx_nic *efx,
-					   const efx_dword_t *value,
-					   unsigned int reg,
-					   unsigned int page)
-{
-	unsigned long flags __attribute__ ((unused));
-
-	if (page == 0) {
-		spin_lock_irqsave(&efx->biu_lock, flags);
-		efx_writed(efx, value, efx_paged_reg(efx, page, reg));
-		spin_unlock_irqrestore(&efx->biu_lock, flags);
-	} else {
-		efx_writed(efx, value, efx_paged_reg(efx, page, reg));
-	}
-}
-#define efx_writed_page_locked(efx, value, reg, page)			\
-	_efx_writed_page_locked(efx, value,				\
-				reg + BUILD_BUG_ON_ZERO((reg) != 0x420), \
-				page)
-
 #endif /* EFX_IO_H */
#1 lore raw

From: Edward.cree <[email protected]>
Date: Wed, 18 Dec 2024 13:59:30 +0000

Quoted 3 lines

From: Andy Moreton <[email protected]>

From: Andy Moreton <[email protected]>

The patch is fine, but here clearly should be only one "From:" line.

Quoted 33 lines

efx_writed_page_locked is a workaround for Siena hardware that is not needed on later adapters, and has no callers. Remove it.

---
 drivers/net/ethernet/sfc/io.h | 24 ------------------------
 1 file changed, 24 deletions(-)
drivers/net/ethernet/sfc/io.h +0 -15
index 4cc7b501135f..ef374a8e05c3 100644
@@ -217,28 +217,4 @@ _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value,
 					   (reg) != 0xa1c),		\
 			 page)
 
-/* Write TIMER_COMMAND.  This is a page-mapped 32-bit CSR, but a bug
- * in the BIU means that writes to TIMER_COMMAND[0] invalidate the
- * collector register.
- */
-static inline void _efx_writed_page_locked(struct efx_nic *efx,
-					   const efx_dword_t *value,
-					   unsigned int reg,
-					   unsigned int page)
-{
-	unsigned long flags __attribute__ ((unused));
-
-	if (page == 0) {
-		spin_lock_irqsave(&efx->biu_lock, flags);
-		efx_writed(efx, value, efx_paged_reg(efx, page, reg));
-		spin_unlock_irqrestore(&efx->biu_lock, flags);

drivers/net/ethernet/sfc/io.h _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value, · line 220

Quoted 10 lines
drivers/net/ethernet/sfc/io.h +0 -9
-	} else {
-		efx_writed(efx, value, efx_paged_reg(efx, page, reg));
-	}
-}
-#define efx_writed_page_locked(efx, value, reg, page)			\
-	_efx_writed_page_locked(efx, value,				\
-				reg + BUILD_BUG_ON_ZERO((reg) != 0x420), \
-				page)
-
 #endif /* EFX_IO_H */

Thanks,
Olek

#2 lore raw
In reply to [email protected]
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 18 Dec 2024 13:59:30 +0000 you wrote:

From: Andy Moreton <[email protected]>

From: Andy Moreton <[email protected]>

efx_writed_page_locked is a workaround for Siena hardware that is not needed on later adapters, and has no callers. Remove it.

[...]

Here is the summary with links:
- [net-next] sfc: remove efx_writed_page_locked

    https://git.kernel.org/netdev/net-next/c/455e135c3042

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html