aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-topology.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-03-24 15:54:28 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-04-18 11:55:36 -0400
commitc9755e14a01987ada4063e8b4c50c2b6738d879e (patch)
tree41a593c4b9ac10ccc4ad031510438e4551e51b5b /drivers/firewire/fw-topology.c
parent1dadff71d6356ebb804c3f4f1d3049247e16111c (diff)
firewire: reread config ROM when device reset the bus
When a device changes its configuration ROM, it announces this with a bus reset. firewire-core has to check which node initiated a bus reset and whether any unit directories went away or were added on this node. Tested with an IOI FWB-IDE01AB which has its link-on bit set if bus power is available but does not respond to ROM read requests if self power is off. This implements - recognition of the units if self power is switched on after fw-core gave up the initial attempt to read the config ROM, - shutdown of the units when self power is switched off. Also tested with a second PC running Linux/ieee1394. When the eth1394 driver is inserted and removed on that node, fw-core now notices the addition and removal of the IPv4 unit on the ieee1394 node. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-topology.c')
-rw-r--r--drivers/firewire/fw-topology.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c
index d2c7a3d7e1cb..ebdec4c6c689 100644
--- a/drivers/firewire/fw-topology.c
+++ b/drivers/firewire/fw-topology.c
@@ -108,6 +108,7 @@ static struct fw_node *fw_node_create(u32 sid, int port_count, int color)
108 node->node_id = LOCAL_BUS | SELF_ID_PHY_ID(sid); 108 node->node_id = LOCAL_BUS | SELF_ID_PHY_ID(sid);
109 node->link_on = SELF_ID_LINK_ON(sid); 109 node->link_on = SELF_ID_LINK_ON(sid);
110 node->phy_speed = SELF_ID_PHY_SPEED(sid); 110 node->phy_speed = SELF_ID_PHY_SPEED(sid);
111 node->initiated_reset = SELF_ID_PHY_INITIATOR(sid);
111 node->port_count = port_count; 112 node->port_count = port_count;
112 113
113 atomic_set(&node->ref_count, 1); 114 atomic_set(&node->ref_count, 1);
@@ -431,6 +432,8 @@ update_tree(struct fw_card *card, struct fw_node *root)
431 event = FW_NODE_LINK_OFF; 432 event = FW_NODE_LINK_OFF;
432 else if (!node0->link_on && node1->link_on) 433 else if (!node0->link_on && node1->link_on)
433 event = FW_NODE_LINK_ON; 434 event = FW_NODE_LINK_ON;
435 else if (node1->initiated_reset && node1->link_on)
436 event = FW_NODE_INITIATED_RESET;
434 else 437 else
435 event = FW_NODE_UPDATED; 438 event = FW_NODE_UPDATED;
436 439