linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: Carlos.Pardo@siliconimage.com, linux-ide@vger.kernel.org,
	Edward Falk <efalk@google.com>
Subject: Re: [PATCH libata-dev-2.6:sil24 05/07] sil24: use longer delay function and less iteration in reset_controller
Date: Thu, 11 Aug 2005 15:20:36 -0400	[thread overview]
Message-ID: <42FBA504.4060101@pobox.com> (raw)
In-Reply-To: <20050730101344.241DEAE1@htj.dyndns.org>

Tejun Heo wrote:
> 05_sil24_mdelay-instead-of-udelay.patch
> 
> 	loop 100 times with mdelay(1) instead of 1000 times with
> 	udelay(100) in sil24_reset_controller.
> 
> 	Jeff, is this what you wanted?  If not, just ignore this
> 	patch.  The following patches will apply without this one.
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> 
>  sata_sil24.c |   10 +++++++---
>  1 files changed, 7 insertions(+), 3 deletions(-)
> 
> Index: work/drivers/scsi/sata_sil24.c
> ===================================================================
> --- work.orig/drivers/scsi/sata_sil24.c	2005-07-30 19:13:40.000000000 +0900
> +++ work/drivers/scsi/sata_sil24.c	2005-07-30 19:13:40.000000000 +0900
> @@ -445,9 +445,13 @@ static void sil24_reset_controller(struc
>  	writel(PORT_CS_DEV_RST, port + PORT_CTRL_STAT);
>  	readl(port + PORT_CTRL_STAT);	/* sync */
>  
> -	/* Max ~100ms */
> -	for (cnt = 0; cnt < 1000; cnt++) {
> -		udelay(100);
> +	/*
> +	 * Max ~100ms.
> +	 * FIXME: 100ms is an arbitrary value, get spec and use
> +	 *        accurate value.
> +	 */
> +	for (cnt = 0; cnt < 100; cnt++) {
> +		mdelay(1);
>  		tmp = readl(port + PORT_CTRL_STAT);

I forget what the discussion resulted in, for this change.

For error handling, we typically want to move to process context (if not 
there already), and then use msleep() and friends.

	Jeff



  reply	other threads:[~2005-08-11 19:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-30 10:13 [PATCH libata-dev-2.6:sil24 00/07] sil24: misc fixes Tejun Heo
2005-07-30 10:13 ` [PATCH libata-dev-2.6:sil24 01/07] sil24: implement status register emulation Tejun Heo
2005-08-11 19:18   ` Jeff Garzik
2005-07-30 10:14 ` [PATCH libata-dev-2.6:sil24 02/07] sil24: move error handling out of hot interrupt path Tejun Heo
2005-08-11 19:18   ` Jeff Garzik
2005-07-30 10:14 ` [PATCH libata-dev-2.6:sil24 03/07] sil24: add testing for PCI fault Tejun Heo
2005-08-11 19:19   ` Jeff Garzik
2005-07-30 10:14 ` [PATCH libata-dev-2.6:sil24 04/07] sil24: remove irq disable code on spurious interrupt Tejun Heo
2005-08-11 19:19   ` Jeff Garzik
2005-07-30 10:14 ` [PATCH libata-dev-2.6:sil24 05/07] sil24: use longer delay function and less iteration in reset_controller Tejun Heo
2005-08-11 19:20   ` Jeff Garzik [this message]
2005-08-12  0:54     ` Tejun Heo
2005-07-30 10:14 ` [PATCH libata-dev-2.6:sil24 06/07] sil24: add IO flushing after masking irq during initialization Tejun Heo
2005-08-11 19:20   ` Jeff Garzik
2005-07-30 10:14 ` [PATCH libata-dev-2.6:sil24 07/07] sil24: add FIXME comment above ata_device_add Tejun Heo
2005-08-11 19:21   ` Jeff Garzik
2005-08-11 19:21 ` [PATCH libata-dev-2.6:sil24 00/07] sil24: misc fixes Jeff Garzik
2005-08-12  0:57   ` Tejun Heo

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=42FBA504.4060101@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=Carlos.Pardo@siliconimage.com \
    --cc=efalk@google.com \
    --cc=htejun@gmail.com \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).