aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-06-10 02:41:51 -0400
committerClemens Ladisch <clemens@ladisch.de>2010-06-10 02:41:51 -0400
commitc374ab424249b6ab91b1aee7460419d3f2c321df (patch)
tree70da7005c955691ff436676c678cf2e9dac73aa4
parente91b2787d0a2e4719b016e8dec0afd2d5ab6c30f (diff)
firewire: core: always enable cycle master packets
As part of the bus manager responsibilities, make sure that the cycle master sends cycle start packets. This is needed when the old bus manager disabled the cycle master's cmstr bit and there are iso-capable nodes on the new bus. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
-rw-r--r--drivers/firewire/core-card.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c
index faf2eee473b9..ef6f2616cac7 100644
--- a/drivers/firewire/core-card.c
+++ b/drivers/firewire/core-card.c
@@ -369,10 +369,8 @@ static void fw_card_bm_work(struct work_struct *work)
369 goto out; 369 goto out;
370 } else if (root_device_is_cmc) { 370 } else if (root_device_is_cmc) {
371 /* 371 /*
372 * FIXME: I suppose we should set the cmstr bit in the 372 * We will send out a force root packet for this
373 * STATE_CLEAR register of this node, as described in 373 * node as part of the gap count optimization.
374 * 1394-1995, 8.4.2.6. Also, send out a force root
375 * packet for this node.
376 */ 374 */
377 new_root_id = root_id; 375 new_root_id = root_id;
378 } else { 376 } else {
@@ -413,11 +411,25 @@ static void fw_card_bm_work(struct work_struct *work)
413 fw_send_phy_config(card, new_root_id, generation, gap_count); 411 fw_send_phy_config(card, new_root_id, generation, gap_count);
414 fw_core_initiate_bus_reset(card, 1); 412 fw_core_initiate_bus_reset(card, 1);
415 /* Will allocate broadcast channel after the reset. */ 413 /* Will allocate broadcast channel after the reset. */
416 } else { 414 goto out;
417 if (local_id == irm_id)
418 allocate_broadcast_channel(card, generation);
419 } 415 }
420 416
417 if (root_device_is_cmc) {
418 /*
419 * Make sure that the cycle master sends cycle start packets.
420 */
421 card->bm_transaction_data[0] = cpu_to_be32(CSR_STATE_BIT_CMSTR);
422 rcode = fw_run_transaction(card, TCODE_WRITE_QUADLET_REQUEST,
423 root_id, generation, SCODE_100,
424 CSR_REGISTER_BASE + CSR_STATE_SET,
425 card->bm_transaction_data, sizeof(u32));
426 if (rcode == RCODE_GENERATION)
427 goto out;
428 }
429
430 if (local_id == irm_id)
431 allocate_broadcast_channel(card, generation);
432
421 out: 433 out:
422 fw_node_put(root_node); 434 fw_node_put(root_node);
423 out_put_card: 435 out_put_card: