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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user