Re: eata fails to load on post 4.2 kernels

2015-09-06 Thread Jiang Liu
target ID 7. > > After a git bisect, I get: > > git bisect good > 991de2e59090e55c65a7f59a049142e3c480f7bd is the first bad commit > commit 991de2e59090e55c65a7f59a049142e3c480f7bd > Author: Jiang Liu > Date: Wed Jun 10 16:54:59 2015 +0800 > > PCI, x86: Implem

Re: eata fails to load on post 4.2 kernels

2015-09-07 Thread Jiang Liu
Hi Auhur, Could you please help to apply the test patch against the latest mainstream linux kernel? Thanks! Gerry On 2015/9/7 14:26, Arthur Marsh wrote: > > > Jiang Liu wrote on 07/09/15 12:36: >> On 2015/9/7 4:31, Arthur Marsh wrote: >>> Arthur Marsh

Re: eata fails to load on post 4.2 kernels

2015-09-07 Thread Jiang Liu
On 2015/9/8 14:32, 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 > > Done, and it appears to work pro

[Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers

2015-09-08 Thread Jiang Liu
d to manage the PCI device. So detect such a case in pcibios_enable_device() by checking pci_dev->driver is NULL and call pcibios_alloc_irq() to allocate PCI legacy IRQs. Signed-off-by: Jiang Liu --- arch/x86/pci/common.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/

Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers

2015-09-08 Thread Jiang Liu
On 2015/9/8 17:03, Arthur Marsh wrote: > > > Jiang Liu wrote on 08/09/15 16:56: > Thanks, I removed the test patch and applied the revised patch and built > and rebooted the kernel and successfully mounted file systems on a disk > attached to the DPT 2044W card usi

Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers

2015-09-08 Thread Jiang Liu
7;s at least > debatable whether this is even the "correct" approach; see below. > > On Tue, Sep 08, 2015 at 03:26:29PM +0800, Jiang Liu wrote: >> Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and >> pcibios_free_irq()") changes the way to a

Re: eata fails to load on post 4.2 kernels

2015-09-10 Thread Jiang Liu
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

Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers

2015-09-10 Thread Jiang Liu
On 2015/9/10 3:11, Bjorn Helgaas wrote: > On Tue, Sep 8, 2015 at 11:49 AM, Jiang Liu 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

[Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal

2015-09-13 Thread Jiang Liu
Due to having no hardware for testing, this is just a sample code to support PCI device hot-removal. It just passing compilation, no any tests. Signed-off-by: Jiang Liu --- drivers/scsi/eata.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/scsi/eata.c

[Bugfix 0/3] Convert eata driver to a normal PCI device driver

2015-09-13 Thread Jiang Liu
you could please help to test patch 1-2? Patch 3 is just for comments. Thanks! Gerry Jiang Liu (3): eata: Use IDA to manage eata board IDs eata: Implement PCI driver to manage eata PCI devices eata: Enhance eata driver to support PCI device hot-removal drivers/scsi/eata.c | 232

[Bugfix 1/3] eata: Use IDA to manage eata board IDs

2015-09-13 Thread Jiang Liu
Use IDA to manage eata board IDs, so we could dynamically allocate and free board IDs later. Signed-off-by: Jiang Liu --- drivers/scsi/eata.c | 46 ++ 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/eata.c b/drivers/scsi

[Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices

2015-09-13 Thread Jiang Liu
t also provides headroom for PCI hotplug with eata driver. Signed-off-by: Jiang Liu --- drivers/scsi/eata.c | 170 ++- 1 file changed, 74 insertions(+), 96 deletions(-) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index b45d3b532b70..b92e

Re: [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices

2015-09-14 Thread Jiang Liu
On 2015/9/14 16:17, Hannes Reinecke wrote: > On 09/14/2015 05:08 AM, Jiang Liu wrote: >> Previously the eata driver just grabs and accesses eata PCI devices >> without implementing a PCI device driver, that causes troubles with >> latest IRQ related >> >> Commit 9

Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal

2015-09-14 Thread Jiang Liu
3487978851 > > > > -Original Message- > From: Hannes Reinecke [mailto:h...@suse.de] > Sent: Monday, September 14, 2015 10:21 AM > To: Jiang Liu; Thomas Gleixner; Bjorn Helgaas; Arthur Marsh; Ballabio, Dario; > James E.J. Bottomley > Cc: linux-ker...@vger.k

Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver

2015-09-14 Thread Jiang Liu
On 2015/9/15 0:01, Arthur Marsh wrote: > > > Jiang Liu wrote on 14/09/15 12:38: >> Hi Authur, >> As suggested by Bjorn, patch 1-2 set implement a PCI device >> driver to manage eata PCI devices. And patch 3 tries to support PCI >> device hot-removal for eata,

Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver

2015-09-15 Thread Jiang Liu
On 2015/9/15 15:19, Arthur Marsh wrote: > > > Jiang Liu wrote on 15/09/15 12:01: > >> HI Arthur, >> Really appreciate your help to test the patches. That's >> a good sign we have moved forward a bit:) >> For kexec, it's always challenging

Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver

2015-09-16 Thread Jiang Liu
On 2015/9/16 15:37, Arthur Marsh wrote: > > > Jiang Liu wrote on 16/09/15 14:37: >> On 2015/9/15 15:19, Arthur Marsh wrote: >>> >>> >>> Jiang Liu wrote on 15/09/15 12:01: >>> >>>> HI Arthur, >>>> Really appreciate y

Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal

2015-09-16 Thread Jiang Liu
On 2015/9/16 21:42, Christoph Hellwig wrote: > On Mon, Sep 14, 2015 at 10:21:14AM +0200, Hannes Reinecke wrote: >> Welll ... if you don't have hardware (and I strongly hope you refer to >> 'hardware able to do hotplugging', not 'hardware for the eata driver' >> ...) why add the code at all? >> Chan

[RFT v3] eata: Convert eata driver as normal PCI and platform device drivers

2015-09-22 Thread Jiang Liu
t also provides headroom for PCI hotplug with eata driver. It also represents non-PCI eata devices as platform devices, so it could be managed as normal devices. Signed-off-by: Jiang Liu Cc: Hannes Reinecke Cc: Ballabio, Dario Cc: Christoph Hellwig --- Hi all, I have no hardware to tes

Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers

2015-09-22 Thread Jiang Liu
't related to the kexec/kdump failure. Could you please help to test the attached new version? Thanks! Gerry > > Arthur. >From 2231506adf7da0944fac82ec38040cc2f70562f7 Mon Sep 17 00:00:00 2001 From: Jiang Liu Date: Tue, 22 Sep 2015 10:16:20 +0800 Subject: [Bugfix v3] eata: C

Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers

2015-09-23 Thread Jiang Liu
On 2015/9/23 22:40, James Bottomley wrote: > On Wed, 2015-09-23 at 20:14 +0930, Arthur Marsh wrote: >> >> Jiang Liu wrote on 23/09/15 14:54: >> >>> Hi Arthur, >>> I have found the cause of the warning messages, it's caused >>> by a flaw

Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers

2015-10-03 Thread Jiang Liu
On 2015/9/26 14:27, Arthur Marsh wrote: > > > Arthur Marsh wrote on 24/09/15 15:26: >> >> >> Jiang Liu wrote on 24/09/15 13:58: >> >>> Hi James, >>> Thanks for review. How about the attached patch which addresses >>> the three su

[Bugfix v4 1/2] eata: Convert eata driver as normal PCI and platform device drivers

2015-10-07 Thread Jiang Liu
t also provides headroom for PCI hotplug with eata driver. It also represents non-PCI eata devices as platform devices, so it could be managed as normal devices. Signed-off-by: Jiang Liu Cc: Hannes Reinecke Cc: Ballabio, Dario Cc: Christoph Hellwig --- Hi all, With this patch applied

[Bugfix v4 2/2] eata: Ask for help to reset eata controllers for kexec

2015-10-07 Thread Jiang Liu
llers and lack of hardware for tests, helps from eata experts are really welcomed! Signed-off-by: Jiang Liu --- drivers/scsi/eata.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 7315f8adcf65..b83abe283744 100644 --- a/drivers/

Re: [Bugfix v4 1/2] eata: Convert eata driver as normal PCI and platform device drivers

2015-10-07 Thread Jiang Liu
On 2015/10/8 10:51, Jiang Liu wrote: > Previously the eata driver just grabs and accesses eata PCI devices > without implementing a PCI device driver, that causes troubles with > latest IRQ related > > Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() an

[PATCH] eata: Convert eata driver as normal PCI and platform device drivers

2016-02-29 Thread Jiang Liu
t also provides headroom for PCI hotplug with eata driver. It also represents non-PCI eata devices as platform devices, so it could be managed as normal devices. Signed-off-by: Jiang Liu Cc: Hannes Reinecke Cc: Ballabio, Dario Cc: Christoph Hellwig --- drivers/scs

Re: [PATCH] eata: Convert eata driver as normal PCI and platform device drivers

2016-03-01 Thread Jiang Liu
On 2016/3/2 5:36, Arthur Marsh wrote: > > > Arthur Marsh wrote on 02/03/16 03:57: >> >> >> Christoph Hellwig wrote on 01/03/16 17:22: >>> Hi Jiang. >>> >>> I'd love to see this patch in and abuse of the old PCI API gone. >>> >>> Did you resolve the problems Arthur saw with the previous iteratons

[PATCH v2, part 1 3/9] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead

2013-05-13 Thread Jiang Liu
si@vger.kernel.org Signed-off-by: Jiang Liu --- arch/powerpc/kernel/pci_of_scan.c | 3 +-- arch/sparc/kernel/pci.c | 3 +-- drivers/char/agp/alpha-agp.c | 2 +- drivers/char/agp/parisc-agp.c | 2 +- drivers/pci/iov.c | 8 +--- drivers/pci/probe.c

[PATCH v3, part1 03/10] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead

2013-05-25 Thread Jiang Liu
From: Gu Zheng Use the new pci_alloc_dev(bus) to replace the existing using of alloc_pci_dev(void). v2: Follow Bjorn's correction to move pci_bus_put() to pci_release_dev() instead. v3: release reference to bus on error recovery path Signed-off-by: Gu Zheng Signed-off-by: Jiang Li

Re: [PATCH v3, part1 03/10] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead

2013-06-06 Thread Jiang Liu
On Thu 06 Jun 2013 04:07:18 AM CST, Bjorn Helgaas wrote: > On Sat, May 25, 2013 at 7:48 AM, Jiang Liu wrote: >> From: Gu Zheng >> >> Use the new pci_alloc_dev(bus) to replace the existing using of >> alloc_pci_dev(void). >> ... > >> diff --git a/drivers/

[PATCH] megaraid_sas : Fix bug in handling return value of pci_enable_msix_range()

2014-11-03 Thread Jiang Liu
enirq: Flags mismatch irq 0. (megasas) vs. 00015a00 (tii mer) [ 16.487347] megasas: Failed to register IRQ for vector 0. Fixes: 8ae80ed1734b "megaraid: Use pci_enable_msix_range() instead of pci_enable_msix()" Signed-off-by: Jiang Liu Cc: Alexander Gordeev Cc: "Bjorn

Re: hpsa driver bug crack kernel down!

2014-04-10 Thread Jiang Liu
Hi Baoquan, Could you please help to give output of "lspci -"? Is device "hpsa :03:00.0" a legacy PCI device(non-PCIe)? It may have relationship with IOMMU driver. Thanks! Gerry On 2014/4/10 12:03, Bjorn Helgaas wrote: > [+cc Joerg, iommu list] > > On Wed, Apr 9, 2014 at 6:19 PM,

Re: hpsa driver bug crack kernel down!

2014-04-14 Thread Jiang Liu
uot;Present bit in context entry is clear" fault means that we have >> not set up *any* mappings for this PCI device… on this IOMMU. >> >>>> Yes, specifically (finally done bisecting): >>>> >>>> commit 2e45528930388658603ea24d49cf52867b928d3e >>>> Au

Re: hpsa driver bug crack kernel down!

2014-04-14 Thread Jiang Liu
gt;>>>>>>>>> dmar: DMAR:[DMA Read] Request device [02:00.0] fault addr 7f61e000 >> >> That "Present bit in context entry is clear" fault means that we have >> not set up *any* mappings for this PCI device… on this IOMMU. >> >>>&g

Re: hpsa driver bug crack kernel down!

2014-04-14 Thread Jiang Liu
Hi Davidlohr, Thanks for providing the DMAR table. According to the DMAR table, one bug in the iommu driver fails to handle this entry: [1D2h 0466 1] Device Scope Entry Type : 01 [1D3h 0467 1] Entry Length : 0A [1D4h 0468 2] Reserved : [1D

[RFC Patch V1 20/30] mm, fcoe: Use cpu_to_mem()/numa_mem_id() to support memoryless node

2014-07-11 Thread Jiang Liu
/current cpu. If CONFIG_HAVE_MEMORYLESS_NODES is disabled, cpu_to_mem()/numa_mem_id() is the same as cpu_to_node()/numa_node_id(). Signed-off-by: Jiang Liu --- drivers/scsi/fcoe/fcoe.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe

[RFC Patch V1 18/30] mm, bnx2fc: Use cpu_to_mem()/numa_mem_id() to support memoryless node

2014-07-11 Thread Jiang Liu
/current cpu. If CONFIG_HAVE_MEMORYLESS_NODES is disabled, cpu_to_mem()/numa_mem_id() is the same as cpu_to_node()/numa_node_id(). Signed-off-by: Jiang Liu --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c

[RFC Patch V1 19/30] mm, bnx2i: Use cpu_to_mem()/numa_mem_id() to support memoryless node

2014-07-11 Thread Jiang Liu
/current cpu. If CONFIG_HAVE_MEMORYLESS_NODES is disabled, cpu_to_mem()/numa_mem_id() is the same as cpu_to_node()/numa_node_id(). Signed-off-by: Jiang Liu --- drivers/scsi/bnx2i/bnx2i_init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b

Re: Fail to probe qla2xxx fiber channel card while doing pci hotplug

2012-09-19 Thread Jiang Liu
On 09/19/2012 09:39 PM, Bjorn Helgaas wrote: > On Tue, Sep 18, 2012 at 7:50 PM, Yijing Wang wrote: >> On 2012/9/19 1:54, Bjorn Helgaas wrote: >>> On Mon, Sep 17, 2012 at 6:06 AM, Yijing Wang wrote: On 2012/9/16 11:30, Bjorn Helgaas wrote: > On Sat, Sep 15, 2012 at 4:22 AM, Yijing Wang

Re: Fail to probe qla2xxx fiber channel card while doing pci hotplug

2012-09-20 Thread Jiang Liu
Hi Bjorn, We will try to work out a patch for this issue, won't silently ignore it. We also found another issue related to ARI. The steps to reproduce the bug is: 1) Boot with a ARI-capable device connected to ARI-capable port, so ARI will be enabled. 2) Hot-remove the ARI-capable device.