public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: Adrian Bunk <bunk@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [2.6 patch] fix pciehp_free_irq()
Date: Fri, 29 Aug 2008 11:44:23 +0900	[thread overview]
Message-ID: <48B76287.5070404@jp.fujitsu.com> (raw)
In-Reply-To: <20080827220526.GR11734@cs181140183.pp.htv.fi>

Adrian Bunk wrote:
> This patch fixes an obvious bug (loop was never entered) caused by
> commit 820943b6fc4781621dee52ba026106758a727dd3
> (pciehp: cleanup pcie_poll_cmd).
> 
> Reported-by: Adrian Bunk <bunk@kernel.org>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
> 
> ---
> 0cca78f4b7c7d6c7b64ae5acc08bb641454b4835 
> diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
> index ab31f5b..9d934dd 100644
> --- a/drivers/pci/hotplug/pciehp_hpc.c
> +++ b/drivers/pci/hotplug/pciehp_hpc.c
> @@ -250,23 +250,23 @@ static inline void pciehp_free_irq(struct controller *ctrl)
>  static int pcie_poll_cmd(struct controller *ctrl)
>  {
>  	u16 slot_status;
>  	int timeout = 1000;
>  
>  	if (!pciehp_readw(ctrl, SLOTSTATUS, &slot_status)) {
>  		if (slot_status & CMD_COMPLETED) {
>  			pciehp_writew(ctrl, SLOTSTATUS, CMD_COMPLETED);
>  			return 1;
>  		}
>  	}
> -	while (timeout > 1000) {
> +	while (timeout > 0) {
>  		msleep(10);
>  		timeout -= 10;
>  		if (!pciehp_readw(ctrl, SLOTSTATUS, &slot_status)) {
>  			if (slot_status & CMD_COMPLETED) {
>  				pciehp_writew(ctrl, SLOTSTATUS, CMD_COMPLETED);
>  				return 1;
>  			}
>  		}
>  	}
>  	return 0;	/* timeout */
>  }
> 
> 

Sorry, that's my bad.
Thank you for the patch, Adrian.

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

Thanks,
Kenji Kaneshige



  reply	other threads:[~2008-08-29  2:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 22:05 [2.6 patch] fix pciehp_free_irq() Adrian Bunk
2008-08-29  2:44 ` Kenji Kaneshige [this message]
2008-09-09 18:40 ` Jesse Barnes
2008-09-09 22:52   ` Kenji Kaneshige
2008-09-10 17:51     ` 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=48B76287.5070404@jp.fujitsu.com \
    --to=kaneshige.kenji@jp.fujitsu.com \
    --cc=bunk@kernel.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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