linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: brcmfmac bus level addressing issues.
@ 2017-07-18  9:45 Ian Molton
  2017-07-18 10:35 ` Hante Meuleman
  0 siblings, 1 reply; 10+ messages in thread
From: Ian Molton @ 2017-07-18  9:45 UTC (permalink / raw)
  To: linux-wireless; +Cc: Arend Van Spriel, Franky Lin, Hante Meuleman

Hi folks,

Its come to my attention that there is a substantial disparity between
the PCIe and SDIO variants of the driver when it comes to handlign
writes via the backplane.

The SDIO bus code checks, upon every (32 bit) access, wether the
backplane window is in the right place, and only updates it if it has
actually changed.

The PCIe code sets the window *regardless* of wether its changed, on
*every single* write.

The SDIO code has no explicit selection of the window address based on
the core selected.

The PCIe code uses brcmf_pcie_select_core(), which, ultimately, appears
to be totally redundant, due to the above mentioned 32 bit access code
setting the window register regardless of its current value.

------------------------------------

Can we standardise how this is supposed to work? Its ugly, and its going
to cause bugs, ultimately. I suspect its probably the cause of the code
I mentioned in my recent patch titled "brcmfmac: HACK - stabilise the
value of ->sbwad in use for some xfer routines."

We really *dont* want to call brcmf_pcie_select_core() all over the
place. Its inefficient, traversing a list as it does, when all it does
is return a pointer that never actually changes, to the core structures
that contain addressing info.

I'd propose we do what I've done in my SDIO patch set - we call
brcmf_chip_get_core() *once* after the chip has been probed, and store
the pointer returned.

The window register setting can be hidden in the read32/write32 buscore
ops, and will never be incorrect from that point, and the code can
simply use a flat address space model. A single if() has got to be less
costly than writing the register on overy single read32/write32...

Anyhow, whatever we decide to do, can we do the same thing in both bus
drivers?

-Ian

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

end of thread, other threads:[~2017-07-19 19:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-18  9:45 RFC: brcmfmac bus level addressing issues Ian Molton
2017-07-18 10:35 ` Hante Meuleman
2017-07-18 11:27   ` Ian Molton
     [not found]     ` <6fe08666ca09bf3c1d4476fdad8ce97a@mail.gmail.com>
     [not found]       ` <222e2bc1-4d8f-8133-4fa7-51a48f3de785@mnementh.co.uk>
2017-07-18 15:14         ` Ian Molton
2017-07-18 20:44           ` Arend van Spriel
2017-07-18 22:45             ` Ian Molton
2017-07-19  8:39               ` Hante Meuleman
2017-07-19  9:33                 ` Ian Molton
2017-07-19 11:47               ` Arend van Spriel
2017-07-19 19:25                 ` Ian Molton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).