diff mbox

eata fails to load on post 4.2 kernels

Message ID 55F13644.2080203@internode.on.net (mailing list archive)
State New, archived
Headers show

Commit Message

Arthur Marsh Sept. 10, 2015, 7:50 a.m. UTC
Jiang Liu wrote on 08/09/15 14:49:
> Hi Auhur,
> 	Could you please help to apply the test patch
> against the latest mainstream linux kernel?
> Thanks!
> Gerry
...

>>>> git bisect good
>>>> 991de2e59090e55c65a7f59a049142e3c480f7bd is the first bad commit
>>>> commit 991de2e59090e55c65a7f59a049142e3c480f7bd
>>>> Author: Jiang Liu <jiang.liu@linux.intel.com>
>>>> Date:   Wed Jun 10 16:54:59 2015 +0800
>>>>
>>>>       PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()
>>>>
>>>>       To support IOAPIC hotplug, we need to allocate PCI IRQ resources on
>>>> demand
>>>>       and free them when not used anymore.
>>>>
>>>>       Implement pcibios_alloc_irq() and pcibios_free_irq() to dynamically
>>>>       allocate and free PCI IRQs.
>>>>
>>>>       Remove mp_should_keep_irq(), which is no longer used.
>>>>
>>>>       [bhelgaas: changelog]
>>>>       Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
>>>>       Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>>>>       Acked-by: Thomas Gleixner <tglx@linutronix.de>
>>>>
>>>> :040000 040000 765e2d5232d53247ec260b34b51589c3bccb36ae
>>>> f680234a27685e94b1a35ae2a7218f8eafa9071a M      arch
>>>> :040000 040000 d55a682bcde72682e883365e88ad1df6186fd54d
>>>> f82c470a04a6845fcf5e0aa934512c75628f798d M      drivers

I tried to do a kexec shut-down with the first version of your patch:

 >From 3085626fb2e677c1d88f158397948935b73f5239 Mon Sep 17 00:00:00 2001
From: Jiang Liu <jiang.liu@linux.intel.com>
Date: Tue, 8 Sep 2015 10:41:19 +0800
Subject: [PATCH]


Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
  drivers/pci/pci-driver.c |    1 +
  drivers/scsi/eata.c      |    2 ++
  2 files changed, 3 insertions(+)

Comments

Jiang Liu Sept. 10, 2015, 8:13 a.m. UTC | #1
Hi Authur,
	Thanks for the updating. Seem Bjorn doesn't like
neither of my two patches. So I'm trying to convert eata
to formal PCI driver, but the change will be much more
bigger and still not sure whether we could achieve that.
Will keep you updated.
Thanks!
Gerry

On 2015/9/10 15:50, Arthur Marsh wrote:
> 
> 
> Jiang Liu wrote on 08/09/15 14:49:
>> Hi Auhur,
>>     Could you please help to apply the test patch
>> against the latest mainstream linux kernel?
>> Thanks!
>> Gerry
> ...
> 
>>>>> git bisect good
>>>>> 991de2e59090e55c65a7f59a049142e3c480f7bd is the first bad commit
>>>>> commit 991de2e59090e55c65a7f59a049142e3c480f7bd
>>>>> Author: Jiang Liu <jiang.liu@linux.intel.com>
>>>>> Date:   Wed Jun 10 16:54:59 2015 +0800
>>>>>
>>>>>       PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()
>>>>>
>>>>>       To support IOAPIC hotplug, we need to allocate PCI IRQ
>>>>> resources on
>>>>> demand
>>>>>       and free them when not used anymore.
>>>>>
>>>>>       Implement pcibios_alloc_irq() and pcibios_free_irq() to
>>>>> dynamically
>>>>>       allocate and free PCI IRQs.
>>>>>
>>>>>       Remove mp_should_keep_irq(), which is no longer used.
>>>>>
>>>>>       [bhelgaas: changelog]
>>>>>       Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
>>>>>       Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>>>>>       Acked-by: Thomas Gleixner <tglx@linutronix.de>
>>>>>
>>>>> :040000 040000 765e2d5232d53247ec260b34b51589c3bccb36ae
>>>>> f680234a27685e94b1a35ae2a7218f8eafa9071a M      arch
>>>>> :040000 040000 d55a682bcde72682e883365e88ad1df6186fd54d
>>>>> f82c470a04a6845fcf5e0aa934512c75628f798d M      drivers
> 
> I tried to do a kexec shut-down with the first version of your patch:
> 
>>From 3085626fb2e677c1d88f158397948935b73f5239 Mon Sep 17 00:00:00 2001
> From: Jiang Liu <jiang.liu@linux.intel.com>
> Date: Tue, 8 Sep 2015 10:41:19 +0800
> Subject: [PATCH]
> 
> 
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arthur Marsh Sept. 10, 2015, 9 a.m. UTC | #2
Jiang Liu wrote on 10/09/15 17:43:
> Hi Authur,
> 	Thanks for the updating. Seem Bjorn doesn't like
> neither of my two patches. So I'm trying to convert eata
> to formal PCI driver, but the change will be much more
> bigger and still not sure whether we could achieve that.
> Will keep you updated.
> Thanks!
> Gerry

Thanks, I'm a bit concerned since the original

commit 991de2e59090e55c65a7f59a049142e3c480f7bd

broke things badly for me (requiring irqpoll to avoid a kernel hang) and 
neither of the patches enabled kexec reboots to work like before the 
original commit.

I just tested a kexec reboot with irqpoll enabled and that continues to 
fail, so I'm back to running 4.2 kernel until there is a patch that 
works with kexec reboots.

Arthur.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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