* [PATCH] ahci: kill leftover from enabling NCQ over PMP
@ 2007-10-09 5:59 Tejun Heo
2007-10-09 6:01 ` [PATCH] ahci: clean up PORT_IRQ_BAD_PMP enabling Tejun Heo
2007-10-10 1:41 ` [PATCH] ahci: kill leftover from enabling NCQ over PMP Jeff Garzik
0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2007-10-09 5:59 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
ahci had problems with NCQ over PMP and NCQ used to be disabled while
PMP was attached. After fixing the problem, the temporary NCQ
disabling code wasn't removed completely. Kill the remaining piece.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/ata/ahci.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 24fb90f..694eabc 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1677,19 +1677,11 @@ static void ahci_pmp_attach(struct ata_port *ap)
static void ahci_pmp_detach(struct ata_port *ap)
{
void __iomem *port_mmio = ahci_port_base(ap);
- struct ahci_host_priv *hpriv = ap->host->private_data;
- unsigned long flags;
u32 cmd;
cmd = readl(port_mmio + PORT_CMD);
cmd &= ~PORT_CMD_PMP;
writel(cmd, port_mmio + PORT_CMD);
-
- if (hpriv->cap & HOST_CAP_NCQ) {
- spin_lock_irqsave(ap->lock, flags);
- ap->flags |= ATA_FLAG_NCQ;
- spin_unlock_irqrestore(ap->lock, flags);
- }
}
static int ahci_pmp_read(struct ata_device *dev, int pmp, int reg, u32 *r_val)
--
1.5.0.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH] ahci: clean up PORT_IRQ_BAD_PMP enabling
2007-10-09 5:59 [PATCH] ahci: kill leftover from enabling NCQ over PMP Tejun Heo
@ 2007-10-09 6:01 ` Tejun Heo
2007-10-10 1:41 ` [PATCH] ahci: kill leftover from enabling NCQ over PMP Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2007-10-09 6:01 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
Now that we have pp->intr_mask, move PORT_IRQ_BAD_PMP enabling to
ahci_pmp_attach/detach() where it belongs.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/ata/ahci.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 694eabc..6633c74 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1620,11 +1620,8 @@ static void ahci_thaw(struct ata_port *ap)
writel(tmp, port_mmio + PORT_IRQ_STAT);
writel(1 << ap->port_no, mmio + HOST_IRQ_STAT);
- /* turn IRQ back on, ignore BAD_PMP if PMP isn't attached */
- tmp = pp->intr_mask;
- if (!ap->nr_pmp_links)
- tmp &= ~PORT_IRQ_BAD_PMP;
- writel(tmp, port_mmio + PORT_IRQ_MASK);
+ /* turn IRQ back on */
+ writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
}
static void ahci_error_handler(struct ata_port *ap)
@@ -1667,21 +1664,29 @@ static void ahci_post_internal_cmd(struct ata_queued_cmd *qc)
static void ahci_pmp_attach(struct ata_port *ap)
{
void __iomem *port_mmio = ahci_port_base(ap);
+ struct ahci_port_priv *pp = ap->private_data;
u32 cmd;
cmd = readl(port_mmio + PORT_CMD);
cmd |= PORT_CMD_PMP;
writel(cmd, port_mmio + PORT_CMD);
+
+ pp->intr_mask |= PORT_IRQ_BAD_PMP;
+ writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
}
static void ahci_pmp_detach(struct ata_port *ap)
{
void __iomem *port_mmio = ahci_port_base(ap);
+ struct ahci_port_priv *pp = ap->private_data;
u32 cmd;
cmd = readl(port_mmio + PORT_CMD);
cmd &= ~PORT_CMD_PMP;
writel(cmd, port_mmio + PORT_CMD);
+
+ pp->intr_mask &= ~PORT_IRQ_BAD_PMP;
+ writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
}
static int ahci_pmp_read(struct ata_device *dev, int pmp, int reg, u32 *r_val)
--
1.5.0.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ahci: kill leftover from enabling NCQ over PMP
2007-10-09 5:59 [PATCH] ahci: kill leftover from enabling NCQ over PMP Tejun Heo
2007-10-09 6:01 ` [PATCH] ahci: clean up PORT_IRQ_BAD_PMP enabling Tejun Heo
@ 2007-10-10 1:41 ` Jeff Garzik
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-10-10 1:41 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
Tejun Heo wrote:
> ahci had problems with NCQ over PMP and NCQ used to be disabled while
> PMP was attached. After fixing the problem, the temporary NCQ
> disabling code wasn't removed completely. Kill the remaining piece.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> drivers/ata/ahci.c | 8 --------
> 1 files changed, 0 insertions(+), 8 deletions(-)
applied both
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-10 1:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-09 5:59 [PATCH] ahci: kill leftover from enabling NCQ over PMP Tejun Heo
2007-10-09 6:01 ` [PATCH] ahci: clean up PORT_IRQ_BAD_PMP enabling Tejun Heo
2007-10-10 1:41 ` [PATCH] ahci: kill leftover from enabling NCQ over PMP Jeff Garzik
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).