diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2010-06-10 08:25:19 +0200 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2010-06-10 08:25:19 +0200 |
commit | 506f1a31932747f56a5029d5b3c14b1b68f41ccc (patch) | |
tree | 04dfb94980fc95cfc2c458fc62e6b77996c8145b /drivers/firewire/core-transaction.c | |
parent | 60d32970c5a32e8c4f340a9e41993759ad658ef2 (diff) |
firewire: add CSR NODE_IDS support
The NODE_IDS register, and especially its bus_id field, is quite
useless because 1394.1 requires that the bus_id field always stays
0x3ff. However, the 1394 specification requires this register on all
transaction capable nodes, and the Base 1394 Test Suite tests for it,
so we better implement it.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'drivers/firewire/core-transaction.c')
-rw-r--r-- | drivers/firewire/core-transaction.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c index a4d8109edec..16ffa27d23b 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -1023,6 +1023,17 @@ static void handle_registers(struct fw_card *card, struct fw_request *request, } break; + case CSR_NODE_IDS: + if (tcode == TCODE_READ_QUADLET_REQUEST) + *data = cpu_to_be32(card->driver-> + read_csr_reg(card, CSR_NODE_IDS)); + else if (tcode == TCODE_WRITE_QUADLET_REQUEST) + card->driver->write_csr_reg(card, CSR_NODE_IDS, + be32_to_cpu(*data)); + else + rcode = RCODE_TYPE_ERROR; + break; + case CSR_CYCLE_TIME: if (TCODE_IS_READ_REQUEST(tcode) && length == 4) *data = cpu_to_be32(card->driver-> |