All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Martin Michlmayr <tbm@cyrius.com>
Cc: linux-scsi@vger.kernel.org,
	james.bottomley@hansenpartnership.com,
	linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [PATCH] scsi: Fix bad use of udelay in atp870u.c
Date: Thu, 16 Oct 2008 15:51:35 -0700	[thread overview]
Message-ID: <20081016155135.8fc411ae.akpm@linux-foundation.org> (raw)
In-Reply-To: <20081016082146.GA18535@deprecation.cyrius.com>

On Thu, 16 Oct 2008 10:21:46 +0200
Martin Michlmayr <tbm@cyrius.com> wrote:

> The ACARD driver calls udelay() with a value > 2000, which leads to
> to the following compilation error on ARM:
>   ERROR: "__bad_udelay" [drivers/scsi/atp870u.ko] undefined!
>   make[1]: *** [__modpost] Error 1
> Fix this by using a combination of mdelay and udelay.
> 
> Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
> 
> --- a/drivers/scsi/atp870u.c
> +++ b/drivers/scsi/atp870u.c
> @@ -1171,7 +1171,8 @@ wait_io1:
>  	outw(val, tmport);
>  	outb(2, 0x80);
>  TCM_SYNC:
> -	udelay(0x800);
> +	mdelay(2);
> +	udelay(48);
>  	if ((inb(tmport) & 0x80) == 0x00) {	/* bsy ? */
>  		outw(0, tmport--);
>  		outb(0, tmport);
> 

hum.  The code has been like that for many years - why was the
error only discovered now.  Is that check in arm new?

If so, was it present in 2.6.27?
  If so, does anyone actually use this driver on arm?
    If so, we'll need this patch in 2.6.27.x as well.

?

  reply	other threads:[~2008-10-16 22:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16  8:21 [PATCH] scsi: Fix bad use of udelay in atp870u.c Martin Michlmayr
2008-10-16 22:51 ` Andrew Morton [this message]
2008-10-17  5:48   ` Martin Michlmayr
  -- strict thread matches above, loose matches on Subject: below --
2008-09-30  7:39 Martin Michlmayr

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=20081016155135.8fc411ae.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tbm@cyrius.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.