]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: pcie: read FROMDEVICE DMA-able memory with READ_ONCE()
authorBrian Norris <briannorris@chromium.org>
Fri, 13 Jan 2017 23:35:38 +0000 (15:35 -0800)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 20 Jan 2017 09:46:32 +0000 (11:46 +0200)
commitdc70a581cf9d77cac65fbf012dfc05dd7fe55ceb
treef53c57b080cb76a36b808d502ad6b0b454e69fa2
parent19e574f7054b58f176413bbe13acd7ea1092437d
mwifiex: pcie: read FROMDEVICE DMA-able memory with READ_ONCE()

In mwifiex_delay_for_sleep_cookie(), we're looping and waiting for the
PCIe endpoint to write a magic value back to memory, to signal that it
has finished going to sleep. We're not letting the compiler know that
this might change underneath our feet though. Let's do that, for good
hygiene.

I'm not aware of this fixing any concrete problems. I also give no
guarantee that this loop is actually correct in any other way, but at
least this looks like an improvement to me.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/pcie.c