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