Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206811
b: refs/heads/master
c: 27a2329
h: refs/heads/master
i:
  206809: 231607d
  206807: a64bbad
v: v3
  • Loading branch information
Clemens Ladisch committed Jun 10, 2010
1 parent 8059d75 commit 0c50f91
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 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: a48777e03ad53777ed119a5f86dd22a6c5a378ad
refs/heads/master: 27a2329f8235d6ce637463f5d83e98d760ef006e
14 changes: 11 additions & 3 deletions trunk/drivers/firewire/core-transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,17 @@ static void handle_registers(struct fw_card *card, struct fw_request *request,
rcode = RCODE_TYPE_ERROR;
break;

case CSR_BUSY_TIMEOUT:
if (tcode == TCODE_READ_QUADLET_REQUEST)
*data = cpu_to_be32(card->driver->
read_csr_reg(card, CSR_BUSY_TIMEOUT));
else if (tcode == TCODE_WRITE_QUADLET_REQUEST)
card->driver->write_csr_reg(card, CSR_BUSY_TIMEOUT,
be32_to_cpu(*data));
else
rcode = RCODE_TYPE_ERROR;
break;

case CSR_BROADCAST_CHANNEL:
if (tcode == TCODE_READ_QUADLET_REQUEST)
*data = cpu_to_be32(card->broadcast_channel);
Expand All @@ -1140,9 +1151,6 @@ static void handle_registers(struct fw_card *card, struct fw_request *request,
BUG();
break;

case CSR_BUSY_TIMEOUT:
/* FIXME: Implement this. */

default:
rcode = RCODE_ADDRESS_ERROR;
break;
Expand Down
14 changes: 13 additions & 1 deletion trunk/drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,8 @@ static int ohci_enable(struct fw_card *card,
reg_write(ohci, OHCI1394_ATRetries,
OHCI1394_MAX_AT_REQ_RETRIES |
(OHCI1394_MAX_AT_RESP_RETRIES << 4) |
(OHCI1394_MAX_PHYS_RESP_RETRIES << 8));
(OHCI1394_MAX_PHYS_RESP_RETRIES << 8) |
(200 << 16));

seconds = lower_32_bits(get_seconds());
reg_write(ohci, OHCI1394_IsochronousCycleTimer, seconds << 25);
Expand Down Expand Up @@ -2023,6 +2024,10 @@ static u32 ohci_read_csr_reg(struct fw_card *card, int csr_offset)
spin_unlock_irqrestore(&ohci->lock, flags);
return value;

case CSR_BUSY_TIMEOUT:
value = reg_read(ohci, OHCI1394_ATRetries);
return (value >> 4) & 0x0ffff00f;

default:
WARN_ON(1);
return 0;
Expand Down Expand Up @@ -2053,6 +2058,13 @@ static void ohci_write_csr_reg(struct fw_card *card, int csr_offset, u32 value)
spin_unlock_irqrestore(&ohci->lock, flags);
break;

case CSR_BUSY_TIMEOUT:
value = (value & 0xf) | ((value & 0xf) << 4) |
((value & 0xf) << 8) | ((value & 0x0ffff000) << 4);
reg_write(ohci, OHCI1394_ATRetries, value);
flush_writes(ohci);
break;

default:
WARN_ON(1);
break;
Expand Down

0 comments on commit 0c50f91

Please sign in to comment.