aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-sbp2.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-03-07 12:12:45 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2007-03-09 16:03:09 -0500
commit5c5539d8cdfd13fdb080357fe79f94a7e11a6ef6 (patch)
treef44d797714badfcfe1927fab06d6b21e9cfc34e8 /drivers/firewire/fw-sbp2.c
parenta3aca3dabbcf00f2088d472f27755c29acaa992e (diff)
firewire: Quiet down fw-sbp2 logging a bit, remove stale FIXME.
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-sbp2.c')
-rw-r--r--drivers/firewire/fw-sbp2.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 994914f89b55..07e410b0ae53 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -452,8 +452,6 @@ sbp2_send_management_orb(struct fw_unit *unit, int node_id, int generation,
452 452
453 wait_for_completion(&orb->done); 453 wait_for_completion(&orb->done);
454 454
455 /* FIXME: Handle bus reset race here. */
456
457 retval = -EIO; 455 retval = -EIO;
458 if (orb->base.rcode != RCODE_COMPLETE) { 456 if (orb->base.rcode != RCODE_COMPLETE) {
459 fw_error("management write failed, rcode 0x%02x\n", 457 fw_error("management write failed, rcode 0x%02x\n",
@@ -496,7 +494,6 @@ complete_agent_reset_write(struct fw_card *card, int rcode,
496{ 494{
497 struct fw_transaction *t = data; 495 struct fw_transaction *t = data;
498 496
499 fw_notify("agent reset write rcode=%d\n", rcode);
500 kfree(t); 497 kfree(t);
501} 498}
502 499
@@ -542,9 +539,6 @@ static void sbp2_login(struct work_struct *work)
542 if (sbp2_send_management_orb(unit, node_id, generation, 539 if (sbp2_send_management_orb(unit, node_id, generation,
543 SBP2_LOGIN_REQUEST, lun, &response) < 0) { 540 SBP2_LOGIN_REQUEST, lun, &response) < 0) {
544 if (sd->retries++ < 5) { 541 if (sd->retries++ < 5) {
545 fw_error("login attempt %d for %s failed, "
546 "rescheduling\n",
547 sd->retries, unit->device.bus_id);
548 schedule_delayed_work(&sd->work, DIV_ROUND_UP(HZ, 5)); 542 schedule_delayed_work(&sd->work, DIV_ROUND_UP(HZ, 5));
549 } else { 543 } else {
550 fw_error("failed to login to %s\n", 544 fw_error("failed to login to %s\n",
@@ -560,16 +554,17 @@ static void sbp2_login(struct work_struct *work)
560 554
561 /* Get command block agent offset and login id. */ 555 /* Get command block agent offset and login id. */
562 sd->command_block_agent_address = 556 sd->command_block_agent_address =
563 ((u64) response.command_block_agent.high << 32) | 557 ((u64) (response.command_block_agent.high & 0xffff) << 32) |
564 response.command_block_agent.low; 558 response.command_block_agent.low;
565 sd->login_id = login_response_get_login_id(response); 559 sd->login_id = login_response_get_login_id(response);
566 560
567 fw_notify("logged in to sbp2 unit %s\n", unit->device.bus_id); 561 fw_notify("logged in to sbp2 unit %s (%d retries)\n",
568 fw_notify(" - management_agent_address: 0x%012llx\n", 562 unit->device.bus_id, sd->retries);
563 fw_notify(" - management_agent_address: 0x%012llx\n",
569 (unsigned long long) sd->management_agent_address); 564 (unsigned long long) sd->management_agent_address);
570 fw_notify(" - command_block_agent_address: 0x%012llx\n", 565 fw_notify(" - command_block_agent_address: 0x%012llx\n",
571 (unsigned long long) sd->command_block_agent_address); 566 (unsigned long long) sd->command_block_agent_address);
572 fw_notify(" - status write address: 0x%012llx\n", 567 fw_notify(" - status write address: 0x%012llx\n",
573 (unsigned long long) sd->address_handler.offset); 568 (unsigned long long) sd->address_handler.offset);
574 569
575#if 0 570#if 0
@@ -705,11 +700,7 @@ static void sbp2_reconnect(struct work_struct *work)
705 if (sbp2_send_management_orb(unit, node_id, generation, 700 if (sbp2_send_management_orb(unit, node_id, generation,
706 SBP2_RECONNECT_REQUEST, 701 SBP2_RECONNECT_REQUEST,
707 sd->login_id, NULL) < 0) { 702 sd->login_id, NULL) < 0) {
708 if (sd->retries++ < 5) { 703 if (sd->retries++ >= 5) {
709 fw_error("reconnect attempt %d for %s failed, "
710 "rescheduling\n",
711 sd->retries, unit->device.bus_id);
712 } else {
713 fw_error("failed to reconnect to %s\n", 704 fw_error("failed to reconnect to %s\n",
714 unit->device.bus_id); 705 unit->device.bus_id);
715 /* Fall back and try to log in again. */ 706 /* Fall back and try to log in again. */
@@ -724,7 +715,8 @@ static void sbp2_reconnect(struct work_struct *work)
724 sd->node_id = node_id; 715 sd->node_id = node_id;
725 sd->address_high = local_node_id << 16; 716 sd->address_high = local_node_id << 16;
726 717
727 fw_notify("reconnected to unit %s\n", unit->device.bus_id); 718 fw_notify("reconnected to unit %s (%d retries)\n",
719 unit->device.bus_id, sd->retries);
728 sbp2_agent_reset(unit); 720 sbp2_agent_reset(unit);
729 sbp2_cancel_orbs(unit); 721 sbp2_cancel_orbs(unit);
730} 722}
@@ -837,8 +829,6 @@ complete_command_orb(struct sbp2_orb *base_orb, struct sbp2_status *status)
837 /* If the orb completes with status == NULL, something 829 /* If the orb completes with status == NULL, something
838 * went wrong, typically a bus reset happened mid-orb 830 * went wrong, typically a bus reset happened mid-orb
839 * or when sending the write (less likely). */ 831 * or when sending the write (less likely). */
840 fw_notify("no command orb status, rcode=%d\n",
841 orb->base.rcode);
842 result = DID_BUS_BUSY; 832 result = DID_BUS_BUSY;
843 } 833 }
844 834