diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-10-14 20:40:10 +0200 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-10-31 11:40:51 +0100 |
commit | 19593ffdb6daa6ba691d247a2400cece12687c52 (patch) | |
tree | 18c3508bbdb5f2d1b1bf51ac653ec580043a9340 /drivers/firewire/core-transaction.c | |
parent | 5b189bf3633c3b73d4f08124a86f3e019953d412 (diff) | |
download | lwn-19593ffdb6daa6ba691d247a2400cece12687c52.tar.gz lwn-19593ffdb6daa6ba691d247a2400cece12687c52.zip |
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>
Diffstat (limited to 'drivers/firewire/core-transaction.c')
-rw-r--r-- | drivers/firewire/core-transaction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c index 66789c3cc561..842739df23e2 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -226,7 +226,7 @@ static void fw_fill_request(struct fw_packet *packet, int tcode, int tlabel, packet->speed = speed; packet->generation = generation; packet->ack = 0; - packet->payload_bus = 0; + packet->payload_mapped = false; } /** @@ -601,7 +601,7 @@ void fw_fill_response(struct fw_packet *response, u32 *request_header, WARN(1, KERN_ERR "wrong tcode %d", tcode); } - response->payload_bus = 0; + response->payload_mapped = false; } EXPORT_SYMBOL(fw_fill_response); |