aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/nodemgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ieee1394/nodemgr.c')
-rw-r--r--drivers/ieee1394/nodemgr.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 7fff5a1d2ea4..f7c3dbaf5802 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -1413,6 +1413,24 @@ static void nodemgr_node_probe(struct host_info *hi, int generation)
1413 return; 1413 return;
1414} 1414}
1415 1415
1416static int nodemgr_send_resume_packet(struct hpsb_host *host)
1417{
1418 struct hpsb_packet *packet;
1419 int ret = 1;
1420
1421 packet = hpsb_make_phypacket(host,
1422 0x003c0000 | NODEID_TO_NODE(host->node_id) << 24);
1423 if (packet) {
1424 packet->no_waiter = 1;
1425 packet->generation = get_hpsb_generation(host);
1426 ret = hpsb_send_packet(packet);
1427 }
1428 if (ret)
1429 HPSB_WARN("fw-host%d: Failed to broadcast resume packet",
1430 host->id);
1431 return ret;
1432}
1433
1416/* Because we are a 1394a-2000 compliant IRM, we need to inform all the other 1434/* Because we are a 1394a-2000 compliant IRM, we need to inform all the other
1417 * nodes of the broadcast channel. (Really we're only setting the validity 1435 * nodes of the broadcast channel. (Really we're only setting the validity
1418 * bit). Other IRM responsibilities go in here as well. */ 1436 * bit). Other IRM responsibilities go in here as well. */
@@ -1463,6 +1481,13 @@ static int nodemgr_do_irm_duties(struct hpsb_host *host, int cycles)
1463 } 1481 }
1464 } 1482 }
1465 1483
1484 /* Some devices suspend their ports while being connected to an inactive
1485 * host adapter, i.e. if connected before the low-level driver is
1486 * loaded. They become visible either when physically unplugged and
1487 * replugged, or when receiving a resume packet. Send one once. */
1488 if (!host->resume_packet_sent && !nodemgr_send_resume_packet(host))
1489 host->resume_packet_sent = 1;
1490
1466 return 1; 1491 return 1;
1467} 1492}
1468 1493