aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hbadisc.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-12-04 22:38:54 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:25 -0500
commit3a55b5327b80d805eb3c9720092fd24f15193696 (patch)
tree0276c0d71f087d4976929f01eb2432ba08c5f75f /drivers/scsi/lpfc/lpfc_hbadisc.c
parentddcc50f0f3538e4771c8ab9e8ec685a22c90d88c (diff)
[SCSI] lpfc 8.3.0 : Add support for Power Management Suspend/Resume operations
Implement lpfc_pci_suspend_one() and lpfc_pci_resume_one() and register them in the pci_driver table. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hbadisc.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 65fddf4ac3cf..58ed6859c921 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -585,20 +585,25 @@ lpfc_do_work(void *p)
585 set_user_nice(current, -20); 585 set_user_nice(current, -20);
586 phba->data_flags = 0; 586 phba->data_flags = 0;
587 587
588 while (1) { 588 while (!kthread_should_stop()) {
589 /* wait and check worker queue activities */ 589 /* wait and check worker queue activities */
590 rc = wait_event_interruptible(phba->work_waitq, 590 rc = wait_event_interruptible(phba->work_waitq,
591 (test_and_clear_bit(LPFC_DATA_READY, 591 (test_and_clear_bit(LPFC_DATA_READY,
592 &phba->data_flags) 592 &phba->data_flags)
593 || kthread_should_stop())); 593 || kthread_should_stop()));
594 BUG_ON(rc); 594 /* Signal wakeup shall terminate the worker thread */
595 595 if (rc) {
596 if (kthread_should_stop()) 596 lpfc_printf_log(phba, KERN_ERR, LOG_ELS,
597 "0433 Wakeup on signal: rc=x%x\n", rc);
597 break; 598 break;
599 }
598 600
599 /* Attend pending lpfc data processing */ 601 /* Attend pending lpfc data processing */
600 lpfc_work_done(phba); 602 lpfc_work_done(phba);
601 } 603 }
604 phba->worker_thread = NULL;
605 lpfc_printf_log(phba, KERN_INFO, LOG_ELS,
606 "0432 Worker thread stopped.\n");
602 return 0; 607 return 0;
603} 608}
604 609