mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus@drzeus.cx>
To: "Wolfgang Mües" <wolfgang.mues@auerswald.de>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	"Matt Fleming" <matt@console-pimps.org>,
	"David Brownell" <dbrownell@users.sourceforge.net>,
	"Mike Frysinger" <vapier.adi@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/7] mmc_spi: convert timeout handling to jiffies and avoid busy waiting
Date: Sun, 15 Mar 2009 12:37:15 +0100	[thread overview]
Message-ID: <20090315123715.70490281@mjolnir.ossman.eu> (raw)
In-Reply-To: <200903111435.03196.wolfgang.mues@auerswald.de>

[-- Attachment #1: Type: text/plain, Size: 954 bytes --]

On Wed, 11 Mar 2009 14:35:03 +0100
Wolfgang Mües <wolfgang.mues@auerswald.de> wrote:

> @@ -816,8 +819,11 @@ mmc_spi_data_do(struct mmc_spi_host *hos
>  	else
>  		clock_rate = spi->max_speed_hz;
>  
> -	timeout = ktime_add_ns(ktime_set(0, 0), data->timeout_ns +
> -			data->timeout_clks * 1000000 / clock_rate);
> +	timeout = data->timeout_ns +
> +		  data->timeout_clks * 1000000 / clock_rate;
> +	timeout = usecs_to_jiffies((unsigned int)(timeout / 1000));
> +	if (!timeout)
> +		timeout = 1;
>  

Does this round properly upwards? Having a timeout 6 ms shorter than it
should be can be a real problem (although the huge timeout your other
patch introduces means we probably won't be affected by it).

Rgds
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      parent reply	other threads:[~2009-03-15 11:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 13:35 Wolfgang Mües
2009-03-12  2:45 ` David Brownell
2009-03-12  9:33   ` Wolfgang Mües
2009-03-15 11:37 ` Pierre Ossman [this message]

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=20090315123715.70490281@mjolnir.ossman.eu \
    --to=drzeus@drzeus.cx \
    --cc=akpm@linux-foundation.org \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@console-pimps.org \
    --cc=vapier.adi@gmail.com \
    --cc=wolfgang.mues@auerswald.de \
    /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

Powered by JetHome