aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/sfc/falcon_io.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/sfc/falcon_io.h b/drivers/net/sfc/falcon_io.h
index c16da3149fa9..8883092dae97 100644
--- a/drivers/net/sfc/falcon_io.h
+++ b/drivers/net/sfc/falcon_io.h
@@ -238,18 +238,21 @@ static inline void falcon_writel_page(struct efx_nic *efx, efx_dword_t *value,
238/* Write dword to Falcon page-mapped register with an extra lock. 238/* Write dword to Falcon page-mapped register with an extra lock.
239 * 239 *
240 * As for falcon_writel_page(), but for a register that suffers from 240 * As for falcon_writel_page(), but for a register that suffers from
241 * SFC bug 3181. Take out a lock so the BIU collector cannot be 241 * SFC bug 3181. If writing to page 0, take out a lock so the BIU
242 * confused. */ 242 * collector cannot be confused.
243 */
243static inline void falcon_writel_page_locked(struct efx_nic *efx, 244static inline void falcon_writel_page_locked(struct efx_nic *efx,
244 efx_dword_t *value, 245 efx_dword_t *value,
245 unsigned int reg, 246 unsigned int reg,
246 unsigned int page) 247 unsigned int page)
247{ 248{
248 unsigned long flags; 249 unsigned long flags = 0;
249 250
250 spin_lock_irqsave(&efx->biu_lock, flags); 251 if (page == 0)
252 spin_lock_irqsave(&efx->biu_lock, flags);
251 falcon_writel(efx, value, FALCON_PAGED_REG(page, reg)); 253 falcon_writel(efx, value, FALCON_PAGED_REG(page, reg));
252 spin_unlock_irqrestore(&efx->biu_lock, flags); 254 if (page == 0)
255 spin_unlock_irqrestore(&efx->biu_lock, flags);
253} 256}
254 257
255#endif /* EFX_FALCON_IO_H */ 258#endif /* EFX_FALCON_IO_H */