firewire: ohci: 0 may be a valid DMA address
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Wed, 14 Oct 2009 18:40:10 +0000 (20:40 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Sat, 31 Oct 2009 10:40:51 +0000 (11:40 +0100)
commit19593ffdb6daa6ba691d247a2400cece12687c52
tree18c3508bbdb5f2d1b1bf51ac653ec580043a9340
parent5b189bf3633c3b73d4f08124a86f3e019953d412
firewire: ohci: 0 may be a valid DMA address

I was told that there are obscure architectures with non-coherent DMA
which may DMA-map to bus address 0.  We shall not use 0 as a magic
number of uninitialized bus address variables.

The packet->payload_length > 0 test cannot be used either (except in
at_context_queue_packet) because local requests are not DMA-mapped
regardless of payload_length.  Hence add a state flag to struct
fw_packet.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/core-transaction.c
drivers/firewire/ohci.c
include/linux/firewire.h