summaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core-transaction.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-06-10 08:35:06 +0200
committerClemens Ladisch <clemens@ladisch.de>2010-06-10 08:35:06 +0200
commita1a1132bd83d0aea51d4f19be4b4a58a064a0131 (patch)
tree93352d6aa9fd8eaa0521fbeb65853cd9f485666e /drivers/firewire/core-transaction.c
parent27a2329f8235d6ce637463f5d83e98d760ef006e (diff)
downloadlinux-a1a1132bd83d0aea51d4f19be4b4a58a064a0131.tar.gz
linux-a1a1132bd83d0aea51d4f19be4b4a58a064a0131.tar.bz2
linux-a1a1132bd83d0aea51d4f19be4b4a58a064a0131.zip
firewire: add CSR PRIORITY_BUDGET support
If supported by the OHCI controller, implement the PRIORITY_BUDGET register, which is required for nodes that can use asynchronous priority arbitration. To allow the core to determine what features the lowlevel device supports, add a new card driver callback. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'drivers/firewire/core-transaction.c')
-rw-r--r--drivers/firewire/core-transaction.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index 8146133818dc..a61eb3fb9573 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -1126,6 +1126,20 @@ static void handle_registers(struct fw_card *card, struct fw_request *request,
rcode = RCODE_TYPE_ERROR;
break;
+ case CSR_PRIORITY_BUDGET:
+ if (!(card->driver->get_features(card) &
+ FEATURE_PRIORITY_BUDGET))
+ rcode = RCODE_ADDRESS_ERROR;
+ else if (tcode == TCODE_READ_QUADLET_REQUEST)
+ *data = cpu_to_be32(card->driver->
+ read_csr_reg(card, CSR_PRIORITY_BUDGET));
+ else if (tcode == TCODE_WRITE_QUADLET_REQUEST)
+ card->driver->write_csr_reg(card, CSR_PRIORITY_BUDGET,
+ 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);