Message ID | 20140415181812.GA11614@dhcp-10-15-1-70.hsv.redhat.com |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
On Tue, Apr 15, 2014 at 01:18:12PM -0500, David Milburn wrote: > This patch also solves the problem, would this better? Yes, this is a lot better. Alexander, does this look good to you? Also, shouldn't this cc stable? > diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c > index 5a0bf8e..831b1b4 100644 > --- a/drivers/ata/ahci.c > +++ b/drivers/ata/ahci.c > @@ -1236,14 +1236,14 @@ int ahci_host_activate(struct ata_host *host, int irq, unsigned int n_msis) > struct ahci_port_priv *pp = host->ports[i]->private_data; > > /* pp is NULL for dummy ports */ > - if (pp) > + if (pp) { > desc = pp->irq_desc; > - else > - desc = dev_driver_string(host->dev); > > - rc = devm_request_threaded_irq(host->dev, > - irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, > - desc, host->ports[i]); > + rc = devm_request_threaded_irq(host->dev, > + irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, > + desc, host->ports[i]); > + } > + > if (rc) > goto out_free_irqs; > }
On Tue, Apr 15, 2014 at 02:20:01PM -0400, Tejun Heo wrote: > On Tue, Apr 15, 2014 at 01:18:12PM -0500, David Milburn wrote: > > This patch also solves the problem, would this better? > > Yes, this is a lot better. Alexander, does this look good to you? Yep, apart from a minor comment below. Also, we're not going to see complains on spurious interrupts, aren't we? > Also, shouldn't this cc stable? > > > diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c > > index 5a0bf8e..831b1b4 100644 > > --- a/drivers/ata/ahci.c > > +++ b/drivers/ata/ahci.c > > @@ -1236,14 +1236,14 @@ int ahci_host_activate(struct ata_host *host, int irq, unsigned int n_msis) > > struct ahci_port_priv *pp = host->ports[i]->private_data; > > > > /* pp is NULL for dummy ports */ > > - if (pp) > > + if (pp) { > > desc = pp->irq_desc; > > - else > > - desc = dev_driver_string(host->dev); > > > > - rc = devm_request_threaded_irq(host->dev, > > - irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, > > - desc, host->ports[i]); > > + rc = devm_request_threaded_irq(host->dev, > > + irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, > > + desc, host->ports[i]); We could dereference 'pp->irq_desc' here and get rid of 'desc' variable. > > + } > > + > > if (rc) > > goto out_free_irqs; > > } > > -- > tejun
Hello, On Wed, Apr 16, 2014 at 09:39:19AM +0200, Alexander Gordeev wrote: > On Tue, Apr 15, 2014 at 02:20:01PM -0400, Tejun Heo wrote: > > On Tue, Apr 15, 2014 at 01:18:12PM -0500, David Milburn wrote: > > > This patch also solves the problem, would this better? > > > > Yes, this is a lot better. Alexander, does this look good to you? > > Yep, apart from a minor comment below. > Also, we're not going to see complains on spurious interrupts, aren't we? The irq isn't even requested, it won't reach the kernel at all. > > Also, shouldn't this cc stable? Yeap, I think so. > > > - rc = devm_request_threaded_irq(host->dev, > > > - irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, > > > - desc, host->ports[i]); > > > + rc = devm_request_threaded_irq(host->dev, > > > + irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, > > > + desc, host->ports[i]); > > We could dereference 'pp->irq_desc' here and get rid of 'desc' variable. David, can you please update the patch accordingly? Thanks!
On 04/16/2014 10:19 AM, Tejun Heo wrote: > Hello, > > On Wed, Apr 16, 2014 at 09:39:19AM +0200, Alexander Gordeev wrote: >> On Tue, Apr 15, 2014 at 02:20:01PM -0400, Tejun Heo wrote: >>> On Tue, Apr 15, 2014 at 01:18:12PM -0500, David Milburn wrote: >>>> This patch also solves the problem, would this better? >>> >>> Yes, this is a lot better. Alexander, does this look good to you? >> >> Yep, apart from a minor comment below. >> Also, we're not going to see complains on spurious interrupts, aren't we? > > The irq isn't even requested, it won't reach the kernel at all. > >>> Also, shouldn't this cc stable? > > Yeap, I think so. > >>>> - rc = devm_request_threaded_irq(host->dev, >>>> - irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, >>>> - desc, host->ports[i]); >>>> + rc = devm_request_threaded_irq(host->dev, >>>> + irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, >>>> + desc, host->ports[i]); >> >> We could dereference 'pp->irq_desc' here and get rid of 'desc' variable. > > David, can you please update the patch accordingly? Hi, Sure, I have successfully re-tested, I will re-submit the patch. Thanks, David -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Apr 16, 2014 at 11:19:32AM -0400, Tejun Heo wrote: > > Also, we're not going to see complains on spurious interrupts, aren't we? > > The irq isn't even requested, it won't reach the kernel at all. The crash occured in ahci_hw_interrupt() which means multiple MSIs were enabled. The fact driver does not request IRQ does not mean the PCI device does not send an MSI interrupt (and it does as we're observing the crash). So my question if the dummy port interrupt does not end up in handle_bad_irq() or some? Thanks!
Hello, On Wed, Apr 16, 2014 at 08:51:05PM +0200, Alexander Gordeev wrote: > The crash occured in ahci_hw_interrupt() which means multiple MSIs > were enabled. The fact driver does not request IRQ does not mean > the PCI device does not send an MSI interrupt (and it does as we're > observing the crash). So my question if the dummy port interrupt > does not end up in handle_bad_irq() or some? My memory is kinda fuzzy now but several stray interrupts don't trigger anything. Thanks.
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 5a0bf8e..831b1b4 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1236,14 +1236,14 @@ int ahci_host_activate(struct ata_host *host, int irq, unsigned int n_msis) struct ahci_port_priv *pp = host->ports[i]->private_data; /* pp is NULL for dummy ports */ - if (pp) + if (pp) { desc = pp->irq_desc; - else - desc = dev_driver_string(host->dev); - rc = devm_request_threaded_irq(host->dev, - irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, - desc, host->ports[i]); + rc = devm_request_threaded_irq(host->dev, + irq + i, ahci_hw_interrupt, ahci_thread_fn, IRQF_SHARED, + desc, host->ports[i]); + } + if (rc) goto out_free_irqs; }