linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Volker Armin Hemmann <volker.armin.hemmann@tu-clausthal.de>
Cc: Jeff Garzik <jeff@garzik.org>,
	IDE/ATA development list <linux-ide@vger.kernel.org>,
	Peer Chen <pchen@nvidia.com>
Subject: Re: [PATCH] ahci: retry enabling AHCI a few times before spitting out WARN_ON()
Date: Fri, 25 Apr 2008 10:59:02 +0900	[thread overview]
Message-ID: <48113AE6.6060904@gmail.com> (raw)
In-Reply-To: <200804250317.16396.volker.armin.hemmann@tu-clausthal.de>

Volker Armin Hemmann wrote:
>  static void ahci_enable_ahci(void __iomem *mmio)
>  {
> +       int i;
>         u32 tmp;
> 
>         /* turn on AHCI_EN */
>         tmp = readl(mmio + HOST_CTL);
> -       if (!(tmp & HOST_AHCI_EN)) {
> +       if (tmp & HOST_AHCI_EN)
> +               return;
> +
> +       /* Some controllers need AHCI_EN to be written multiple times.
> +        * Try a few times before giving up.
> +        */
> +       for (i = 0; i < 5; i++) {
>                 tmp |= HOST_AHCI_EN;
>                 writel(tmp, mmio + HOST_CTL);
>                 tmp = readl(mmio + HOST_CTL);   /* flush && sanity check */
> -               WARN_ON(!(tmp & HOST_AHCI_EN));
> +               if (tmp & HOST_AHCI_EN)
> +                       return;
> +               msleep(10);
>         }
> +
> +       WARN_ON(1);
>  }

Heh... your patch is white-space broken.  Just save whole mail to a file 
and use filterdiff to extract patch.  Copy & pasting doesn't always work.

-- 
tejun

  reply	other threads:[~2008-04-25  1:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 11:52 [PATCH] ahci: retry enabling AHCI a few times before spitting out WARN_ON() Tejun Heo
2008-04-24  0:24 ` Volker Armin Hemmann
2008-04-24  1:34   ` Tejun Heo
2008-04-24  1:51     ` Volker Armin Hemmann
2008-04-24  2:57       ` Tejun Heo
2008-04-24  3:28         ` Volker Armin Hemmann
2008-04-24  3:36           ` Tejun Heo
2008-04-24  3:57             ` Volker Armin Hemmann
2008-04-24  4:01               ` Tejun Heo
2008-04-24  4:15                 ` Volker Armin Hemmann
2008-04-24  4:20                   ` Tejun Heo
2008-04-24  4:32                     ` Volker Armin Hemmann
2008-04-25  0:17                     ` Volker Armin Hemmann
2008-04-25  0:44                       ` Tejun Heo
2008-04-25  1:17                         ` Volker Armin Hemmann
2008-04-25  1:59                           ` Tejun Heo [this message]
2008-04-25  2:40                             ` Volker Armin Hemmann
2008-04-25  4:47 ` Jeff Garzik

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=48113AE6.6060904@gmail.com \
    --to=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=pchen@nvidia.com \
    --cc=volker.armin.hemmann@tu-clausthal.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;
as well as URLs for NNTP newsgroup(s).