From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>, Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@redhat.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: [PATCH 07/09] sata_mv fix pmp drives not found
Date: Sat, 17 May 2008 13:36:30 -0400 [thread overview]
Message-ID: <482F179E.8020602@rtr.ca> (raw)
In-Reply-To: <482F1759.20905@rtr.ca>
Part three of simplifying/fixing handling of the main_irq_mask register
to resolve unexpected interrupt issues observed in 2.6.26-rc*.
Partially fix a reported bug whereby we sometimes miss seeing drives on
a port-multiplier, as reported by Gwendal Grignou <gwendal@google.com>.
The problem was that we were receiving unexpected interrupts
during EH from POLLed commands while accessing port-multiplier registers.
These unexpected interrupts can be prevented by masking the DONE_IRQ bit
for the port whenever not operating in EDMA mode.
Also fix port_stop() to mask all port interrupts.
Signed-off-by: Mark Lord <mlord@pobox.com>
--- old/drivers/ata/sata_mv.c 2008-05-16 16:04:45.000000000 -0400
+++ linux/drivers/ata/sata_mv.c 2008-05-16 16:05:48.000000000 -0400
@@ -908,6 +908,7 @@
writelfl(0, port_mmio + SATA_FIS_IRQ_CAUSE_OFS);
mv_set_edma_ptrs(port_mmio, hpriv, pp);
+ mv_enable_port_irqs(ap, DONE_IRQ|ERR_IRQ);
writelfl(EDMA_EN, port_mmio + EDMA_CMD_OFS);
pp->pp_flags |= MV_PP_FLAG_EDMA_EN;
@@ -1360,6 +1361,7 @@
static void mv_port_stop(struct ata_port *ap)
{
mv_stop_edma(ap);
+ mv_enable_port_irqs(ap, 0);
mv_port_free_dma_mem(ap);
}
@@ -1601,6 +1603,7 @@
* shadow block, etc registers.
*/
mv_stop_edma(ap);
+ mv_enable_port_irqs(ap, ERR_IRQ);
mv_pmp_select(ap, qc->dev->link->pmp);
return ata_sff_qc_issue(qc);
}
@@ -2800,7 +2803,7 @@
hc_irq_cause &= ~((DEV_IRQ | DMA_IRQ) << hardport);
writelfl(hc_irq_cause, hc_mmio + HC_IRQ_CAUSE_OFS);
- mv_enable_port_irqs(ap, DONE_IRQ | ERR_IRQ);
+ mv_enable_port_irqs(ap, ERR_IRQ);
}
/**
next prev parent reply other threads:[~2008-05-17 17:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 13:18 [PATCH 01/04] sata_mv always do softreset Mark Lord
2008-05-14 13:19 ` [PATCH 02/04] sata_mv fis irq register fixes Mark Lord
2008-05-14 13:21 ` [PATCH 03/04] sata_mv group genIIe flags Mark Lord
2008-05-14 13:24 ` [PATCH 04/04] sata_mv async notify for genIIe only Mark Lord
2008-05-17 17:34 ` [PATCH 05/09] sata_mv don't blindly enable IRQs Mark Lord
2008-05-17 17:35 ` [PATCH 06/09] sata_mv consolidate main_irq_mask updates Mark Lord
2008-05-17 17:36 ` Mark Lord [this message]
2008-05-17 17:37 ` [PATCH 08/09] sata_mv disregard masked irqs Mark Lord
2008-05-17 17:38 ` [PATCH 09/09] sata_mv cache main_irq_mask register in hpriv Mark Lord
2008-05-19 13:01 ` [PATCH 10/10] sata_mv: ensure empty request queue for FBS-NCQ EH Mark Lord
2008-05-19 21:41 ` Jeff Garzik
2008-05-19 21:42 ` Jeff Garzik
2008-05-19 18:27 ` [PATCH 09/09] sata_mv cache main_irq_mask register in hpriv Grant Grundler
2008-05-17 17:41 ` [PATCH 05/09] sata_mv don't blindly enable IRQs Jeff Garzik
2008-05-17 17:45 ` Mark Lord
2008-05-17 17:49 ` 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=482F179E.8020602@rtr.ca \
--to=liml@rtr.ca \
--cc=alan@redhat.com \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
/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).