aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_ctrl.c
diff options
context:
space:
mode:
authorrajesh.shah@intel.com <rajesh.shah@intel.com>2005-10-31 19:20:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-11-10 19:09:15 -0500
commit1a9ed1bfe2fb17cc30227a12a3c1212128bb78b6 (patch)
tree17972b04d16dca0bfb66771165928a4db50fb00b /drivers/pci/hotplug/pciehp_ctrl.c
parented6cbcf2ac706aa47194fd2f7a99865cc06833d7 (diff)
[PATCH] pciehp: reduce debug message verbosity
Reduce the number of debug messages generated if pciehp debug is enabled. I tried to restrict this to removing debug messages that are either early-driver-debug type messages, or print information that can be inferred through other debug prints. Signed-off-by: Rajesh Shah <rajesh.shah@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_ctrl.c')
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index dcfbfffa17c6..5e582eca21d8 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -277,7 +277,9 @@ static int board_added(struct slot *p_slot)
277 277
278 hp_slot = p_slot->device - ctrl->slot_device_offset; 278 hp_slot = p_slot->device - ctrl->slot_device_offset;
279 279
280 dbg("%s: p_slot->device, slot_offset, hp_slot = %d, %d ,%d\n", __FUNCTION__, p_slot->device, ctrl->slot_device_offset, hp_slot); 280 dbg("%s: slot device, slot offset, hp slot = %d, %d ,%d\n",
281 __FUNCTION__, p_slot->device,
282 ctrl->slot_device_offset, hp_slot);
281 283
282 /* Wait for exclusive access to hardware */ 284 /* Wait for exclusive access to hardware */
283 down(&ctrl->crit_sect); 285 down(&ctrl->crit_sect);
@@ -305,9 +307,7 @@ static int board_added(struct slot *p_slot)
305 up(&ctrl->crit_sect); 307 up(&ctrl->crit_sect);
306 308
307 /* Wait for ~1 second */ 309 /* Wait for ~1 second */
308 dbg("%s: before long_delay\n", __FUNCTION__);
309 wait_for_ctrl_irq (ctrl); 310 wait_for_ctrl_irq (ctrl);
310 dbg("%s: afterlong_delay\n", __FUNCTION__);
311 311
312 /* Check link training status */ 312 /* Check link training status */
313 rc = p_slot->hpc_ops->check_lnk_status(ctrl); 313 rc = p_slot->hpc_ops->check_lnk_status(ctrl);
@@ -444,13 +444,15 @@ static void pciehp_pushbutton_thread(unsigned long slot)
444 p_slot->hpc_ops->get_power_status(p_slot, &getstatus); 444 p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
445 if (getstatus) { 445 if (getstatus) {
446 p_slot->state = POWEROFF_STATE; 446 p_slot->state = POWEROFF_STATE;
447 dbg("In power_down_board, b:d(%x:%x)\n", p_slot->bus, p_slot->device); 447 dbg("%s: disabling bus:device(%x:%x)\n", __FUNCTION__,
448 p_slot->bus, p_slot->device);
448 449
449 pciehp_disable_slot(p_slot); 450 pciehp_disable_slot(p_slot);
450 p_slot->state = STATIC_STATE; 451 p_slot->state = STATIC_STATE;
451 } else { 452 } else {
452 p_slot->state = POWERON_STATE; 453 p_slot->state = POWERON_STATE;
453 dbg("In add_board, b:d(%x:%x)\n", p_slot->bus, p_slot->device); 454 dbg("%s: adding bus:device(%x:%x)\n", __FUNCTION__,
455 p_slot->bus, p_slot->device);
454 456
455 if (pciehp_enable_slot(p_slot) && PWR_LED(p_slot->ctrl->ctrlcap)) { 457 if (pciehp_enable_slot(p_slot) && PWR_LED(p_slot->ctrl->ctrlcap)) {
456 /* Wait for exclusive access to hardware */ 458 /* Wait for exclusive access to hardware */
@@ -492,13 +494,15 @@ static void pciehp_surprise_rm_thread(unsigned long slot)
492 p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus); 494 p_slot->hpc_ops->get_adapter_status(p_slot, &getstatus);
493 if (!getstatus) { 495 if (!getstatus) {
494 p_slot->state = POWEROFF_STATE; 496 p_slot->state = POWEROFF_STATE;
495 dbg("In removing board, b:d(%x:%x)\n", p_slot->bus, p_slot->device); 497 dbg("%s: removing bus:device(%x:%x)\n",
498 __FUNCTION__, p_slot->bus, p_slot->device);
496 499
497 pciehp_disable_slot(p_slot); 500 pciehp_disable_slot(p_slot);
498 p_slot->state = STATIC_STATE; 501 p_slot->state = STATIC_STATE;
499 } else { 502 } else {
500 p_slot->state = POWERON_STATE; 503 p_slot->state = POWERON_STATE;
501 dbg("In add_board, b:d(%x:%x)\n", p_slot->bus, p_slot->device); 504 dbg("%s: adding bus:device(%x:%x)\n",
505 __FUNCTION__, p_slot->bus, p_slot->device);
502 506
503 if (pciehp_enable_slot(p_slot) && PWR_LED(p_slot->ctrl->ctrlcap)) { 507 if (pciehp_enable_slot(p_slot) && PWR_LED(p_slot->ctrl->ctrlcap)) {
504 /* Wait for exclusive access to hardware */ 508 /* Wait for exclusive access to hardware */
@@ -564,7 +568,6 @@ int pciehp_event_start_thread(void)
564 err ("Can't start up our event thread\n"); 568 err ("Can't start up our event thread\n");
565 return -1; 569 return -1;
566 } 570 }
567 dbg("Our event thread pid = %d\n", pid);
568 return 0; 571 return 0;
569} 572}
570 573
@@ -572,9 +575,7 @@ int pciehp_event_start_thread(void)
572void pciehp_event_stop_thread(void) 575void pciehp_event_stop_thread(void)
573{ 576{
574 event_finished = 1; 577 event_finished = 1;
575 dbg("event_thread finish command given\n");
576 up(&event_semaphore); 578 up(&event_semaphore);
577 dbg("wait for event_thread to exit\n");
578 down(&event_exit); 579 down(&event_exit);
579} 580}
580 581
@@ -619,8 +620,6 @@ static void interrupt_event_handler(struct controller *ctrl)
619 620
620 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset); 621 p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);
621 622
622 dbg("hp_slot %d, p_slot %p\n", hp_slot, p_slot);
623
624 if (ctrl->event_queue[loop].event_type == INT_BUTTON_CANCEL) { 623 if (ctrl->event_queue[loop].event_type == INT_BUTTON_CANCEL) {
625 dbg("button cancel\n"); 624 dbg("button cancel\n");
626 del_timer(&p_slot->task_event); 625 del_timer(&p_slot->task_event);
@@ -712,7 +711,6 @@ static void interrupt_event_handler(struct controller *ctrl)
712 p_slot->task_event.function = (void (*)(unsigned long)) pushbutton_helper_thread; 711 p_slot->task_event.function = (void (*)(unsigned long)) pushbutton_helper_thread;
713 p_slot->task_event.data = (unsigned long) p_slot; 712 p_slot->task_event.data = (unsigned long) p_slot;
714 713
715 dbg("add_timer p_slot = %p\n", (void *) p_slot);
716 add_timer(&p_slot->task_event); 714 add_timer(&p_slot->task_event);
717 } 715 }
718 } 716 }