From: Mark Lord <liml@rtr.ca>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Saeed Bishara <saeed@marvell.com>,
linux-ide@vger.kernel.org, Jeff Garzik <jeff@garzik.org>
Subject: Re: [PATCH,RFC] sata_mv: don't avoid clearing interrupt status on SoC host adapters
Date: Tue, 26 Aug 2008 09:50:23 -0400 [thread overview]
Message-ID: <48B40A1F.6090703@rtr.ca> (raw)
In-Reply-To: <20080824030429.GA10230@xi.wantstofly.org>
Lennert Buytenhek wrote:
> For some reason, sata_mv doesn't clear interrupt status during init
> when it's running on an SoC host adapter. If the bootloader has
> touched the SATA controller before starting Linux, Linux can end up
> enabling the SATA interrupt with events pending, which will cause the
> interrupt to be marked as spurious and then be disabled, which then
> breaks all further accesses to the controller.
>
> This patch makes the SoC path clear interrupt status on init like in
> the non-SoC case.
>
> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
> ---
> drivers/ata/sata_mv.c | 21 ++++++++++-----------
> 1 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
> index ad169ff..e829a3a 100644
> --- a/drivers/ata/sata_mv.c
> +++ b/drivers/ata/sata_mv.c
> @@ -3131,19 +3131,18 @@ static int mv_init_host(struct ata_host *host, unsigned int board_idx)
> writelfl(0, hc_mmio + HC_IRQ_CAUSE_OFS);
> }
>
> - if (!IS_SOC(hpriv)) {
> - /* Clear any currently outstanding host interrupt conditions */
> - writelfl(0, mmio + hpriv->irq_cause_ofs);
> + /* Clear any currently outstanding host interrupt conditions */
> + writelfl(0, mmio + hpriv->irq_cause_ofs);
>
> - /* and unmask interrupt generation for host regs */
> - writelfl(hpriv->unmask_all_irqs, mmio + hpriv->irq_mask_ofs);
> + /* and unmask interrupt generation for host regs */
> + writelfl(hpriv->unmask_all_irqs, mmio + hpriv->irq_mask_ofs);
> +
> + /*
> + * enable only global host interrupts for now.
> + * The per-port interrupts get done later as ports are set up.
> + */
> + mv_set_main_irq_mask(host, 0, PCI_ERR);
>
> - /*
> - * enable only global host interrupts for now.
> - * The per-port interrupts get done later as ports are set up.
> - */
> - mv_set_main_irq_mask(host, 0, PCI_ERR);
> - }
> done:
> return rc;
> }
Looks fine to me -- Saeed Bishara did the SOC stuff, and Marvell refuses to show
me any documentation for it. So if it works for you, then let's put it in there.
Or maybe get Saeed's sign-off first.
Cheers
next prev parent reply other threads:[~2008-08-26 13:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-24 3:04 [PATCH,RFC] sata_mv: don't avoid clearing interrupt status on SoC host adapters Lennert Buytenhek
2008-08-26 13:50 ` Mark Lord [this message]
2008-08-28 20:04 ` Lennert Buytenhek
2008-08-28 10:28 ` saeed bishara
2009-01-10 18:41 ` Martin Michlmayr
2009-01-12 21:27 ` Grant Grundler
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=48B40A1F.6090703@rtr.ca \
--to=liml@rtr.ca \
--cc=buytenh@wantstofly.org \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=saeed@marvell.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 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).