diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-01-23 21:11:43 +0100 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-03-09 22:02:43 +0100 |
commit | 907293d78872ee492ce6a114258dd853ec5082ae (patch) | |
tree | 9384ac58621706b7d3846b34944fa5475f084502 /drivers/firewire/fw-transaction.c | |
parent | 366f5f4fa31cd3f3d5901f5edfe255a48906505d (diff) |
firewire: consistent usage of node_id
Definitions as per IEEE 1212 and IEEE 1394:
Node ID: Concatenation of bus ID and local ID. 16 bits long.
Bus ID: Identifies a particular bus within a group of buses
interconnected by bus bridges.
Local ID: Identifies a particular node on a bus.
PHY ID: Local ID of IEEE 1394 nodes. 6 bits long.
Never ever use a variable called node_id for anything else than a node ID.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-transaction.c')
-rw-r--r-- | drivers/firewire/fw-transaction.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 4c1275f9a3b4..439a3e3ee2f0 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c @@ -56,7 +56,7 @@ #define header_get_extended_tcode(q) (((q) >> 0) & 0xffff) #define phy_config_gap_count(gap_count) (((gap_count) << 16) | (1 << 22)) -#define phy_config_root_id(node_id) (((node_id) << 24) | (1 << 23)) +#define phy_config_root_id(node_id) ((((node_id) & 0x3f) << 24) | (1 << 23)) #define phy_identifier(id) ((id) << 30) static void @@ -123,7 +123,7 @@ fw_fill_packet(struct fw_packet *packet, int tcode, int tlabel, header_retry(RETRY_X) | header_tlabel(tlabel) | header_tcode(tcode) | - header_destination(node_id | LOCAL_BUS); + header_destination(node_id); packet->header[1] = header_offset_high(offset >> 32) | header_source(0); packet->header[2] = @@ -190,7 +190,7 @@ fw_fill_packet(struct fw_packet *packet, int tcode, int tlabel, * @param tcode the tcode for this transaction. Do not use * TCODE_LOCK_REQUEST directly, insted use TCODE_LOCK_MASK_SWAP * etc. to specify tcode and ext_tcode. - * @param node_id the node_id of the destination node + * @param node_id the destination node ID (bus ID and PHY ID concatenated) * @param generation the generation for which node_id is valid * @param speed the speed to use for sending the request * @param offset the 48 bit offset on the destination node |