linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>, linux-next@vger.kernel.org
Subject: [PATCH 3/4] Updated version of 2b26196717939221ccc06073780b73d0f4ee3203
Date: Wed, 28 May 2008 14:59:44 +0900	[thread overview]
Message-ID: <483CF4D0.20202@jp.fujitsu.com> (raw)
In-Reply-To: <483CF356.1010807@jp.fujitsu.com>

Since we need to wait for command completion for muximum 1sec, waiting
command should not be interrupted by a signal.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

---
 drivers/pci/hotplug/pciehp_hpc.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

Index: linux-2.6.26-rc4/drivers/pci/hotplug/pciehp_hpc.c
===================================================================
--- linux-2.6.26-rc4.orig/drivers/pci/hotplug/pciehp_hpc.c
+++ linux-2.6.26-rc4/drivers/pci/hotplug/pciehp_hpc.c
@@ -268,9 +268,8 @@ completed:
 	return timeout;
 }
 
-static inline int pcie_wait_cmd(struct controller *ctrl, int poll)
+static inline void pcie_wait_cmd(struct controller *ctrl, int poll)
 {
-	int retval = 0;
 	unsigned int msecs = pciehp_poll_mode ? 2500 : 1000;
 	unsigned long timeout = msecs_to_jiffies(msecs);
 	int rc;
@@ -278,16 +277,9 @@ static inline int pcie_wait_cmd(struct c
 	if (poll)
 		rc = pcie_poll_cmd(ctrl);
 	else
-		rc = wait_event_interruptible_timeout(ctrl->queue,
-					      !ctrl->cmd_busy, timeout);
+		rc = wait_event_timeout(ctrl->queue, !ctrl->cmd_busy, timeout);
 	if (!rc)
 		dbg("Command not completed in 1000 msec\n");
-	else if (rc < 0) {
-		retval = -EINTR;
-		info("Command was interrupted by a signal\n");
-	}
-
-	return retval;
 }
 
 /**
@@ -365,7 +357,7 @@ static int pcie_write_cmd(struct control
 		if (!(slot_ctrl & HP_INTR_ENABLE) ||
 		    !(slot_ctrl & CMD_CMPL_INTR_ENABLE))
 			poll = 1;
-                retval = pcie_wait_cmd(ctrl, poll);
+                pcie_wait_cmd(ctrl, poll);
 	}
  out:
 	mutex_unlock(&ctrl->ctrl_lock);
@@ -797,7 +789,7 @@ static irqreturn_t pcie_isr(int irq, voi
 	if (intr_loc & CMD_COMPLETED) {
 		ctrl->cmd_busy = 0;
 		smp_mb();
-		wake_up_interruptible(&ctrl->queue);
+		wake_up(&ctrl->queue);
 	}
 
 	if (!(intr_loc & ~CMD_COMPLETED))



  parent reply	other threads:[~2008-05-28  6:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-28  2:27 linux-next: pci merge conflict Stephen Rothwell
2008-05-28  2:50 ` Kenji Kaneshige
2008-05-28  3:19   ` Stephen Rothwell
2008-05-28  4:04   ` Jesse Barnes
2008-05-28  4:08   ` Jesse Barnes
2008-05-28  5:53     ` Kenji Kaneshige
2008-05-28  5:56       ` [PATCH 1/4] Updated version of 72c4928058175e889b2f83d1a62ac6f2eb0498a0 Kenji Kaneshige
2008-05-28  5:57       ` [PATCH 2/4] Updated version of 4c8cc2d54b1d35cf24ede6057e05f103cfa28852 Kenji Kaneshige
2008-05-28  5:59       ` Kenji Kaneshige [this message]
2008-05-28  6:01       ` [PATCH 4/4] Updated version of 9d06d9963852e7818157994c645c640239cb5137 Kenji Kaneshige
2008-05-28 17:57       ` linux-next: pci merge conflict Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=483CF4D0.20202@jp.fujitsu.com \
    --to=kaneshige.kenji@jp.fujitsu.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).