]> err.no Git - linux-2.6/commit
firewire: fw-ohci: enforce read order for selfID generation
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 25 Aug 2007 12:08:19 +0000 (14:08 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 16 Oct 2007 22:00:05 +0000 (00:00 +0200)
commitee71c2f9ee85117e41ef87357ed8f75d29369b98
tree9bb749909370ec732ed730ca80553908913156af
parentdf8ec2490fed5dd23316bbb2c2e90e59e7d37126
firewire: fw-ohci: enforce read order for selfID generation

It seems unlikely, but access to self_id_cpu[0] could at least in theory
be deferred until after the loop over self_id_cpu[1..n] or even after
the subsequent reg_read.  Enforce the desired order by a read barrier.

Also prevent the reg_read from being reordered relative to the for loop.
This isn't necessary if the loop's conditional printk counts as an
implicit barrier, but better make it explicit.

(self_id_cpu[] is a coherent DMA buffer.)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/fw-ohci.c