firewire: ohci: prevent aliasing of locally handled register addresses
authorClemens Ladisch <clemens@ladisch.de>
Mon, 12 Apr 2010 08:35:30 +0000 (10:35 +0200)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Mon, 19 Apr 2010 17:58:32 +0000 (19:58 +0200)
We must compute the offset from the CSR register base with the
full 48 address bits to prevent matching with addresses whose
lower 32 bits happen to be equal with one of the specially
handled registers.

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

index e33917bf97d28eb803699e46f4dfb46860ec1b45..82fb2e7e99ef337affedb52a1c7d715aa8894e93 100644 (file)
@@ -1198,8 +1198,7 @@ static void handle_local_lock(struct fw_ohci *ohci,
 
 static void handle_local_request(struct context *ctx, struct fw_packet *packet)
 {
-       u64 offset;
-       u32 csr;
+       u64 offset, csr;
 
        if (ctx == &ctx->ohci->at_request_ctx) {
                packet->ack = ACK_PENDING;