Closed philipl closed 7 years ago
Unfortunately that code has come direct from Broadcom with no commit messages after they open sourced it. Best guess looking at the code is that READ in this context means it's reading from the device to DMA and hence DMA is getting written to.
I'm not convinced that get_user_pages_remote is the right thing to use, and get_user_pages() is usable in 4.9+.
Note that the 'rw == READ' thing is very suspicious. That was the 'write' flag but we check if our mode is READ. In the new API it's a flag so the weirdness is even more obvious.