aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core-transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/core-transaction.c')
-rw-r--r--drivers/firewire/core-transaction.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index 7813da8a129..5f5a7852f7a 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -426,9 +426,21 @@ void fw_send_phy_config(struct fw_card *card,
426 int node_id, int generation, int gap_count) 426 int node_id, int generation, int gap_count)
427{ 427{
428 long timeout = DIV_ROUND_UP(HZ, 10); 428 long timeout = DIV_ROUND_UP(HZ, 10);
429 u32 data = PHY_IDENTIFIER(PHY_PACKET_CONFIG) | 429 u32 data = PHY_IDENTIFIER(PHY_PACKET_CONFIG);
430 PHY_CONFIG_ROOT_ID(node_id) | 430
431 PHY_CONFIG_GAP_COUNT(gap_count); 431 if (node_id != FW_PHY_CONFIG_NO_NODE_ID)
432 data |= PHY_CONFIG_ROOT_ID(node_id);
433
434 if (gap_count == FW_PHY_CONFIG_CURRENT_GAP_COUNT) {
435 gap_count = card->driver->read_phy_reg(card, 1);
436 if (gap_count < 0)
437 return;
438
439 gap_count &= 63;
440 if (gap_count == 63)
441 return;
442 }
443 data |= PHY_CONFIG_GAP_COUNT(gap_count);
432 444
433 mutex_lock(&phy_config_mutex); 445 mutex_lock(&phy_config_mutex);
434 446