Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1441618 > unrolled thread

Re: 答复: BUG: INTx is assered unexpectly when unload AHCI driver with MSIx support.

Started by"tj@kernel.org" <tj@kernel.org>
First post2016-07-12 19:40 +0200
Last post2016-07-19 00:30 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: 答复: BUG: INTx is assered  unexpectly when unload AHCI driver with MSIx support. "tj@kernel.org" <tj@kernel.org> - 2016-07-12 19:40 +0200
    Re: BUG: INTx is assered unexpectly when unload AHCI driver with  MSIx support. "tj@kernel.org" <tj@kernel.org> - 2016-07-19 00:30 +0200

#1441618 — Re: 答复: BUG: INTx is assered unexpectly when unload AHCI driver with MSIx support.

From"tj@kernel.org" <tj@kernel.org>
Date2016-07-12 19:40 +0200
SubjectRe: 答复: BUG: INTx is assered unexpectly when unload AHCI driver with MSIx support.
Message-ID<rU9P4-85j-21@gated-at.bofh.it>
Hello,

On Mon, Jul 11, 2016 at 05:16:00AM +0000, Pang Raymond wrote:
> static irqreturn_t  ahci_multi_irqs_intr_hard(int irq,
> void *dev_instance)
> {
>       //  omitting unconcerned codes here
>       //  ...
>            status = readl(port_mmio + PORT_IRQ_STAT);
>            writel(status, port_mmio + PORT_IRQ_STAT);
> 
>       // add patch code here.
> +         writel(1 << ap->port_no, ap->host->iomap + HOST_IRQ_STAT);
> 
>       // ...

I think it'd be better to avoid adding stuff to the hot path.  This
only matters when the device is shut down, right?  Can't it just be
cleared in the driver cleanup path?

Thanks.

-- 
tejun

[toc] | [next] | [standalone]


#1445882 — Re: BUG: INTx is assered unexpectly when unload AHCI driver with MSIx support.

From"tj@kernel.org" <tj@kernel.org>
Date2016-07-19 00:30 +0200
SubjectRe: BUG: INTx is assered unexpectly when unload AHCI driver with MSIx support.
Message-ID<rWpd0-3MR-23@gated-at.bofh.it>
In reply to#1441618
Hello, Pang.

On Fri, Jul 15, 2016 at 12:39:59PM +0000, Pang Raymond wrote:
> Hi Tejun,
> 
> 
> Yes! It only happens when the device is shutdown.
> 
> I think you're right. It's more wiser to add clearing operation to driver
> 
> clean up path.
> 
> So we can add it to ahci_port_stop()
> 
> 
> libahci.c is got from Kernel 4.6.3 stable
> 
> ============================================================
> 
> --- drivers/ata/libahci.c.old 2016-07-15 13:33:47.489620405 +0800
> +++ drivers/ata/libahci.c 2016-07-15 14:01:33.081574586 +0800
> @@ -2392,12 +2392,18 @@
> static void ahci_port_stop(struct ata_port *ap)
> {
>   const char *emsg = NULL;
> + struct ahci_host_priv *hpriv = ap->host->private_data;
> + void __iomem *host_mmio = hpriv->mmio;
>   int rc;
> 
>   /* de-initialize port */
>   rc = ahci_deinit_port(ap, &emsg);
>   if (rc)
>    ata_port_warn(ap, "%s (%d)\n", emsg, rc);
> +
> + /* Clear GHC.IS in case of asserting INTx after disable MSIx and re-enable INTx */
> + writel(1 << ap->port_no, host_mmio + HOST_IRQ_STAT);
> +
> }

Yeah, this looks good to me.  Can you please format the patch
properly, add description and Signed-off-by?

  https://www.kernel.org/doc/Documentation/SubmittingPatches

Thanks.

-- 
tejun

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web