Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172672
b: refs/heads/master
c: 19593ff
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Oct 31, 2009
1 parent 8066e1f commit 8f6b2f5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b189bf3633c3b73d4f08124a86f3e019953d412
refs/heads/master: 19593ffdb6daa6ba691d247a2400cece12687c52
4 changes: 2 additions & 2 deletions trunk/drivers/firewire/core-transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -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);

Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,8 @@ static int at_context_queue_packet(struct context *ctx,
packet->ack = RCODE_SEND_ERROR;
return -1;
}
packet->payload_bus = payload_bus;
packet->payload_bus = payload_bus;
packet->payload_mapped = true;

d[2].req_count = cpu_to_le16(packet->payload_length);
d[2].data_address = cpu_to_le32(payload_bus);
Expand Down Expand Up @@ -1023,7 +1024,7 @@ static int at_context_queue_packet(struct context *ctx,
*/
if (ohci->generation != packet->generation ||
reg_read(ohci, OHCI1394_IntEventSet) & OHCI1394_busReset) {
if (packet->payload_length > 0)
if (packet->payload_mapped)
dma_unmap_single(ohci->card.device, payload_bus,
packet->payload_length, DMA_TO_DEVICE);
packet->ack = RCODE_GENERATION;
Expand Down Expand Up @@ -1059,7 +1060,7 @@ static int handle_at_packet(struct context *context,
/* This packet was cancelled, just continue. */
return 1;

if (packet->payload_bus)
if (packet->payload_mapped)
dma_unmap_single(ohci->card.device, packet->payload_bus,
packet->payload_length, DMA_TO_DEVICE);

Expand Down Expand Up @@ -1723,7 +1724,7 @@ static int ohci_cancel_packet(struct fw_card *card, struct fw_packet *packet)
if (packet->ack != 0)
goto out;

if (packet->payload_bus)
if (packet->payload_mapped)
dma_unmap_single(ohci->card.device, packet->payload_bus,
packet->payload_length, DMA_TO_DEVICE);

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/firewire.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ struct fw_packet {
void *payload;
size_t payload_length;
dma_addr_t payload_bus;
bool payload_mapped;
u32 timestamp;

/*
Expand Down

0 comments on commit 8f6b2f5

Please sign in to comment.