From: Tejun Heo <htejun@gmail.com>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: Jeff Garzik <jeff@garzik.org>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.19 2/3] sata_promise: new EH conversion
Date: Sun, 03 Dec 2006 22:00:42 +0900 [thread overview]
Message-ID: <4572CA7A.6010103@gmail.com> (raw)
In-Reply-To: <200612010958.kB19wGbg002454@alkaid.it.uu.se>
Hello, Mikael.
Thanks for doing this.
Mikael Pettersson wrote:
[--snip--]
> +static void pdc_freeze(struct ata_port *ap)
> +{
> + void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr;
> + u32 tmp;
> +
> + tmp = readl(mmio + PDC_CTLSTAT);
> + tmp |= PDC_IRQ_DISABLE;
> + tmp &= ~PDC_DMA_ENABLE;
> + writel(tmp, mmio + PDC_CTLSTAT);
> + readl(mmio + PDC_CTLSTAT); /* flush *//* XXX: needed? sata_sil does this */
Just drop the above line.
> +}
> +
> +static void pdc_thaw(struct ata_port *ap)
> +{
> + void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr;
> + u32 tmp;
> +
> + /* clear IRQ */
> + readl(mmio + PDC_INT_SEQMASK);
> +
> + /* turn IRQ back on */
> + tmp = readl(mmio + PDC_CTLSTAT);
> + tmp &= ~PDC_IRQ_DISABLE;
> + writel(tmp, mmio + PDC_CTLSTAT);
> + readl(mmio + PDC_CTLSTAT); /* flush *//* XXX: needed? */
Ditto.
> +}
> +
> +static void pdc_error_handler(struct ata_port *ap)
> +{
> + struct ata_eh_context *ehc = &ap->eh_context;
> + ata_reset_fn_t hardreset;
> +
> + /* stop DMA, mask IRQ, don't clobber anything else */
> + ata_eh_freeze_port(ap);
Don't freeze port unconditionally. You'll end up hardresetting on every
error. Just make sure DMA engine is stopped and the controller is in a
sane state. If that fails, then, the port should be frozen.
> + hardreset = NULL;
> + if (sata_scr_valid(ap)) {
> + ehc->i.action |= ATA_EH_HARDRESET;
Why always force HARDRESET?
> + hardreset = sata_std_hardreset;
> + }
--
tejun
next prev parent reply other threads:[~2006-12-03 13:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 9:58 [PATCH 2.6.19 2/3] sata_promise: new EH conversion Mikael Pettersson
2006-12-03 13:00 ` Tejun Heo [this message]
2006-12-03 13:03 ` Jeff Garzik
2006-12-03 13:19 ` Tejun Heo
2006-12-03 14:16 ` Arjan van de Ven
2006-12-06 9:38 ` Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2006-12-06 8:52 Mikael Pettersson
2006-12-06 9:40 ` Tejun Heo
2006-12-06 8:53 Mikael Pettersson
2006-12-06 9:13 ` Jeff Garzik
2006-12-06 9:19 ` 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=4572CA7A.6010103@gmail.com \
--to=htejun@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
/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.