diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2010-06-10 08:34:13 +0200 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2010-06-10 08:34:13 +0200 |
commit | 27a2329f8235d6ce637463f5d83e98d760ef006e (patch) | |
tree | dcc3b1a62d92d407f38744a93914742e9eed1816 /drivers/firewire/core-transaction.c | |
parent | a48777e03ad53777ed119a5f86dd22a6c5a378ad (diff) | |
download | blackbird-obmc-linux-27a2329f8235d6ce637463f5d83e98d760ef006e.tar.gz blackbird-obmc-linux-27a2329f8235d6ce637463f5d83e98d760ef006e.zip |
firewire: add CSR BUSY_TIMEOUT support
Implement the BUSY_TIMEOUT register, which is required for nodes that
support retries.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'drivers/firewire/core-transaction.c')
-rw-r--r-- | drivers/firewire/core-transaction.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c index 2a390726fa76..8146133818dc 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -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); @@ -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; |