Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1222045
| From | Jiang Liu <jiang.liu@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers |
| Date | 2015-09-10 11:00 +0200 |
| Message-ID | <q75S3-4Wf-19@gated-at.bofh.it> (permalink) |
| References | <q6kJs-4IZ-9@gated-at.bofh.it> <q6lvP-5SG-1@gated-at.bofh.it> <q6tWq-16N-23@gated-at.bofh.it> <q6upt-1Fu-15@gated-at.bofh.it> <q6T4t-3Lr-5@gated-at.bofh.it> |
| Organization | Intel |
On 2015/9/10 3:11, Bjorn Helgaas wrote:
> On Tue, Sep 8, 2015 at 11:49 AM, Jiang Liu <jiang.liu@linux.intel.com> wrote:
>> Hi Bjorn,
>> We have used another draft version to fix this issue by changing
>> eata driver as below. But that needs to export pcibios_alloc_irq. And
>> I'm not sure whether there are other drivers having the same behavior.
>> If we think it's a legacy behavior and only a few drivers may have
>> such a behavior, I prefer changing drivers to fix the issue too.
>
> Did you look at changing the driver to use pci_register_driver()? I
> bet it's pretty straightforward.
Hi Bjorn,
I have done some investigation. It's doable, but the change
may be a little bigger. Will send the patch out for comments once
it's done.
Thanks!
Gerry
>
>> drivers/pci/pci-driver.c | 1 +
>> drivers/scsi/eata.c | 2 ++
>> 2 files changed, 3 insertions(+)
>>
>> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
>> index 52a880ca1768..17d2a0b1de18 100644
>> --- a/drivers/pci/pci-driver.c
>> +++ b/drivers/pci/pci-driver.c
>> @@ -392,6 +392,7 @@ int __weak pcibios_alloc_irq(struct pci_dev *dev)
>> {
>> return 0;
>> }
>> +EXPORT_SYMBOL_GPL(pcibios_alloc_irq);
>>
>> void __weak pcibios_free_irq(struct pci_dev *dev)
>> {
>> diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
>> index 227dd2c2ec2f..7e6eaf867987 100644
>> --- a/drivers/scsi/eata.c
>> +++ b/drivers/scsi/eata.c
>> @@ -1061,6 +1061,7 @@ static void enable_pci_ports(void)
>> driver_name, dev->bus->number, dev->devfn);
>> #endif
>>
>> + pcibios_alloc_irq(dev);
>> if (pci_enable_device(dev))
>> printk
>> ("%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n",
>> @@ -1520,6 +1521,7 @@ static void add_pci_ports(void)
>> if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev)))
>> break;
>>
>> + pcibios_alloc_irq(dev);
>> if (pci_enable_device(dev)) {
>> #if defined(DEBUG_PCI_DETECT)
>> printk
>>
>>
>>>
>>>> return pci_enable_resources(dev, mask);
>>>> }
>>>>
>>>> --
>>>> 1.7.10.4
>>>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-08 09:30 +0200
Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Arthur Marsh <arthur.marsh@internode.on.net> - 2015-09-08 11:10 +0200
Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-08 11:50 +0200
Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Bjorn Helgaas <bhelgaas@google.com> - 2015-09-08 18:30 +0200
Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-08 19:00 +0200
Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Bjorn Helgaas <bhelgaas@google.com> - 2015-09-09 21:20 +0200
Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-10 11:00 +0200
[Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-14 05:10 +0200
Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Hannes Reinecke <hare@suse.de> - 2015-09-14 10:30 +0200
Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-14 10:40 +0200
RE: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal "Ballabio, Dario" <dario.ballabio@emc.com> - 2015-09-14 10:40 +0200
Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Christoph Hellwig <hch@infradead.org> - 2015-09-16 15:50 +0200
Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-17 08:50 +0200
Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Arthur Marsh <arthur.marsh@internode.on.net> - 2015-09-18 17:10 +0200
[RFT v3] eata: Convert eata driver as normal PCI and platform device drivers Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-22 09:30 +0200
[Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-14 05:10 +0200
[Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-14 05:10 +0200
Re: [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices Hannes Reinecke <hare@suse.de> - 2015-09-14 10:20 +0200
Re: [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-14 10:40 +0200
[Bugfix 1/3] eata: Use IDA to manage eata board IDs Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-14 05:10 +0200
Re: [Bugfix 1/3] eata: Use IDA to manage eata board IDs Hannes Reinecke <hare@suse.de> - 2015-09-14 10:10 +0200
Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver Arthur Marsh <arthur.marsh@internode.on.net> - 2015-09-14 18:10 +0200
Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-15 04:40 +0200
Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-16 07:10 +0200
Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver Arthur Marsh <arthur.marsh@internode.on.net> - 2015-09-16 09:40 +0200
Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu <jiang.liu@linux.intel.com> - 2015-09-16 10:30 +0200
Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver Arthur Marsh <arthur.marsh@internode.on.net> - 2015-09-16 13:40 +0200
Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Arthur Marsh <arthur.marsh@internode.on.net> - 2015-09-09 21:10 +0200
csiph-web