* [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers [not found] <55EE8106.6060100@internode.on.net> @ 2015-09-08 7:26 ` Jiang Liu 2015-09-08 9:03 ` Arthur Marsh ` (2 more replies) 0 siblings, 3 replies; 42+ messages in thread From: Jiang Liu @ 2015-09-08 7:26 UTC (permalink / raw) To: Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Ingo Molnar, H. Peter Anvin, x86 Cc: Jiang Liu, linux-kernel, linux-pci, linux-scsi Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") changes the way to allocate PCI legacy IRQ for PCI devices on x86 platforms. Instead of allocating PCI legacy IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() will be called by pci_device_probe() to allocate PCI legacy IRQs when binding PCI drivers to PCI devices. But some device drivers, such as eata, directly access PCI devices without implementing corresponding PCI drivers, so pcibios_alloc_irq() won't be called for those PCI devices and wrong IRQ number may be used 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 <jiang.liu@linux.intel.com> --- arch/x86/pci/common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 09d3afc0a181..60b237783582 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -685,6 +685,16 @@ void pcibios_free_irq(struct pci_dev *dev) int pcibios_enable_device(struct pci_dev *dev, int mask) { + /* + * By design, pcibios_alloc_irq() will be called by pci_device_probe() + * when binding a PCI device to a PCI driver. But some device drivers, + * such as eata, directly make use of PCI devices without implementing + * PCI device drivers, so pcibios_alloc_irq() won't be called for those + * PCI devices. + */ + if (!dev->driver) + pcibios_alloc_irq(dev); + return pci_enable_resources(dev, mask); } -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers 2015-09-08 7:26 ` [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Jiang Liu @ 2015-09-08 9:03 ` Arthur Marsh 2015-09-08 9:44 ` Jiang Liu 2015-09-08 16:27 ` Bjorn Helgaas 2015-09-09 19:04 ` [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Arthur Marsh 2 siblings, 1 reply; 42+ messages in thread From: Arthur Marsh @ 2015-09-08 9:03 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Ingo Molnar, H. Peter Anvin, x86 Cc: linux-kernel, linux-pci, linux-scsi Jiang Liu wrote on 08/09/15 16:56: > Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()") changes the way to allocate PCI legacy IRQ > for PCI devices on x86 platforms. Instead of allocating PCI legacy > IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() > will be called by pci_device_probe() to allocate PCI legacy IRQs > when binding PCI drivers to PCI devices. > > But some device drivers, such as eata, directly access PCI devices > without implementing corresponding PCI drivers, so pcibios_alloc_irq() > won't be called for those PCI devices and wrong IRQ number may be > used 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 <jiang.liu@linux.intel.com> > --- > arch/x86/pci/common.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c > index 09d3afc0a181..60b237783582 100644 > --- a/arch/x86/pci/common.c > +++ b/arch/x86/pci/common.c > @@ -685,6 +685,16 @@ void pcibios_free_irq(struct pci_dev *dev) > > int pcibios_enable_device(struct pci_dev *dev, int mask) > { > + /* > + * By design, pcibios_alloc_irq() will be called by pci_device_probe() > + * when binding a PCI device to a PCI driver. But some device drivers, > + * such as eata, directly make use of PCI devices without implementing > + * PCI device drivers, so pcibios_alloc_irq() won't be called for those > + * PCI devices. > + */ > + if (!dev->driver) > + pcibios_alloc_irq(dev); > + > return pci_enable_resources(dev, mask); > } > > 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 using the eata driver: [ 0.000000] Linux version 4.2.0+ (root@victoria) (gcc version 5.2.1 20150903 (Debian 5.2.1-16) ) #31 SMP PREEMPT Tue Sep 8 17:36:28 ACST 2015 ... [ 80.691097] EATA0: IRQ 10 mapped to IO-APIC IRQ 17. [ 80.724519] EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio. [ 80.752035] EATA config options -> tm:1, lc:y, mq:16, rs:y, et:n, ip:n, ep:n, pp:y. [ 80.777063] EATA0: 2.0C, PCI 0xd890, IRQ 17, BMST, SG 122, MB 64. [ 80.802391] EATA0: wide SCSI support enabled, max_id 16, max_lun 8. [ 80.827959] EATA0: SCSI channel 0 enabled, host target ID 7. [ 80.853413] scsi host3: EATA/DMA 2.0x rev. 8.10.00 [ 82.445662] scsi 3:0:6:0: Direct-Access IBM DCAS-34330W S65A PQ: 0 ANSI: 2 [ 82.471584] scsi 3:0:6:0: cmds/lun 16, sorted, simple tags. [ 84.571451] sd 3:0:6:0: Attached scsi generic sg4 type 0 [ 84.597572] sd 3:0:6:0: [sdd] 8466688 512-byte logical blocks: (4.33 GB/4.03 GiB) [ 84.659874] sd 3:0:6:0: [sdd] Write Protect is off [ 84.688543] sd 3:0:6:0: [sdd] Mode Sense: b3 00 00 08 [ 84.714021] sd 3:0:6:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 84.817682] sdd: sdd1 sdd2 < sdd5 > [ 84.919267] sd 3:0:6:0: [sdd] Attached SCSI disk Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers 2015-09-08 9:03 ` Arthur Marsh @ 2015-09-08 9:44 ` Jiang Liu 0 siblings, 0 replies; 42+ messages in thread From: Jiang Liu @ 2015-09-08 9:44 UTC (permalink / raw) To: Arthur Marsh, Thomas Gleixner, Bjorn Helgaas, Ingo Molnar, H. Peter Anvin, x86 Cc: linux-kernel, linux-pci, linux-scsi 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 using the eata driver: > > [ 0.000000] Linux version 4.2.0+ (root@victoria) (gcc version 5.2.1 > 20150903 > (Debian 5.2.1-16) ) #31 SMP PREEMPT Tue Sep 8 17:36:28 ACST 2015 > ... > > [ 80.691097] EATA0: IRQ 10 mapped to IO-APIC IRQ 17. > [ 80.724519] EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio. > [ 80.752035] EATA config options -> tm:1, lc:y, mq:16, rs:y, et:n, > ip:n, ep:n, pp:y. > [ 80.777063] EATA0: 2.0C, PCI 0xd890, IRQ 17, BMST, SG 122, MB 64. > [ 80.802391] EATA0: wide SCSI support enabled, max_id 16, max_lun 8. > [ 80.827959] EATA0: SCSI channel 0 enabled, host target ID 7. > [ 80.853413] scsi host3: EATA/DMA 2.0x rev. 8.10.00 > [ 82.445662] scsi 3:0:6:0: Direct-Access IBM DCAS-34330W > S65A PQ: 0 ANSI: 2 > [ 82.471584] scsi 3:0:6:0: cmds/lun 16, sorted, simple tags. > [ 84.571451] sd 3:0:6:0: Attached scsi generic sg4 type 0 > [ 84.597572] sd 3:0:6:0: [sdd] 8466688 512-byte logical blocks: (4.33 > GB/4.03 GiB) > [ 84.659874] sd 3:0:6:0: [sdd] Write Protect is off > [ 84.688543] sd 3:0:6:0: [sdd] Mode Sense: b3 00 00 08 > [ 84.714021] sd 3:0:6:0: [sdd] Write cache: enabled, read cache: > enabled, doesn't support DPO or FUA > [ 84.817682] sdd: sdd1 sdd2 < sdd5 > > [ 84.919267] sd 3:0:6:0: [sdd] Attached SCSI disk Hi Arthur, Thanks for testing:) > > Arthur. > -- > 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/ ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers 2015-09-08 7:26 ` [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Jiang Liu 2015-09-08 9:03 ` Arthur Marsh @ 2015-09-08 16:27 ` Bjorn Helgaas 2015-09-08 16:49 ` Jiang Liu 2015-09-09 19:04 ` [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Arthur Marsh 2 siblings, 1 reply; 42+ messages in thread From: Bjorn Helgaas @ 2015-09-08 16:27 UTC (permalink / raw) To: Jiang Liu Cc: Thomas Gleixner, Arthur Marsh, Ingo Molnar, H. Peter Anvin, x86, linux-kernel, linux-pci, linux-scsi Hi Jiang, I object to subject lines like "Correctly do such and such." Nobody writes code to do things *incorrectly*, so the word "correctly" takes up space without contributing meaning. In this case, it'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 allocate PCI legacy IRQ > for PCI devices on x86 platforms. Instead of allocating PCI legacy > IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() > will be called by pci_device_probe() to allocate PCI legacy IRQs > when binding PCI drivers to PCI devices. > > But some device drivers, such as eata, directly access PCI devices > without implementing corresponding PCI drivers, so pcibios_alloc_irq() > won't be called for those PCI devices and wrong IRQ number may be > used to manage the PCI device. I'm not sure this is wise. We normally call pcibios_alloc_irq() from pci_device_probe(), just before we call the driver's .probe() method. The eata driver does not use pci_register_driver(), so there is no .probe() method (also no .remove(), .suspend(), etc.) But eata *does* use pci_enable_device() and other PCI interfaces. So this patch adds code in the x86 pci_enable_device() path for this case. AFAICT, there's no real reason why eata doesn't register a PCI driver; it's just a case of legacy code where nobody has been motivated to update it. I'm not in favor of catering to code like that because then we have random special cases like this that clutter up the core code. I don't think we should necessarily expect the PCI core to support calls to PCI interfaces when it hasn't had a chance to initialize itself via driver registration. > 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 <jiang.liu@linux.intel.com> > --- > arch/x86/pci/common.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c > index 09d3afc0a181..60b237783582 100644 > --- a/arch/x86/pci/common.c > +++ b/arch/x86/pci/common.c > @@ -685,6 +685,16 @@ void pcibios_free_irq(struct pci_dev *dev) > > int pcibios_enable_device(struct pci_dev *dev, int mask) > { > + /* > + * By design, pcibios_alloc_irq() will be called by pci_device_probe() > + * when binding a PCI device to a PCI driver. But some device drivers, > + * such as eata, directly make use of PCI devices without implementing > + * PCI device drivers, so pcibios_alloc_irq() won't be called for those > + * PCI devices. > + */ > + if (!dev->driver) > + pcibios_alloc_irq(dev); This is a point fix for x86 only, but I think eata can be built for any architecture. Won't other architectures still have the same problem? > return pci_enable_resources(dev, mask); > } > > -- > 1.7.10.4 > ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers 2015-09-08 16:27 ` Bjorn Helgaas @ 2015-09-08 16:49 ` Jiang Liu 2015-09-09 19:11 ` Bjorn Helgaas 0 siblings, 1 reply; 42+ messages in thread From: Jiang Liu @ 2015-09-08 16:49 UTC (permalink / raw) To: Bjorn Helgaas Cc: Thomas Gleixner, Arthur Marsh, Ingo Molnar, H. Peter Anvin, x86, linux-kernel, linux-pci, linux-scsi On 2015/9/9 0:27, Bjorn Helgaas wrote: > Hi Jiang, > > I object to subject lines like "Correctly do such and such." Nobody > writes code to do things *incorrectly*, so the word "correctly" takes > up space without contributing meaning. In this case, it'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 allocate PCI legacy IRQ >> for PCI devices on x86 platforms. Instead of allocating PCI legacy >> IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() >> will be called by pci_device_probe() to allocate PCI legacy IRQs >> when binding PCI drivers to PCI devices. >> >> But some device drivers, such as eata, directly access PCI devices >> without implementing corresponding PCI drivers, so pcibios_alloc_irq() >> won't be called for those PCI devices and wrong IRQ number may be >> used to manage the PCI device. > > I'm not sure this is wise. > > We normally call pcibios_alloc_irq() from pci_device_probe(), just > before we call the driver's .probe() method. > > The eata driver does not use pci_register_driver(), so there is no > .probe() method (also no .remove(), .suspend(), etc.) But eata *does* > use pci_enable_device() and other PCI interfaces. So this patch adds > code in the x86 pci_enable_device() path for this case. > > AFAICT, there's no real reason why eata doesn't register a PCI driver; > it's just a case of legacy code where nobody has been motivated to > update it. I'm not in favor of catering to code like that because > then we have random special cases like this that clutter up the core > code. > > I don't think we should necessarily expect the PCI core to support > calls to PCI interfaces when it hasn't had a chance to initialize > itself via driver registration. > >> 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 <jiang.liu@linux.intel.com> >> --- >> arch/x86/pci/common.c | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c >> index 09d3afc0a181..60b237783582 100644 >> --- a/arch/x86/pci/common.c >> +++ b/arch/x86/pci/common.c >> @@ -685,6 +685,16 @@ void pcibios_free_irq(struct pci_dev *dev) >> >> int pcibios_enable_device(struct pci_dev *dev, int mask) >> { >> + /* >> + * By design, pcibios_alloc_irq() will be called by pci_device_probe() >> + * when binding a PCI device to a PCI driver. But some device drivers, >> + * such as eata, directly make use of PCI devices without implementing >> + * PCI device drivers, so pcibios_alloc_irq() won't be called for those >> + * PCI devices. >> + */ >> + if (!dev->driver) >> + pcibios_alloc_irq(dev); > > This is a point fix for x86 only, but I think eata can be built for > any architecture. Won't other architectures still have the same > problem? 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. 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 >> ^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers 2015-09-08 16:49 ` Jiang Liu @ 2015-09-09 19:11 ` Bjorn Helgaas 2015-09-10 8:58 ` Jiang Liu 2015-09-14 3:08 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu 0 siblings, 2 replies; 42+ messages in thread From: Bjorn Helgaas @ 2015-09-09 19:11 UTC (permalink / raw) To: Jiang Liu Cc: Thomas Gleixner, Arthur Marsh, Ingo Molnar, H. Peter Anvin, x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org 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. > 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 >>> ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers 2015-09-09 19:11 ` Bjorn Helgaas @ 2015-09-10 8:58 ` Jiang Liu 2015-09-14 3:08 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu 1 sibling, 0 replies; 42+ messages in thread From: Jiang Liu @ 2015-09-10 8:58 UTC (permalink / raw) To: Bjorn Helgaas Cc: Thomas Gleixner, Arthur Marsh, Ingo Molnar, H. Peter Anvin, x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org 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/ > ^ permalink raw reply [flat|nested] 42+ messages in thread
* [Bugfix 0/3] Convert eata driver to a normal PCI device driver 2015-09-09 19:11 ` Bjorn Helgaas 2015-09-10 8:58 ` Jiang Liu @ 2015-09-14 3:08 ` Jiang Liu 2015-09-14 3:08 ` [Bugfix 1/3] eata: Use IDA to manage eata board IDs Jiang Liu ` (3 more replies) 1 sibling, 4 replies; 42+ messages in thread From: Jiang Liu @ 2015-09-14 3:08 UTC (permalink / raw) To: Thomas Gleixner, Bjorn Helgaas, Arthur Marsh Cc: Jiang Liu, linux-kernel, linux-pci, linux-scsi, x86 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, but I have no change to test due to limited knowledge about scsi subsystem and lacking of hardware for tests. So 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 +++++++++++++++++++++++++++------------------------ 1 file changed, 125 insertions(+), 107 deletions(-) -- 1.7.10.4 ^ permalink raw reply [flat|nested] 42+ messages in thread
* [Bugfix 1/3] eata: Use IDA to manage eata board IDs 2015-09-14 3:08 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu @ 2015-09-14 3:08 ` Jiang Liu 2015-09-14 8:08 ` Hannes Reinecke 2015-09-14 3:08 ` [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices Jiang Liu ` (2 subsequent siblings) 3 siblings, 1 reply; 42+ messages in thread From: Jiang Liu @ 2015-09-14 3:08 UTC (permalink / raw) To: Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Dario Ballabio, James E.J. Bottomley Cc: Jiang Liu, linux-kernel, linux-pci, linux-scsi, x86 Use IDA to manage eata board IDs, so we could dynamically allocate and free board IDs later. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> --- drivers/scsi/eata.c | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 227dd2c2ec2f..b45d3b532b70 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -491,6 +491,7 @@ #include <linux/spinlock.h> #include <linux/dma-mapping.h> #include <linux/slab.h> +#include <linux/idr.h> #include <asm/byteorder.h> #include <asm/dma.h> #include <asm/io.h> @@ -837,9 +838,8 @@ struct hostdata { static struct Scsi_Host *sh[MAX_BOARDS]; static const char *driver_name = "EATA"; static char sha[MAX_BOARDS]; - -/* Initialize num_boards so that ihdlr can work while detect is in progress */ -static unsigned int num_boards = MAX_BOARDS; +static DEFINE_IDA(eata_ida); +static DECLARE_BITMAP(eata_board_bitmap, MAX_BOARDS); static unsigned long io_port[] = { @@ -1509,6 +1509,23 @@ static int option_setup(char *str) return 1; } +static unsigned int port_probe(unsigned long port_base, + struct scsi_host_template *tpnt) +{ + int id; + + id = ida_simple_get(&eata_ida, 0, MAX_BOARDS, GFP_KERNEL); + if (id >= 0) { + set_bit(id, eata_board_bitmap); + if (port_detect(port_base, id, tpnt)) + return id; + clear_bit(id, eata_board_bitmap); + ida_simple_remove(&eata_ida, id); + } + + return -1; +} + static void add_pci_ports(void) { #if defined(CONFIG_PCI) @@ -1548,7 +1565,7 @@ static void add_pci_ports(void) static int eata2x_detect(struct scsi_host_template *tpnt) { - unsigned int j = 0, k; + unsigned int k, count = 0; tpnt->proc_name = "eata2x"; @@ -1582,17 +1599,12 @@ static int eata2x_detect(struct scsi_host_template *tpnt) enable_pci_ports(); } - for (k = 0; io_port[k]; k++) { + for (k = 0; io_port[k]; k++) + if (io_port[k] != SKIP && + port_probe(io_port[k], tpnt) >= 0) + count++; - if (io_port[k] == SKIP) - continue; - - if (j < MAX_BOARDS && port_detect(io_port[k], j, tpnt)) - j++; - } - - num_boards = j; - return j; + return count; } static void map_dma(unsigned int i, struct hostdata *ha) @@ -2530,14 +2542,16 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost) static irqreturn_t do_interrupt_handler(int dummy, void *shap) { struct Scsi_Host *shost; - unsigned int j; + unsigned int j = (unsigned int)((char *)shap - sha); unsigned long spin_flags; irqreturn_t ret; /* Check if the interrupt must be processed by this handler */ - if ((j = (unsigned int)((char *)shap - sha)) >= num_boards) + if (j >= MAX_BOARDS || !test_bit(j, eata_board_bitmap)) return IRQ_NONE; shost = sh[j]; + if (!shost) + return IRQ_NONE; spin_lock_irqsave(shost->host_lock, spin_flags); ret = ihdlr(shost); -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [Bugfix 1/3] eata: Use IDA to manage eata board IDs 2015-09-14 3:08 ` [Bugfix 1/3] eata: Use IDA to manage eata board IDs Jiang Liu @ 2015-09-14 8:08 ` Hannes Reinecke 0 siblings, 0 replies; 42+ messages in thread From: Hannes Reinecke @ 2015-09-14 8:08 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Dario Ballabio, James E.J. Bottomley Cc: linux-kernel, linux-pci, linux-scsi, x86 On 09/14/2015 05:08 AM, Jiang Liu wrote: > Use IDA to manage eata board IDs, so we could dynamically allocate > and free board IDs later. > > Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> > --- Reviewed-by: Hannes Reinecke <hare@suse.com> Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) ^ permalink raw reply [flat|nested] 42+ messages in thread
* [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices 2015-09-14 3:08 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu 2015-09-14 3:08 ` [Bugfix 1/3] eata: Use IDA to manage eata board IDs Jiang Liu @ 2015-09-14 3:08 ` Jiang Liu 2015-09-14 8:17 ` Hannes Reinecke 2015-09-14 3:08 ` [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Jiang Liu 2015-09-14 16:01 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Arthur Marsh 3 siblings, 1 reply; 42+ messages in thread From: Jiang Liu @ 2015-09-14 3:08 UTC (permalink / raw) To: Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Dario Ballabio, James E.J. Bottomley Cc: Jiang Liu, linux-kernel, linux-pci, linux-scsi, x86 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() and pcibios_free_irq()") changes the way to allocate PCI legacy IRQ for PCI devices on x86 platforms. Instead of allocating PCI legacy IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() will be called by pci_device_probe() to allocate PCI legacy IRQs when binding PCI drivers to PCI devices. But the eata driver directly accesses PCI devices without implementing corresponding PCI drivers, so pcibios_alloc_irq() won't be called for those PCI devices and wrong IRQ number may be used to manage the PCI device. This patch implements a PCI device driver to manage eata PCI devices, so eata driver could properly cooperate with the PCI core. It also provides headroom for PCI hotplug with eata driver. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> --- 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..b92e6856f909 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -850,10 +850,6 @@ static unsigned long io_port[] = { /* First ISA */ 0x1f0, - /* Space for MAX_PCI ports possibly reported by PCI_BIOS */ - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, - /* MAX_EISA ports */ 0x1c88, 0x2c88, 0x3c88, 0x4c88, 0x5c88, 0x6c88, 0x7c88, 0x8c88, 0x9c88, 0xac88, 0xbc88, 0xcc88, 0xdc88, 0xec88, 0xfc88, @@ -1024,60 +1020,13 @@ static int read_pio(unsigned long iobase, ushort * start, ushort * end) return 0; } -static struct pci_dev *get_pci_dev(unsigned long port_base) -{ -#if defined(CONFIG_PCI) - unsigned int addr; - struct pci_dev *dev = NULL; - - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { - addr = pci_resource_start(dev, 0); - -#if defined(DEBUG_PCI_DETECT) - printk("%s: get_pci_dev, bus %d, devfn 0x%x, addr 0x%x.\n", - driver_name, dev->bus->number, dev->devfn, addr); -#endif - - /* we are in so much trouble for a pci hotplug system with this driver - * anyway, so doing this at least lets people unload the driver and not - * cause memory problems, but in general this is a bad thing to do (this - * driver needs to be converted to the proper PCI api someday... */ - pci_dev_put(dev); - if (addr + PCI_BASE_ADDRESS_0 == port_base) - return dev; - } -#endif /* end CONFIG_PCI */ - return NULL; -} - -static void enable_pci_ports(void) -{ -#if defined(CONFIG_PCI) - struct pci_dev *dev = NULL; - - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { -#if defined(DEBUG_PCI_DETECT) - printk("%s: enable_pci_ports, bus %d, devfn 0x%x.\n", - driver_name, dev->bus->number, dev->devfn); -#endif - - if (pci_enable_device(dev)) - printk - ("%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n", - driver_name, dev->bus->number, dev->devfn); - } - -#endif /* end CONFIG_PCI */ -} - static int port_detect(unsigned long port_base, unsigned int j, - struct scsi_host_template *tpnt) + struct scsi_host_template *tpnt, struct pci_dev *pdev) { unsigned char irq, dma_channel, subversion, i, is_pci = 0; unsigned char protocol_rev; struct eata_info info; char *bus_type, dma_name[16]; - struct pci_dev *pdev; /* Allowed DMA channels for ISA (0 indicates reserved) */ unsigned char dma_channel_table[4] = { 5, 6, 7, 0 }; struct Scsi_Host *shost; @@ -1199,15 +1148,8 @@ static int port_detect(unsigned long port_base, unsigned int j, ("%s: warning, LEVEL triggering is suggested for IRQ %u.\n", name, irq); - if (is_pci) { - pdev = get_pci_dev(port_base); - if (!pdev) - printk - ("%s: warning, failed to get pci_dev structure.\n", - name); - } else - pdev = NULL; - + if (is_pci && !pdev) + printk("%s: warning, failed to get pci_dev structure.\n", name); if (pdev && (irq != pdev->irq)) { printk("%s: IRQ %u mapped to IO-APIC IRQ %u.\n", name, irq, pdev->irq); @@ -1510,14 +1452,17 @@ static int option_setup(char *str) } static unsigned int port_probe(unsigned long port_base, - struct scsi_host_template *tpnt) + struct scsi_host_template *tpnt, + struct pci_dev *pdev) { int id; id = ida_simple_get(&eata_ida, 0, MAX_BOARDS, GFP_KERNEL); if (id >= 0) { set_bit(id, eata_board_bitmap); - if (port_detect(port_base, id, tpnt)) + if (pdev) + dev_set_drvdata(&pdev->dev, (void *)(long)id); + if (port_detect(port_base, id, tpnt, pdev)) return id; clear_bit(id, eata_board_bitmap); ida_simple_remove(&eata_ida, id); @@ -1526,42 +1471,81 @@ static unsigned int port_probe(unsigned long port_base, return -1; } -static void add_pci_ports(void) -{ -#if defined(CONFIG_PCI) - unsigned int addr, k; - struct pci_dev *dev = NULL; - - for (k = 0; k < MAX_PCI; k++) { +#ifdef CONFIG_PCI +static int eata2x_pci_device_count; - if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) - break; +static int eata2x_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) +{ + int i, ret = -ENXIO; + resource_size_t addr; + unsigned long port_base; + struct scsi_host_template *tpnt = (void *)id->driver_data; - if (pci_enable_device(dev)) { + if (pci_enable_device(dev)) { #if defined(DEBUG_PCI_DETECT) - printk - ("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", - driver_name, dev->bus->number, dev->devfn); + pr_warn("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", + driver_name, dev->bus->number, dev->devfn); #endif + goto out_error; + } - continue; - } - - addr = pci_resource_start(dev, 0); - + addr = pci_resource_start(dev, 0); + port_base = addr + PCI_BASE_ADDRESS_0; #if defined(DEBUG_PCI_DETECT) - printk("%s: detect, seq. %d, bus %d, devfn 0x%x, addr 0x%x.\n", - driver_name, k, dev->bus->number, dev->devfn, addr); + printk("%s: detect, bus %d, devfn 0x%x, addr 0x%x.\n", + driver_name, dev->bus->number, dev->devfn, (unsigned int)addr); #endif - /* Order addresses according to rev_scan value */ - io_port[MAX_INT_PARAM + (rev_scan ? (MAX_PCI - k) : (1 + k))] = - addr + PCI_BASE_ADDRESS_0; + if (setup_done) { + /* + * Handle kernel or module parameter + * . probe board if its port is specified by user + * . otherwise ignore the board + */ + for (i = 1; i < MAX_INT_PARAM; i++) + if (io_port[i] == port_base) { + io_port[i] = SKIP; + break; + } + if (i >= MAX_INT_PARAM) + goto out_disable_device; + } + if (port_probe(port_base, tpnt, dev) >= 0) { + eata2x_pci_device_count++; + return 0; } - pci_dev_put(dev); -#endif /* end CONFIG_PCI */ +out_disable_device: + pci_disable_device(dev); +out_error: + return ret; +} + +static struct pci_device_id eata2x_tbl[] = { + { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) }, + { }, +}; +MODULE_DEVICE_TABLE(pci, eata2x_tbl); + +static struct pci_driver eata2x_pci_driver = { + .name = "eata", + .id_table = eata2x_tbl, + .probe = eata2x_pci_probe, +}; + +static int eata2x_probe_pci_devices(struct scsi_host_template *tpnt) +{ + eata2x_tbl[0].driver_data = (kernel_ulong_t)tpnt; + if (pci_probe && pci_register_driver(&eata2x_pci_driver)) + pr_warn("eata2x: failed to register PCI device driver.\n"); + return eata2x_pci_device_count; +} +#else /* CONFIG_PCI */ +static inline int eata2x_probe_pci_devices(struct scsi_host_template *tpnt) +{ + return 0; } +#endif /* CONFIG_PCI */ static int eata2x_detect(struct scsi_host_template *tpnt) { @@ -1592,16 +1576,10 @@ static int eata2x_detect(struct scsi_host_template *tpnt) io_port[k] = SKIP; } - if (pci_probe) { - if (!setup_done) - add_pci_ports(); - else - enable_pci_ports(); - } - + count += eata2x_probe_pci_devices(tpnt); for (k = 0; io_port[k]; k++) if (io_port[k] != SKIP && - port_probe(io_port[k], tpnt) >= 0) + port_probe(io_port[k], tpnt, NULL) >= 0) count++; return count; -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices 2015-09-14 3:08 ` [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices Jiang Liu @ 2015-09-14 8:17 ` Hannes Reinecke 2015-09-14 8:31 ` Jiang Liu 0 siblings, 1 reply; 42+ messages in thread From: Hannes Reinecke @ 2015-09-14 8:17 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Dario Ballabio, James E.J. Bottomley Cc: linux-kernel, linux-pci, linux-scsi, x86 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 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()") changes the way to allocate PCI legacy IRQ > for PCI devices on x86 platforms. Instead of allocating PCI legacy > IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() > will be called by pci_device_probe() to allocate PCI legacy IRQs > when binding PCI drivers to PCI devices. > > But the eata driver directly accesses PCI devices without implementing > corresponding PCI drivers, so pcibios_alloc_irq() won't be called for > those PCI devices and wrong IRQ number may be used to manage the PCI > device. > > This patch implements a PCI device driver to manage eata PCI devices, > so eata driver could properly cooperate with the PCI core. It also > provides headroom for PCI hotplug with eata driver. > > Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> > --- > 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..b92e6856f909 100644 > --- a/drivers/scsi/eata.c > +++ b/drivers/scsi/eata.c > @@ -850,10 +850,6 @@ static unsigned long io_port[] = { > /* First ISA */ > 0x1f0, > > - /* Space for MAX_PCI ports possibly reported by PCI_BIOS */ > - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, > - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, > - > /* MAX_EISA ports */ > 0x1c88, 0x2c88, 0x3c88, 0x4c88, 0x5c88, 0x6c88, 0x7c88, 0x8c88, > 0x9c88, 0xac88, 0xbc88, 0xcc88, 0xdc88, 0xec88, 0xfc88, > @@ -1024,60 +1020,13 @@ static int read_pio(unsigned long iobase, ushort * start, ushort * end) > return 0; > } > > -static struct pci_dev *get_pci_dev(unsigned long port_base) > -{ > -#if defined(CONFIG_PCI) > - unsigned int addr; > - struct pci_dev *dev = NULL; > - > - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { > - addr = pci_resource_start(dev, 0); > - > -#if defined(DEBUG_PCI_DETECT) > - printk("%s: get_pci_dev, bus %d, devfn 0x%x, addr 0x%x.\n", > - driver_name, dev->bus->number, dev->devfn, addr); > -#endif > - > - /* we are in so much trouble for a pci hotplug system with this driver > - * anyway, so doing this at least lets people unload the driver and not > - * cause memory problems, but in general this is a bad thing to do (this > - * driver needs to be converted to the proper PCI api someday... */ > - pci_dev_put(dev); > - if (addr + PCI_BASE_ADDRESS_0 == port_base) > - return dev; > - } > -#endif /* end CONFIG_PCI */ > - return NULL; > -} > - > -static void enable_pci_ports(void) > -{ > -#if defined(CONFIG_PCI) > - struct pci_dev *dev = NULL; > - > - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { > -#if defined(DEBUG_PCI_DETECT) > - printk("%s: enable_pci_ports, bus %d, devfn 0x%x.\n", > - driver_name, dev->bus->number, dev->devfn); > -#endif > - > - if (pci_enable_device(dev)) > - printk > - ("%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n", > - driver_name, dev->bus->number, dev->devfn); > - } > - > -#endif /* end CONFIG_PCI */ > -} > - > static int port_detect(unsigned long port_base, unsigned int j, > - struct scsi_host_template *tpnt) > + struct scsi_host_template *tpnt, struct pci_dev *pdev) > { > unsigned char irq, dma_channel, subversion, i, is_pci = 0; > unsigned char protocol_rev; > struct eata_info info; > char *bus_type, dma_name[16]; > - struct pci_dev *pdev; > /* Allowed DMA channels for ISA (0 indicates reserved) */ > unsigned char dma_channel_table[4] = { 5, 6, 7, 0 }; > struct Scsi_Host *shost; > @@ -1199,15 +1148,8 @@ static int port_detect(unsigned long port_base, unsigned int j, > ("%s: warning, LEVEL triggering is suggested for IRQ %u.\n", > name, irq); > > - if (is_pci) { > - pdev = get_pci_dev(port_base); > - if (!pdev) > - printk > - ("%s: warning, failed to get pci_dev structure.\n", > - name); > - } else > - pdev = NULL; > - > + if (is_pci && !pdev) > + printk("%s: warning, failed to get pci_dev structure.\n", name); > if (pdev && (irq != pdev->irq)) { > printk("%s: IRQ %u mapped to IO-APIC IRQ %u.\n", name, irq, > pdev->irq); > @@ -1510,14 +1452,17 @@ static int option_setup(char *str) > } > > static unsigned int port_probe(unsigned long port_base, > - struct scsi_host_template *tpnt) > + struct scsi_host_template *tpnt, > + struct pci_dev *pdev) > { > int id; > > id = ida_simple_get(&eata_ida, 0, MAX_BOARDS, GFP_KERNEL); > if (id >= 0) { > set_bit(id, eata_board_bitmap); > - if (port_detect(port_base, id, tpnt)) > + if (pdev) > + dev_set_drvdata(&pdev->dev, (void *)(long)id); > + if (port_detect(port_base, id, tpnt, pdev)) > return id; > clear_bit(id, eata_board_bitmap); > ida_simple_remove(&eata_ida, id); > @@ -1526,42 +1471,81 @@ static unsigned int port_probe(unsigned long port_base, > return -1; > } > > -static void add_pci_ports(void) > -{ > -#if defined(CONFIG_PCI) > - unsigned int addr, k; > - struct pci_dev *dev = NULL; > - > - for (k = 0; k < MAX_PCI; k++) { > +#ifdef CONFIG_PCI > +static int eata2x_pci_device_count; > > - if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) > - break; > +static int eata2x_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) > +{ > + int i, ret = -ENXIO; > + resource_size_t addr; > + unsigned long port_base; > + struct scsi_host_template *tpnt = (void *)id->driver_data; > > - if (pci_enable_device(dev)) { > + if (pci_enable_device(dev)) { > #if defined(DEBUG_PCI_DETECT) > - printk > - ("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", > - driver_name, dev->bus->number, dev->devfn); > + pr_warn("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", > + driver_name, dev->bus->number, dev->devfn); > #endif > + goto out_error; > + } > > - continue; > - } > - > - addr = pci_resource_start(dev, 0); > - > + addr = pci_resource_start(dev, 0); > + port_base = addr + PCI_BASE_ADDRESS_0; > #if defined(DEBUG_PCI_DETECT) > - printk("%s: detect, seq. %d, bus %d, devfn 0x%x, addr 0x%x.\n", > - driver_name, k, dev->bus->number, dev->devfn, addr); > + printk("%s: detect, bus %d, devfn 0x%x, addr 0x%x.\n", > + driver_name, dev->bus->number, dev->devfn, (unsigned int)addr); > #endif > > - /* Order addresses according to rev_scan value */ > - io_port[MAX_INT_PARAM + (rev_scan ? (MAX_PCI - k) : (1 + k))] = > - addr + PCI_BASE_ADDRESS_0; > + if (setup_done) { > + /* > + * Handle kernel or module parameter > + * . probe board if its port is specified by user > + * . otherwise ignore the board > + */ > + for (i = 1; i < MAX_INT_PARAM; i++) > + if (io_port[i] == port_base) { > + io_port[i] = SKIP; > + break; > + } > + if (i >= MAX_INT_PARAM) > + goto out_disable_device; > + } Hmm. I must admit I don't like the 'setup_done' thingie. As the driver is now converted to a 'real' PCI device we should be using driver-core mechanisms to avoid driver binding, not the prefabricated 'setup_done' variable. Can't we just do away with it completely? Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices 2015-09-14 8:17 ` Hannes Reinecke @ 2015-09-14 8:31 ` Jiang Liu 0 siblings, 0 replies; 42+ messages in thread From: Jiang Liu @ 2015-09-14 8:31 UTC (permalink / raw) To: Hannes Reinecke, Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Dario Ballabio, James E.J. Bottomley Cc: linux-kernel, linux-pci, linux-scsi, x86 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 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and >> pcibios_free_irq()") changes the way to allocate PCI legacy IRQ >> for PCI devices on x86 platforms. Instead of allocating PCI legacy >> IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() >> will be called by pci_device_probe() to allocate PCI legacy IRQs >> when binding PCI drivers to PCI devices. >> >> But the eata driver directly accesses PCI devices without implementing >> corresponding PCI drivers, so pcibios_alloc_irq() won't be called for >> those PCI devices and wrong IRQ number may be used to manage the PCI >> device. >> >> This patch implements a PCI device driver to manage eata PCI devices, >> so eata driver could properly cooperate with the PCI core. It also >> provides headroom for PCI hotplug with eata driver. >> >> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> >> --- >> 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..b92e6856f909 100644 >> --- a/drivers/scsi/eata.c >> +++ b/drivers/scsi/eata.c >> @@ -850,10 +850,6 @@ static unsigned long io_port[] = { >> /* First ISA */ >> 0x1f0, >> >> - /* Space for MAX_PCI ports possibly reported by PCI_BIOS */ >> - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, >> - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, >> - >> /* MAX_EISA ports */ >> 0x1c88, 0x2c88, 0x3c88, 0x4c88, 0x5c88, 0x6c88, 0x7c88, 0x8c88, >> 0x9c88, 0xac88, 0xbc88, 0xcc88, 0xdc88, 0xec88, 0xfc88, >> @@ -1024,60 +1020,13 @@ static int read_pio(unsigned long iobase, ushort * start, ushort * end) >> return 0; >> } >> >> -static struct pci_dev *get_pci_dev(unsigned long port_base) >> -{ >> -#if defined(CONFIG_PCI) >> - unsigned int addr; >> - struct pci_dev *dev = NULL; >> - >> - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { >> - addr = pci_resource_start(dev, 0); >> - >> -#if defined(DEBUG_PCI_DETECT) >> - printk("%s: get_pci_dev, bus %d, devfn 0x%x, addr 0x%x.\n", >> - driver_name, dev->bus->number, dev->devfn, addr); >> -#endif >> - >> - /* we are in so much trouble for a pci hotplug system with this driver >> - * anyway, so doing this at least lets people unload the driver and not >> - * cause memory problems, but in general this is a bad thing to do (this >> - * driver needs to be converted to the proper PCI api someday... */ >> - pci_dev_put(dev); >> - if (addr + PCI_BASE_ADDRESS_0 == port_base) >> - return dev; >> - } >> -#endif /* end CONFIG_PCI */ >> - return NULL; >> -} >> - >> -static void enable_pci_ports(void) >> -{ >> -#if defined(CONFIG_PCI) >> - struct pci_dev *dev = NULL; >> - >> - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { >> -#if defined(DEBUG_PCI_DETECT) >> - printk("%s: enable_pci_ports, bus %d, devfn 0x%x.\n", >> - driver_name, dev->bus->number, dev->devfn); >> -#endif >> - >> - if (pci_enable_device(dev)) >> - printk >> - ("%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n", >> - driver_name, dev->bus->number, dev->devfn); >> - } >> - >> -#endif /* end CONFIG_PCI */ >> -} >> - >> static int port_detect(unsigned long port_base, unsigned int j, >> - struct scsi_host_template *tpnt) >> + struct scsi_host_template *tpnt, struct pci_dev *pdev) >> { >> unsigned char irq, dma_channel, subversion, i, is_pci = 0; >> unsigned char protocol_rev; >> struct eata_info info; >> char *bus_type, dma_name[16]; >> - struct pci_dev *pdev; >> /* Allowed DMA channels for ISA (0 indicates reserved) */ >> unsigned char dma_channel_table[4] = { 5, 6, 7, 0 }; >> struct Scsi_Host *shost; >> @@ -1199,15 +1148,8 @@ static int port_detect(unsigned long port_base, unsigned int j, >> ("%s: warning, LEVEL triggering is suggested for IRQ %u.\n", >> name, irq); >> >> - if (is_pci) { >> - pdev = get_pci_dev(port_base); >> - if (!pdev) >> - printk >> - ("%s: warning, failed to get pci_dev structure.\n", >> - name); >> - } else >> - pdev = NULL; >> - >> + if (is_pci && !pdev) >> + printk("%s: warning, failed to get pci_dev structure.\n", name); >> if (pdev && (irq != pdev->irq)) { >> printk("%s: IRQ %u mapped to IO-APIC IRQ %u.\n", name, irq, >> pdev->irq); >> @@ -1510,14 +1452,17 @@ static int option_setup(char *str) >> } >> >> static unsigned int port_probe(unsigned long port_base, >> - struct scsi_host_template *tpnt) >> + struct scsi_host_template *tpnt, >> + struct pci_dev *pdev) >> { >> int id; >> >> id = ida_simple_get(&eata_ida, 0, MAX_BOARDS, GFP_KERNEL); >> if (id >= 0) { >> set_bit(id, eata_board_bitmap); >> - if (port_detect(port_base, id, tpnt)) >> + if (pdev) >> + dev_set_drvdata(&pdev->dev, (void *)(long)id); >> + if (port_detect(port_base, id, tpnt, pdev)) >> return id; >> clear_bit(id, eata_board_bitmap); >> ida_simple_remove(&eata_ida, id); >> @@ -1526,42 +1471,81 @@ static unsigned int port_probe(unsigned long port_base, >> return -1; >> } >> >> -static void add_pci_ports(void) >> -{ >> -#if defined(CONFIG_PCI) >> - unsigned int addr, k; >> - struct pci_dev *dev = NULL; >> - >> - for (k = 0; k < MAX_PCI; k++) { >> +#ifdef CONFIG_PCI >> +static int eata2x_pci_device_count; >> >> - if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) >> - break; >> +static int eata2x_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) >> +{ >> + int i, ret = -ENXIO; >> + resource_size_t addr; >> + unsigned long port_base; >> + struct scsi_host_template *tpnt = (void *)id->driver_data; >> >> - if (pci_enable_device(dev)) { >> + if (pci_enable_device(dev)) { >> #if defined(DEBUG_PCI_DETECT) >> - printk >> - ("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", >> - driver_name, dev->bus->number, dev->devfn); >> + pr_warn("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", >> + driver_name, dev->bus->number, dev->devfn); >> #endif >> + goto out_error; >> + } >> >> - continue; >> - } >> - >> - addr = pci_resource_start(dev, 0); >> - >> + addr = pci_resource_start(dev, 0); >> + port_base = addr + PCI_BASE_ADDRESS_0; >> #if defined(DEBUG_PCI_DETECT) >> - printk("%s: detect, seq. %d, bus %d, devfn 0x%x, addr 0x%x.\n", >> - driver_name, k, dev->bus->number, dev->devfn, addr); >> + printk("%s: detect, bus %d, devfn 0x%x, addr 0x%x.\n", >> + driver_name, dev->bus->number, dev->devfn, (unsigned int)addr); >> #endif >> >> - /* Order addresses according to rev_scan value */ >> - io_port[MAX_INT_PARAM + (rev_scan ? (MAX_PCI - k) : (1 + k))] = >> - addr + PCI_BASE_ADDRESS_0; >> + if (setup_done) { >> + /* >> + * Handle kernel or module parameter >> + * . probe board if its port is specified by user >> + * . otherwise ignore the board >> + */ >> + for (i = 1; i < MAX_INT_PARAM; i++) >> + if (io_port[i] == port_base) { >> + io_port[i] = SKIP; >> + break; >> + } >> + if (i >= MAX_INT_PARAM) >> + goto out_disable_device; >> + } > Hmm. I must admit I don't like the 'setup_done' thingie. As the driver > is now converted to a 'real' PCI device we should be using driver-core > mechanisms to avoid driver binding, not the prefabricated 'setup_done' > variable. > Can't we just do away with it completely? Hi Hannes, Thanks for review. Originally user may specify ports to probe by kernel or module parameter, no matter it's a ISA, EISA or PCI device. My concern here is that, if we don't do the setup_done dance here, it may cause trouble if user load new eata driver with old parameter configurations, so PCI eata device will be probed twice. So point here is that we still honor user kernel or module parameter configurations. Thanks! Gerry > > Cheers, > > Hannes > ^ permalink raw reply [flat|nested] 42+ messages in thread
* [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal 2015-09-14 3:08 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu 2015-09-14 3:08 ` [Bugfix 1/3] eata: Use IDA to manage eata board IDs Jiang Liu 2015-09-14 3:08 ` [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices Jiang Liu @ 2015-09-14 3:08 ` Jiang Liu 2015-09-14 8:21 ` Hannes Reinecke 2015-09-14 16:01 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Arthur Marsh 3 siblings, 1 reply; 42+ messages in thread From: Jiang Liu @ 2015-09-14 3:08 UTC (permalink / raw) To: Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Dario Ballabio, James E.J. Bottomley Cc: Jiang Liu, linux-kernel, linux-pci, linux-scsi, x86 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 <jiang.liu@linux.intel.com> --- drivers/scsi/eata.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index b92e6856f909..f3bd7cbf260e 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -1474,6 +1474,21 @@ static unsigned int port_probe(unsigned long port_base, #ifdef CONFIG_PCI static int eata2x_pci_device_count; +/* TODO: need help here to shutdown the scsi host and release resources */ +static void port_remove(unsigned int id, resource_size_t port_base, + struct pci_dev *pdev) +{ + struct Scsi_Host *shost = sh[id]; + + /* TODO: stop scsi device */ + scsi_unregister(shost); + /* TODO: clean up resources allocated by port_detect() */ + clear_bit(id, eata_board_bitmap); + free_irq(shost->irq, &sha[id]); + release_region(port_base, REGION_SIZE); + ida_simple_remove(&eata_ida, id); +} + static int eata2x_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { int i, ret = -ENXIO; @@ -1521,6 +1536,16 @@ out_error: return ret; } +static void eata2x_pci_remove(struct pci_dev *pdev) +{ + int id = (int)(long)dev_get_drvdata(&pdev->dev); + resource_size_t port_base; + + port_base = pci_resource_start(pdev, 0) + PCI_BASE_ADDRESS_0; + port_remove(id, port_base, pdev); + pci_disable_device(pdev); +} + static struct pci_device_id eata2x_tbl[] = { { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) }, { }, @@ -1531,6 +1556,7 @@ static struct pci_driver eata2x_pci_driver = { .name = "eata", .id_table = eata2x_tbl, .probe = eata2x_pci_probe, + .remove = eata2x_pci_remove, }; static int eata2x_probe_pci_devices(struct scsi_host_template *tpnt) -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal 2015-09-14 3:08 ` [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Jiang Liu @ 2015-09-14 8:21 ` Hannes Reinecke 2015-09-14 8:31 ` Ballabio, Dario 2015-09-16 13:42 ` Christoph Hellwig 0 siblings, 2 replies; 42+ messages in thread From: Hannes Reinecke @ 2015-09-14 8:21 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Dario Ballabio, James E.J. Bottomley Cc: linux-kernel, linux-pci, linux-scsi, x86 On 09/14/2015 05:08 AM, Jiang Liu wrote: > 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 <jiang.liu@linux.intel.com> > --- > drivers/scsi/eata.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c > index b92e6856f909..f3bd7cbf260e 100644 > --- a/drivers/scsi/eata.c > +++ b/drivers/scsi/eata.c > @@ -1474,6 +1474,21 @@ static unsigned int port_probe(unsigned long port_base, > #ifdef CONFIG_PCI > static int eata2x_pci_device_count; > > +/* TODO: need help here to shutdown the scsi host and release resources */ > +static void port_remove(unsigned int id, resource_size_t port_base, > + struct pci_dev *pdev) > +{ > + struct Scsi_Host *shost = sh[id]; > + > + /* TODO: stop scsi device */ > + scsi_unregister(shost); > + /* TODO: clean up resources allocated by port_detect() */ > + clear_bit(id, eata_board_bitmap); > + free_irq(shost->irq, &sha[id]); > + release_region(port_base, REGION_SIZE); > + ida_simple_remove(&eata_ida, id); > +} > + > static int eata2x_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) > { > int i, ret = -ENXIO; > @@ -1521,6 +1536,16 @@ out_error: > return ret; > } > > +static void eata2x_pci_remove(struct pci_dev *pdev) > +{ > + int id = (int)(long)dev_get_drvdata(&pdev->dev); > + resource_size_t port_base; > + > + port_base = pci_resource_start(pdev, 0) + PCI_BASE_ADDRESS_0; > + port_remove(id, port_base, pdev); > + pci_disable_device(pdev); > +} > + > static struct pci_device_id eata2x_tbl[] = { > { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) }, > { }, > @@ -1531,6 +1556,7 @@ static struct pci_driver eata2x_pci_driver = { > .name = "eata", > .id_table = eata2x_tbl, > .probe = eata2x_pci_probe, > + .remove = eata2x_pci_remove, > }; > > static int eata2x_probe_pci_devices(struct scsi_host_template *tpnt) > 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? Chances are no-one will ever need eata PCI hotplug; SCSI parallel typically isn't very good at hotplugging, so throwing in PCI hotplug will only confuse matters more. Plus due to the sheer mechanics involved here I find it very unlikely anyone will be using it in real life. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) ^ permalink raw reply [flat|nested] 42+ messages in thread
* RE: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal 2015-09-14 8:21 ` Hannes Reinecke @ 2015-09-14 8:31 ` Ballabio, Dario 2015-09-14 8:33 ` Jiang Liu 2015-09-16 13:42 ` Christoph Hellwig 1 sibling, 1 reply; 42+ messages in thread From: Ballabio, Dario @ 2015-09-14 8:31 UTC (permalink / raw) To: Hannes Reinecke, Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, James E.J. Bottomley Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, x86@kernel.org Agreed, It does not make sense to have this driver converted to a hot plug api. Cheers, *************************************** Ph.D. Dario Ballabio Principal Field Support Specialist, EMC EMEA Mobile phone: +393487978851 -----Original Message----- From: Hannes Reinecke [mailto:hare@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-kernel@vger.kernel.org; linux-pci@vger.kernel.org; linux-scsi@vger.kernel.org; x86@kernel.org Subject: Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal On 09/14/2015 05:08 AM, Jiang Liu wrote: > 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 <jiang.liu@linux.intel.com> > --- > drivers/scsi/eata.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index > b92e6856f909..f3bd7cbf260e 100644 > --- a/drivers/scsi/eata.c > +++ b/drivers/scsi/eata.c > @@ -1474,6 +1474,21 @@ static unsigned int port_probe(unsigned long > port_base, #ifdef CONFIG_PCI static int eata2x_pci_device_count; > > +/* TODO: need help here to shutdown the scsi host and release > +resources */ static void port_remove(unsigned int id, resource_size_t port_base, > + struct pci_dev *pdev) > +{ > + struct Scsi_Host *shost = sh[id]; > + > + /* TODO: stop scsi device */ > + scsi_unregister(shost); > + /* TODO: clean up resources allocated by port_detect() */ > + clear_bit(id, eata_board_bitmap); > + free_irq(shost->irq, &sha[id]); > + release_region(port_base, REGION_SIZE); > + ida_simple_remove(&eata_ida, id); > +} > + > static int eata2x_pci_probe(struct pci_dev *dev, const struct > pci_device_id *id) { > int i, ret = -ENXIO; > @@ -1521,6 +1536,16 @@ out_error: > return ret; > } > > +static void eata2x_pci_remove(struct pci_dev *pdev) { > + int id = (int)(long)dev_get_drvdata(&pdev->dev); > + resource_size_t port_base; > + > + port_base = pci_resource_start(pdev, 0) + PCI_BASE_ADDRESS_0; > + port_remove(id, port_base, pdev); > + pci_disable_device(pdev); > +} > + > static struct pci_device_id eata2x_tbl[] = { > { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) }, > { }, > @@ -1531,6 +1556,7 @@ static struct pci_driver eata2x_pci_driver = { > .name = "eata", > .id_table = eata2x_tbl, > .probe = eata2x_pci_probe, > + .remove = eata2x_pci_remove, > }; > > static int eata2x_probe_pci_devices(struct scsi_host_template *tpnt) > 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? Chances are no-one will ever need eata PCI hotplug; SCSI parallel typically isn't very good at hotplugging, so throwing in PCI hotplug will only confuse matters more. Plus due to the sheer mechanics involved here I find it very unlikely anyone will be using it in real life. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal 2015-09-14 8:31 ` Ballabio, Dario @ 2015-09-14 8:33 ` Jiang Liu 0 siblings, 0 replies; 42+ messages in thread From: Jiang Liu @ 2015-09-14 8:33 UTC (permalink / raw) To: Ballabio, Dario, Hannes Reinecke, Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, James E.J. Bottomley Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, x86@kernel.org On 2015/9/14 16:31, Ballabio, Dario wrote: > Agreed, It does not make sense to have this driver converted to a hot plug api. Thanks, got the point:) Originally i thought user may trigger PCI device hot-removal by sysfs interfaces and there's comment mentioning that eata driver breaks PCI hotplug, so I tried to solve it. If it's no real use, we may just drop the third patch. Thanks! Gerry > > Cheers, > > > > *************************************** > Ph.D. Dario Ballabio > Principal Field Support Specialist, EMC EMEA > Mobile phone: +393487978851 > > > > -----Original Message----- > From: Hannes Reinecke [mailto:hare@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-kernel@vger.kernel.org; linux-pci@vger.kernel.org; linux-scsi@vger.kernel.org; x86@kernel.org > Subject: Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal > > On 09/14/2015 05:08 AM, Jiang Liu wrote: >> 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 <jiang.liu@linux.intel.com> >> --- >> drivers/scsi/eata.c | 26 ++++++++++++++++++++++++++ >> 1 file changed, 26 insertions(+) >> >> diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index >> b92e6856f909..f3bd7cbf260e 100644 >> --- a/drivers/scsi/eata.c >> +++ b/drivers/scsi/eata.c >> @@ -1474,6 +1474,21 @@ static unsigned int port_probe(unsigned long >> port_base, #ifdef CONFIG_PCI static int eata2x_pci_device_count; >> >> +/* TODO: need help here to shutdown the scsi host and release >> +resources */ static void port_remove(unsigned int id, resource_size_t port_base, >> + struct pci_dev *pdev) >> +{ >> + struct Scsi_Host *shost = sh[id]; >> + >> + /* TODO: stop scsi device */ >> + scsi_unregister(shost); >> + /* TODO: clean up resources allocated by port_detect() */ >> + clear_bit(id, eata_board_bitmap); >> + free_irq(shost->irq, &sha[id]); >> + release_region(port_base, REGION_SIZE); >> + ida_simple_remove(&eata_ida, id); >> +} >> + >> static int eata2x_pci_probe(struct pci_dev *dev, const struct >> pci_device_id *id) { >> int i, ret = -ENXIO; >> @@ -1521,6 +1536,16 @@ out_error: >> return ret; >> } >> >> +static void eata2x_pci_remove(struct pci_dev *pdev) { >> + int id = (int)(long)dev_get_drvdata(&pdev->dev); >> + resource_size_t port_base; >> + >> + port_base = pci_resource_start(pdev, 0) + PCI_BASE_ADDRESS_0; >> + port_remove(id, port_base, pdev); >> + pci_disable_device(pdev); >> +} >> + >> static struct pci_device_id eata2x_tbl[] = { >> { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) }, >> { }, >> @@ -1531,6 +1556,7 @@ static struct pci_driver eata2x_pci_driver = { >> .name = "eata", >> .id_table = eata2x_tbl, >> .probe = eata2x_pci_probe, >> + .remove = eata2x_pci_remove, >> }; >> >> static int eata2x_probe_pci_devices(struct scsi_host_template *tpnt) >> > 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? > Chances are no-one will ever need eata PCI hotplug; SCSI parallel typically isn't very good at hotplugging, so throwing in PCI hotplug will only confuse matters more. > Plus due to the sheer mechanics involved here I find it very unlikely anyone will be using it in real life. > > Cheers, > > Hannes > ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal 2015-09-14 8:21 ` Hannes Reinecke 2015-09-14 8:31 ` Ballabio, Dario @ 2015-09-16 13:42 ` Christoph Hellwig 2015-09-17 6:49 ` Jiang Liu ` (2 more replies) 1 sibling, 3 replies; 42+ messages in thread From: Christoph Hellwig @ 2015-09-16 13:42 UTC (permalink / raw) To: Hannes Reinecke Cc: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Dario Ballabio, James E.J. Bottomley, linux-kernel, linux-pci, linux-scsi, x86 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? > Chances are no-one will ever need eata PCI hotplug; SCSI parallel > typically isn't very good at hotplugging, so throwing in PCI hotplug > will only confuse matters more. > Plus due to the sheer mechanics involved here I find it very unlikely > anyone will be using it in real life. Because it's used for module removal and we want every driver to use the standard interface that. Jiang, you also need to convert the driver to scsi_add_host/scsi_remove_host from the legacy scsi_register interface, otherwise the SCSI layer will be very unhappy. Take a look at commit 0d31f8759109cbc1e6fc196d08e6b0e8a9e93b3f for example, the change should be straight forward. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal 2015-09-16 13:42 ` Christoph Hellwig @ 2015-09-17 6:49 ` Jiang Liu 2015-09-18 15:08 ` Arthur Marsh 2015-09-22 7:30 ` [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers Jiang Liu 2 siblings, 0 replies; 42+ messages in thread From: Jiang Liu @ 2015-09-17 6:49 UTC (permalink / raw) To: Christoph Hellwig, Hannes Reinecke Cc: Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Dario Ballabio, James E.J. Bottomley, linux-kernel, linux-pci, linux-scsi, x86 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? >> Chances are no-one will ever need eata PCI hotplug; SCSI parallel >> typically isn't very good at hotplugging, so throwing in PCI hotplug >> will only confuse matters more. >> Plus due to the sheer mechanics involved here I find it very unlikely >> anyone will be using it in real life. > > Because it's used for module removal and we want every driver to use > the standard interface that. > > Jiang, you also need to convert the driver to > scsi_add_host/scsi_remove_host from the legacy scsi_register interface, > otherwise the SCSI layer will be very unhappy. > > Take a look at commit 0d31f8759109cbc1e6fc196d08e6b0e8a9e93b3f for > example, the change should be straight forward. Hi Christoph, I have taken a look at the commit 0d31f8759109cb and it seems that the conversion is not so big. But I have no hardware for testing, so could only ask for help from community. Thanks! Gerry ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal 2015-09-16 13:42 ` Christoph Hellwig 2015-09-17 6:49 ` Jiang Liu @ 2015-09-18 15:08 ` Arthur Marsh 2015-09-22 7:30 ` [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers Jiang Liu 2 siblings, 0 replies; 42+ messages in thread From: Arthur Marsh @ 2015-09-18 15:08 UTC (permalink / raw) To: Christoph Hellwig, Hannes Reinecke Cc: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Dario Ballabio, James E.J. Bottomley, linux-kernel, linux-pci, linux-scsi, x86 Christoph Hellwig wrote on 16/09/15 23:12: > Jiang, you also need to convert the driver to > scsi_add_host/scsi_remove_host from the legacy scsi_register interface, > otherwise the SCSI layer will be very unhappy. > > Take a look at commit 0d31f8759109cbc1e6fc196d08e6b0e8a9e93b3f for > example, the change should be straight forward. > I am pleased to note that when I tried a Linus git head kernel from the last 24 hours, the IRQ routing for my DPT2044W SCSI card using eata module worked again, although the shut-down/kexec issue remains. Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-16 13:42 ` Christoph Hellwig 2015-09-17 6:49 ` Jiang Liu 2015-09-18 15:08 ` Arthur Marsh @ 2015-09-22 7:30 ` Jiang Liu 2015-09-22 20:27 ` Hannes Reinecke 2015-09-22 22:25 ` Arthur Marsh 2 siblings, 2 replies; 42+ messages in thread From: Jiang Liu @ 2015-09-22 7:30 UTC (permalink / raw) To: Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, James E.J. Bottomley Cc: Jiang Liu, linux-kernel, linux-pci, linux-scsi, x86 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() and pcibios_free_irq()") changes the way to allocate PCI legacy IRQ for PCI devices on x86 platforms. Instead of allocating PCI legacy IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() will be called by pci_device_probe() to allocate PCI legacy IRQs when binding PCI drivers to PCI devices. But the eata driver directly accesses PCI devices without implementing corresponding PCI drivers, so pcibios_alloc_irq() won't be called for those PCI devices and wrong IRQ number may be used to manage the PCI device. This patch implements a PCI device driver to manage eata PCI devices, so eata driver could properly cooperate with the PCI core. It 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 <jiang.liu@linux.intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Ballabio, Dario <dario.ballabio@emc.com> Cc: Christoph Hellwig <hch@infradead.org> --- Hi all, I have no hardware to test the patch set, so it only passing compilation and module loading tests. Any help to test this patch on real hardware are welcomed! Thanks! Gerry --- drivers/scsi/eata.c | 441 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 262 insertions(+), 179 deletions(-) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 227dd2c2ec2f..dc2c76b7873e 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -486,6 +486,8 @@ #include <linux/interrupt.h> #include <linux/stat.h> #include <linux/pci.h> +#include <linux/platform_device.h> +#include <linux/idr.h> #include <linux/init.h> #include <linux/ctype.h> #include <linux/spinlock.h> @@ -503,8 +505,6 @@ #include <scsi/scsi_tcq.h> #include <scsi/scsicam.h> -static int eata2x_detect(struct scsi_host_template *); -static int eata2x_release(struct Scsi_Host *); static int eata2x_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); static int eata2x_eh_abort(struct scsi_cmnd *); static int eata2x_eh_host_reset(struct scsi_cmnd *); @@ -513,9 +513,9 @@ static int eata2x_bios_param(struct scsi_device *, struct block_device *, static int eata2x_slave_configure(struct scsi_device *); static struct scsi_host_template driver_template = { + .module = THIS_MODULE, + .proc_name = "eata2x", .name = "EATA/DMA 2.0x rev. 8.10.00 ", - .detect = eata2x_detect, - .release = eata2x_release, .queuecommand = eata2x_queuecommand, .eh_abort_handler = eata2x_eh_abort, .eh_host_reset_handler = eata2x_eh_host_reset, @@ -834,12 +834,9 @@ struct hostdata { struct mssp sp; /* Local copy of sp buffer */ }; -static struct Scsi_Host *sh[MAX_BOARDS]; static const char *driver_name = "EATA"; -static char sha[MAX_BOARDS]; - -/* Initialize num_boards so that ihdlr can work while detect is in progress */ -static unsigned int num_boards = MAX_BOARDS; +static DEFINE_IDA(eata2x_ida); +static struct platform_device *eata2x_platform_devs[MAX_BOARDS]; static unsigned long io_port[] = { @@ -850,10 +847,6 @@ static unsigned long io_port[] = { /* First ISA */ 0x1f0, - /* Space for MAX_PCI ports possibly reported by PCI_BIOS */ - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, - /* MAX_EISA ports */ 0x1c88, 0x2c88, 0x3c88, 0x4c88, 0x5c88, 0x6c88, 0x7c88, 0x8c88, 0x9c88, 0xac88, 0xbc88, 0xcc88, 0xdc88, 0xec88, 0xfc88, @@ -1024,74 +1017,41 @@ static int read_pio(unsigned long iobase, ushort * start, ushort * end) return 0; } -static struct pci_dev *get_pci_dev(unsigned long port_base) -{ -#if defined(CONFIG_PCI) - unsigned int addr; - struct pci_dev *dev = NULL; - - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { - addr = pci_resource_start(dev, 0); - -#if defined(DEBUG_PCI_DETECT) - printk("%s: get_pci_dev, bus %d, devfn 0x%x, addr 0x%x.\n", - driver_name, dev->bus->number, dev->devfn, addr); -#endif - - /* we are in so much trouble for a pci hotplug system with this driver - * anyway, so doing this at least lets people unload the driver and not - * cause memory problems, but in general this is a bad thing to do (this - * driver needs to be converted to the proper PCI api someday... */ - pci_dev_put(dev); - if (addr + PCI_BASE_ADDRESS_0 == port_base) - return dev; - } -#endif /* end CONFIG_PCI */ - return NULL; -} - -static void enable_pci_ports(void) -{ -#if defined(CONFIG_PCI) - struct pci_dev *dev = NULL; - - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { -#if defined(DEBUG_PCI_DETECT) - printk("%s: enable_pci_ports, bus %d, devfn 0x%x.\n", - driver_name, dev->bus->number, dev->devfn); -#endif - - if (pci_enable_device(dev)) - printk - ("%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n", - driver_name, dev->bus->number, dev->devfn); - } - -#endif /* end CONFIG_PCI */ -} - -static int port_detect(unsigned long port_base, unsigned int j, - struct scsi_host_template *tpnt) +static int port_detect(unsigned long port_base, struct device *dev) { unsigned char irq, dma_channel, subversion, i, is_pci = 0; unsigned char protocol_rev; struct eata_info info; char *bus_type, dma_name[16]; - struct pci_dev *pdev; + struct pci_dev *pdev = NULL; /* Allowed DMA channels for ISA (0 indicates reserved) */ unsigned char dma_channel_table[4] = { 5, 6, 7, 0 }; struct Scsi_Host *shost; struct hostdata *ha; char name[16]; + int idx, ret = -ENODEV; - sprintf(name, "%s%d", driver_name, j); + idx = ida_simple_get(&eata2x_ida, 0, MAX_BOARDS, GFP_KERNEL); + if (idx < 0) { + ret = idx; + goto fail; + } + + shost = scsi_host_alloc(&driver_template, sizeof(struct hostdata)); + if (shost == NULL) { + printk("%s: unable to alloc host, detaching.\n", driver_name); + ret = -ENOMEM; + goto freeid; + } + + sprintf(name, "%s%d", driver_name, idx); if (!request_region(port_base, REGION_SIZE, driver_name)) { #if defined(DEBUG_DETECT) printk("%s: address 0x%03lx in use, skipping probe.\n", name, port_base); #endif - goto fail; + goto freeshost; } if (do_dma(port_base, 0, READ_CONFIG_PIO)) { @@ -1199,15 +1159,10 @@ static int port_detect(unsigned long port_base, unsigned int j, ("%s: warning, LEVEL triggering is suggested for IRQ %u.\n", name, irq); - if (is_pci) { - pdev = get_pci_dev(port_base); - if (!pdev) - printk - ("%s: warning, failed to get pci_dev structure.\n", - name); - } else - pdev = NULL; - + if (dev_is_pci(dev)) + pdev = to_pci_dev(dev); + if (is_pci && !pdev) + printk("%s: warning, failed to get pci_dev structure.\n", name); if (pdev && (irq != pdev->irq)) { printk("%s: IRQ %u mapped to IO-APIC IRQ %u.\n", name, irq, pdev->irq); @@ -1217,7 +1172,7 @@ static int port_detect(unsigned long port_base, unsigned int j, /* Board detected, allocate its IRQ */ if (request_irq(irq, do_interrupt_handler, (subversion == ESA) ? IRQF_SHARED : 0, - driver_name, (void *)&sha[j])) { + driver_name, shost)) { printk("%s: unable to allocate IRQ %u, detaching.\n", name, irq); goto freelock; @@ -1259,12 +1214,6 @@ static int port_detect(unsigned long port_base, unsigned int j, } #endif - sh[j] = shost = scsi_register(tpnt, sizeof(struct hostdata)); - if (shost == NULL) { - printk("%s: unable to register host, detaching.\n", name); - goto freedma; - } - shost->io_port = port_base; shost->unique_id = port_base; shost->n_io_port = REGION_SIZE; @@ -1282,7 +1231,7 @@ static int port_detect(unsigned long port_base, unsigned int j, ha->protocol_rev = protocol_rev; ha->is_pci = is_pci; ha->pdev = pdev; - ha->board_number = j; + ha->board_number = idx; if (ha->subversion == ESA) shost->unchecked_isa_dma = 0; @@ -1350,7 +1299,7 @@ static int port_detect(unsigned long port_base, unsigned int j, printk ("%s: kmalloc SGlist failed, mbox %d, detaching.\n", ha->board_name, i); - goto release; + goto free_cp_dma_addr; } } @@ -1358,7 +1307,7 @@ static int port_detect(unsigned long port_base, unsigned int j, sizeof(struct mssp), &ha->sp_dma_addr))) { printk("%s: pci_alloc_consistent failed, detaching.\n", ha->board_name); - goto release; + goto free_sglist; } if (max_queue_depth > MAX_TAGGED_CMD_PER_LUN) @@ -1370,7 +1319,7 @@ static int port_detect(unsigned long port_base, unsigned int j, if (tag_mode != TAG_DISABLED && tag_mode != TAG_SIMPLE) tag_mode = TAG_ORDERED; - if (j == 0) { + if (idx == 0) { printk ("EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio.\n"); printk @@ -1420,21 +1369,65 @@ static int port_detect(unsigned long port_base, unsigned int j, ha->board_name); } - return 1; + ret = scsi_add_host(shost, NULL); + if (!ret) { + dev_set_drvdata(dev, shost); + scsi_scan_host(shost); + return idx; + } - freedma: + if (ha->sp_cpu_addr) + pci_free_consistent(ha->pdev, sizeof(struct mssp), + ha->sp_cpu_addr, ha->sp_dma_addr); +free_sglist: + for (i = 0; i < shost->can_queue; i++) + kfree((&ha->cp[i])->sglist); +free_cp_dma_addr: + for (i = 0; i < shost->can_queue; i++) + pci_unmap_single(ha->pdev, ha->cp[i].cp_dma_addr, + sizeof(struct mscp), PCI_DMA_BIDIRECTIONAL); +#if defined(FORCE_CONFIG) +freedma: if (subversion == ISA) free_dma(dma_channel); - freeirq: - free_irq(irq, &sha[j]); - freelock: +#endif +freeirq: + free_irq(irq, shost); +freelock: release_region(port_base, REGION_SIZE); - fail: - return 0; +freeshost: + scsi_host_put(shost); +freeid: + ida_simple_remove(&eata2x_ida, idx); +fail: + return ret; +} - release: - eata2x_release(shost); - return 0; +static void port_remove(struct device *dev) +{ + struct Scsi_Host *shost = dev_get_drvdata(dev); + struct hostdata *ha; + unsigned int i; + + if (!shost) + return; + + scsi_remove_host(shost); + ha = (struct hostdata *)shost->hostdata; + for (i = 0; i < shost->can_queue; i++) + kfree((&ha->cp[i])->sglist); + for (i = 0; i < shost->can_queue; i++) + pci_unmap_single(ha->pdev, ha->cp[i].cp_dma_addr, + sizeof(struct mscp), PCI_DMA_BIDIRECTIONAL); + if (ha->sp_cpu_addr) + pci_free_consistent(ha->pdev, sizeof(struct mssp), + ha->sp_cpu_addr, ha->sp_dma_addr); + if (shost->dma_channel != NO_DMA) + free_dma(shost->dma_channel); + free_irq(shost->irq, shost); + release_region(shost->io_port, shost->n_io_port); + ida_simple_remove(&eata2x_ida, ha->board_number); + scsi_host_put(shost); } static void internal_setup(char *str, int *ints) @@ -1509,59 +1502,125 @@ static int option_setup(char *str) return 1; } -static void add_pci_ports(void) +#ifdef CONFIG_PCI +static int eata2x_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { -#if defined(CONFIG_PCI) - unsigned int addr, k; - struct pci_dev *dev = NULL; + int i; + resource_size_t addr; + unsigned long port_base; + + if (pci_enable_device(dev)) { + if (config_enabled(DEBUG_PCI_DETECT)) + pr_warn("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", + driver_name, dev->bus->number, dev->devfn); + goto out_error; + } - for (k = 0; k < MAX_PCI; k++) { + addr = pci_resource_start(dev, 0); + port_base = addr + PCI_BASE_ADDRESS_0; + if (config_enabled(DEBUG_PCI_DETECT)) + printk("%s: detect, bus %d, devfn 0x%x, addr 0x%x.\n", + driver_name, dev->bus->number, dev->devfn, + (unsigned int)addr); + + if (setup_done) { + /* + * Handle kernel or module parameter + * . probe board if its port is specified by user + * . otherwise ignore the board + */ + for (i = 1; i < MAX_INT_PARAM; i++) + if (io_port[i] == port_base) { + io_port[i] = SKIP; + break; + } + if (i >= MAX_INT_PARAM) + goto out_disable_device; + } - if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) - break; + if (port_detect(port_base, &dev->dev) >= 0) + return 0; - if (pci_enable_device(dev)) { -#if defined(DEBUG_PCI_DETECT) - printk - ("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", - driver_name, dev->bus->number, dev->devfn); -#endif +out_disable_device: + pci_disable_device(dev); +out_error: + return -ENXIO; +} - continue; - } +static void eata2x_pci_remove(struct pci_dev *pdev) +{ + port_remove(&pdev->dev); + pci_disable_device(pdev); +} - addr = pci_resource_start(dev, 0); +static struct pci_device_id eata2x_tbl[] = { + { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) }, + { }, +}; +MODULE_DEVICE_TABLE(pci, eata2x_tbl); -#if defined(DEBUG_PCI_DETECT) - printk("%s: detect, seq. %d, bus %d, devfn 0x%x, addr 0x%x.\n", - driver_name, k, dev->bus->number, dev->devfn, addr); -#endif +static struct pci_driver eata2x_pci_driver = { + .name = "eata_pci", + .id_table = eata2x_tbl, + .probe = eata2x_pci_probe, + .remove = eata2x_pci_remove, +}; - /* Order addresses according to rev_scan value */ - io_port[MAX_INT_PARAM + (rev_scan ? (MAX_PCI - k) : (1 + k))] = - addr + PCI_BASE_ADDRESS_0; - } +static int eata2x_register_pci_driver(void) +{ + if (!pci_probe) + return 0; + if (!pci_register_driver(&eata2x_pci_driver)) + return 1; + pr_warn("%s: failed to register PCI device driver.\n", driver_name); + return -ENODEV; +} - pci_dev_put(dev); -#endif /* end CONFIG_PCI */ +static void eata2x_unregister_pci_driver(void) +{ + pci_unregister_driver(&eata2x_pci_driver); } +#else /* CONFIG_PCI */ +static inline int eata2x_register_pci_driver(void) { return 0; } +static inline void eata2x_unregister_pci_driver(void) {} +#endif /* CONFIG_PCI */ -static int eata2x_detect(struct scsi_host_template *tpnt) +static int __init eata2x_platform_probe(struct platform_device *pdev) { - unsigned int j = 0, k; + int ret = -EIO; + struct resource *res; - tpnt->proc_name = "eata2x"; + res = platform_get_resource(pdev, IORESOURCE_IO, 0); + if (!res) + dev_warn(&pdev->dev, "failed to get base IOPORT.\n"); + else + ret = port_detect(res->start, &pdev->dev); - if (strlen(boot_options)) - option_setup(boot_options); + return ret >= 0 ? 0 : ret; +} -#if defined(MODULE) - /* io_port could have been modified when loading as a module */ - if (io_port[0] != SKIP) { - setup_done = 1; - io_port[MAX_INT_PARAM] = 0; - } -#endif +static int __exit eata2x_platform_remove(struct platform_device *pdev) +{ + port_remove(&pdev->dev); + return 0; +} + +static struct platform_driver eata2x_platform_driver = { + .remove = __exit_p(eata2x_platform_remove), + .driver = { + .name = "eata_plat", + .owner = THIS_MODULE, + }, +}; + +static int eata2x_probe_platform_devices(void) +{ + int k, count = 0, idx = 0, error = 0; + struct platform_driver *driver = &eata2x_platform_driver; + struct platform_device *pdev; + struct resource res = { + .flags = IORESOURCE_IO, + }; for (k = MAX_INT_PARAM; io_port[k]; k++) if (io_port[k] == SKIP) @@ -1574,25 +1633,80 @@ static int eata2x_detect(struct scsi_host_template *tpnt) if (!eisa_probe) io_port[k] = SKIP; } - - if (pci_probe) { - if (!setup_done) - add_pci_ports(); + for (k = 0; error == 0 && io_port[k]; k++) { + if (io_port[k] == SKIP) + continue; + res.start = io_port[k]; + res.end = io_port[k] + REGION_SIZE - 1; + pdev = platform_device_register_simple(driver->driver.name, + idx, &res, 1); + if (!pdev) + error = -ENOMEM; else - enable_pci_ports(); + eata2x_platform_devs[idx++] = pdev; + } + if (error == 0) + error = platform_driver_probe(driver, eata2x_platform_probe); + for (k = 0; k < idx; k++) { + pdev = eata2x_platform_devs[k]; + if (error || platform_get_drvdata(pdev) == NULL) { + platform_device_unregister(pdev); + eata2x_platform_devs[idx] = NULL;; + } else { + count++; + } } - for (k = 0; io_port[k]; k++) { + return count; +} - if (io_port[k] == SKIP) - continue; +static void eata2x_remove_platform_devices(void) +{ + int idx; + struct platform_device *pdev; + + platform_driver_unregister(&eata2x_platform_driver); + for (idx = 0; idx < MAX_BOARDS; idx++) { + pdev = eata2x_platform_devs[idx]; + if (pdev) { + platform_device_unregister(pdev); + eata2x_platform_devs[idx] = NULL;; + } + } +} + +static int __init eata2x_init(void) +{ + int ret, count = 0; - if (j < MAX_BOARDS && port_detect(io_port[k], j, tpnt)) - j++; + if (strlen(boot_options)) + option_setup(boot_options); + + /* io_port could have been modified when loading as a module */ + if (config_enabled(MODULE) && io_port[0] != SKIP) { + setup_done = 1; + io_port[MAX_INT_PARAM] = 0; } - num_boards = j; - return j; + ret = eata2x_register_pci_driver(); + if (ret >= 0) { + count += ret; + ret = eata2x_probe_platform_devices(); + if (ret > 0) + count += ret; + } + if (ret >= 0 && count > 0) + return 0; + + eata2x_remove_platform_devices(); + eata2x_unregister_pci_driver(); + return ret < 0 ? ret : -ENODEV; +} + +static void __exit eata2x_exit(void) +{ + eata2x_remove_platform_devices(); + eata2x_unregister_pci_driver(); } static void map_dma(unsigned int i, struct hostdata *ha) @@ -2527,51 +2641,20 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost) return IRQ_NONE; } -static irqreturn_t do_interrupt_handler(int dummy, void *shap) +static irqreturn_t do_interrupt_handler(int dummy, void *data) { - struct Scsi_Host *shost; - unsigned int j; + struct Scsi_Host *shost = data; unsigned long spin_flags; irqreturn_t ret; - /* Check if the interrupt must be processed by this handler */ - if ((j = (unsigned int)((char *)shap - sha)) >= num_boards) - return IRQ_NONE; - shost = sh[j]; - spin_lock_irqsave(shost->host_lock, spin_flags); ret = ihdlr(shost); spin_unlock_irqrestore(shost->host_lock, spin_flags); return ret; } -static int eata2x_release(struct Scsi_Host *shost) -{ - struct hostdata *ha = (struct hostdata *)shost->hostdata; - unsigned int i; - - for (i = 0; i < shost->can_queue; i++) - kfree((&ha->cp[i])->sglist); - - for (i = 0; i < shost->can_queue; i++) - pci_unmap_single(ha->pdev, ha->cp[i].cp_dma_addr, - sizeof(struct mscp), PCI_DMA_BIDIRECTIONAL); - - if (ha->sp_cpu_addr) - pci_free_consistent(ha->pdev, sizeof(struct mssp), - ha->sp_cpu_addr, ha->sp_dma_addr); - - free_irq(shost->irq, &sha[ha->board_number]); - - if (shost->dma_channel != NO_DMA) - free_dma(shost->dma_channel); - - release_region(shost->io_port, shost->n_io_port); - scsi_unregister(shost); - return 0; -} - -#include "scsi_module.c" +module_init(eata2x_init); +module_exit(eata2x_exit); #ifndef MODULE __setup("eata=", option_setup); -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-22 7:30 ` [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers Jiang Liu @ 2015-09-22 20:27 ` Hannes Reinecke 2015-09-22 22:25 ` Arthur Marsh 1 sibling, 0 replies; 42+ messages in thread From: Hannes Reinecke @ 2015-09-22 20:27 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Arthur Marsh, Ballabio Dario, Christoph Hellwig, Dario Ballabio, James E.J. Bottomley Cc: linux-kernel, linux-pci, linux-scsi, x86 On 09/22/2015 09:30 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 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()") changes the way to allocate PCI legacy IRQ > for PCI devices on x86 platforms. Instead of allocating PCI legacy > IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() > will be called by pci_device_probe() to allocate PCI legacy IRQs > when binding PCI drivers to PCI devices. > > But the eata driver directly accesses PCI devices without implementing > corresponding PCI drivers, so pcibios_alloc_irq() won't be called for > those PCI devices and wrong IRQ number may be used to manage the PCI > device. > > This patch implements a PCI device driver to manage eata PCI devices, > so eata driver could properly cooperate with the PCI core. It 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 <jiang.liu@linux.intel.com> > Cc: Hannes Reinecke <hare@suse.de> > Cc: Ballabio, Dario <dario.ballabio@emc.com> > Cc: Christoph Hellwig <hch@infradead.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-22 7:30 ` [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers Jiang Liu 2015-09-22 20:27 ` Hannes Reinecke @ 2015-09-22 22:25 ` Arthur Marsh 2015-09-22 22:45 ` James Bottomley 1 sibling, 1 reply; 42+ messages in thread From: Arthur Marsh @ 2015-09-22 22:25 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, James E.J. Bottomley Cc: linux-kernel, linux-pci, linux-scsi, x86 Jiang Liu wrote on 22/09/15 17:00: > 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() and > pcibios_free_irq()") changes the way to allocate PCI legacy IRQ > for PCI devices on x86 platforms. Instead of allocating PCI legacy > IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() > will be called by pci_device_probe() to allocate PCI legacy IRQs > when binding PCI drivers to PCI devices. > > But the eata driver directly accesses PCI devices without implementing > corresponding PCI drivers, so pcibios_alloc_irq() won't be called for > those PCI devices and wrong IRQ number may be used to manage the PCI > device. > > This patch implements a PCI device driver to manage eata PCI devices, > so eata driver could properly cooperate with the PCI core. It 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 <jiang.liu@linux.intel.com> > Cc: Hannes Reinecke <hare@suse.de> > Cc: Ballabio, Dario <dario.ballabio@emc.com> > Cc: Christoph Hellwig <hch@infradead.org> > --- Not really any change with this driver: previously http://www.users.on.net/~arthur.marsh/20150915547.jpg now http://www.users.on.net/~arthur.marsh/20150922553.jpg If there was any way of capturing any more debug output I'd be happy to do it. Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-22 22:25 ` Arthur Marsh @ 2015-09-22 22:45 ` James Bottomley 2015-09-22 23:36 ` Arthur Marsh 0 siblings, 1 reply; 42+ messages in thread From: James Bottomley @ 2015-09-22 22:45 UTC (permalink / raw) To: Arthur Marsh Cc: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 On Wed, 2015-09-23 at 07:55 +0930, Arthur Marsh wrote: > > Jiang Liu wrote on 22/09/15 17:00: > > 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() and > > pcibios_free_irq()") changes the way to allocate PCI legacy IRQ > > for PCI devices on x86 platforms. Instead of allocating PCI legacy > > IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() > > will be called by pci_device_probe() to allocate PCI legacy IRQs > > when binding PCI drivers to PCI devices. > > > > But the eata driver directly accesses PCI devices without implementing > > corresponding PCI drivers, so pcibios_alloc_irq() won't be called for > > those PCI devices and wrong IRQ number may be used to manage the PCI > > device. > > > > This patch implements a PCI device driver to manage eata PCI devices, > > so eata driver could properly cooperate with the PCI core. It 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 <jiang.liu@linux.intel.com> > > Cc: Hannes Reinecke <hare@suse.de> > > Cc: Ballabio, Dario <dario.ballabio@emc.com> > > Cc: Christoph Hellwig <hch@infradead.org> > > --- > > Not really any change with this driver: > > previously > > http://www.users.on.net/~arthur.marsh/20150915547.jpg > > now > > http://www.users.on.net/~arthur.marsh/20150922553.jpg > > If there was any way of capturing any more debug output I'd be happy to > do it. It looks to be some problem in shut down. Can you simply remove and re-insert the driver successfully? If it's your root disk driver, you'll have to do this from an initrd so as not to have root mounted from the eata controller. If the remove and reinsert fails, it means we have a problem in the driver shut down. If not, it's likely something kexec related. James ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-22 22:45 ` James Bottomley @ 2015-09-22 23:36 ` Arthur Marsh 2015-09-23 5:24 ` Jiang Liu 0 siblings, 1 reply; 42+ messages in thread From: Arthur Marsh @ 2015-09-22 23:36 UTC (permalink / raw) To: James Bottomley Cc: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 [-- Attachment #1: Type: text/plain, Size: 2501 bytes --] James Bottomley wrote on 23/09/15 08:15: > On Wed, 2015-09-23 at 07:55 +0930, Arthur Marsh wrote: >> >> Jiang Liu wrote on 22/09/15 17:00: >>> 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() and >>> pcibios_free_irq()") changes the way to allocate PCI legacy IRQ >>> for PCI devices on x86 platforms. Instead of allocating PCI legacy >>> IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() >>> will be called by pci_device_probe() to allocate PCI legacy IRQs >>> when binding PCI drivers to PCI devices. >>> >>> But the eata driver directly accesses PCI devices without implementing >>> corresponding PCI drivers, so pcibios_alloc_irq() won't be called for >>> those PCI devices and wrong IRQ number may be used to manage the PCI >>> device. >>> >>> This patch implements a PCI device driver to manage eata PCI devices, >>> so eata driver could properly cooperate with the PCI core. It 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 <jiang.liu@linux.intel.com> >>> Cc: Hannes Reinecke <hare@suse.de> >>> Cc: Ballabio, Dario <dario.ballabio@emc.com> >>> Cc: Christoph Hellwig <hch@infradead.org> >>> --- >> >> Not really any change with this driver: >> >> previously >> >> http://www.users.on.net/~arthur.marsh/20150915547.jpg >> >> now >> >> http://www.users.on.net/~arthur.marsh/20150922553.jpg >> >> If there was any way of capturing any more debug output I'd be happy to >> do it. > > It looks to be some problem in shut down. Can you simply remove and > re-insert the driver successfully? If it's your root disk driver, > you'll have to do this from an initrd so as not to have root mounted > from the eata controller. > > If the remove and reinsert fails, it means we have a problem in the > driver shut down. If not, it's likely something kexec related. > > James OK, it looks like there was a problem with unloading the driver. After un-mounting file systems on the disk attached to the SCSI controller using the eata driver I could do a: modprobe -r eata but received the output of the attached dmesg log. Attempting to do modprobe eata after the previous modprobe -r eata resulted in a complete lock-up. Arthur. [-- Attachment #2: 20150922modprobedmesg.txt --] [-- Type: text/plain, Size: 64825 bytes --] [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.3.0-rc2+ (root@victoria) (gcc version 5.2.1 20150911 (Debian 5.2.1-17) ) #49 SMP PREEMPT Tue Sep 22 04:58:18 ACST 2015 [ 0.000000] x86/fpu: Legacy x87 FPU detected. [ 0.000000] x86/fpu: Using 'lazy' FPU context switches. [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003ffaffff] usable [ 0.000000] BIOS-e820: [mem 0x000000003ffb0000-0x000000003ffbdfff] ACPI data [ 0.000000] BIOS-e820: [mem 0x000000003ffbe000-0x000000003ffdffff] ACPI NVS [ 0.000000] BIOS-e820: [mem 0x000000003ffe0000-0x000000003fffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000ff780000-0x00000000ffffffff] reserved [ 0.000000] Notice: NX (Execute Disable) protection cannot be enabled: non-PAE kernel! [ 0.000000] SMBIOS 2.3 present. [ 0.000000] DMI: System manufacturer System Product Name/A8V-MX, BIOS 0503 12/06/2005 [ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable [ 0.000000] e820: last_pfn = 0x3ffb0 max_arch_pfn = 0x100000 [ 0.000000] MTRR default type: uncachable [ 0.000000] MTRR fixed ranges enabled: [ 0.000000] 00000-9FFFF write-back [ 0.000000] A0000-EFFFF uncachable [ 0.000000] F0000-FFFFF write-protect [ 0.000000] MTRR variable ranges enabled: [ 0.000000] 0 base 0000000000 mask FFC0000000 write-back [ 0.000000] 1 base 00D0000000 mask FFF0000000 write-combining [ 0.000000] 2 disabled [ 0.000000] 3 disabled [ 0.000000] 4 disabled [ 0.000000] 5 disabled [ 0.000000] 6 disabled [ 0.000000] 7 disabled [ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT [ 0.000000] found SMP MP-table at [mem 0x000ff780-0x000ff78f] mapped at [c00ff780] [ 0.000000] initial memory mapped: [mem 0x00000000-0x023fffff] [ 0.000000] Base memory trampoline at [c009b000] 9b000 size 16384 [ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff] [ 0.000000] [mem 0x00000000-0x000fffff] page 4k [ 0.000000] init_memory_mapping: [mem 0x35c00000-0x35ffffff] [ 0.000000] [mem 0x35c00000-0x35ffffff] page 4M [ 0.000000] init_memory_mapping: [mem 0x00100000-0x35bfffff] [ 0.000000] [mem 0x00100000-0x003fffff] page 4k [ 0.000000] [mem 0x00400000-0x35bfffff] page 4M [ 0.000000] init_memory_mapping: [mem 0x36000000-0x377fdfff] [ 0.000000] [mem 0x36000000-0x373fffff] page 4M [ 0.000000] [mem 0x37400000-0x377fdfff] page 4k [ 0.000000] BRK [0x0207a000, 0x0207afff] PGTABLE [ 0.000000] RAMDISK: [mem 0x3610e000-0x3707efff] [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000000FAC60 000024 (v02 ACPIAM) [ 0.000000] ACPI: XSDT 0x000000003FFB0100 00003C (v01 A M I OEMXSDT 12000506 MSFT 00000097) [ 0.000000] ACPI: FACP 0x000000003FFB0290 0000F4 (v03 A M I OEMFACP 12000506 MSFT 00000097) [ 0.000000] ACPI: DSDT 0x000000003FFB03F0 0046F0 (v01 A0347 A0347001 00000001 INTL 02002026) [ 0.000000] ACPI: FACS 0x000000003FFBE000 000040 [ 0.000000] ACPI: FACS 0x000000003FFBE000 000040 [ 0.000000] ACPI: APIC 0x000000003FFB0390 00005C (v01 A M I OEMAPIC 12000506 MSFT 00000097) [ 0.000000] ACPI: OEMB 0x000000003FFBE040 000046 (v01 A M I AMI_OEM 12000506 MSFT 00000097) [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] 135MB HIGHMEM available. [ 0.000000] 887MB LOWMEM available. [ 0.000000] mapped low ram: 0 - 377fe000 [ 0.000000] low ram: 0 - 377fe000 [ 0.000000] BRK [0x0207b000, 0x0207bfff] PGTABLE [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.000000] Normal [mem 0x0000000001000000-0x00000000377fdfff] [ 0.000000] HighMem [mem 0x00000000377fe000-0x000000003ffaffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff] [ 0.000000] node 0: [mem 0x0000000000100000-0x000000003ffaffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000003ffaffff] [ 0.000000] On node 0 totalpages: 261966 [ 0.000000] DMA zone: 36 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 3998 pages, LIFO batch:0 [ 0.000000] Normal zone: 1962 pages used for memmap [ 0.000000] Normal zone: 223230 pages, LIFO batch:31 [ 0.000000] HighMem zone: 34738 pages, LIFO batch:7 [ 0.000000] Using APIC driver default [ 0.000000] ACPI: PM-Timer IO Port: 0x808 [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] IOAPIC[0]: apic_id 1, version 3, address 0xfec00000, GSI 0-23 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) [ 0.000000] ACPI: IRQ0 used by override. [ 0.000000] ACPI: IRQ9 used by override. [ 0.000000] Using ACPI (MADT) for SMP configuration information [ 0.000000] smpboot: Allowing 2 CPUs, 1 hotplug CPUs [ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff] [ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff] [ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000dffff] [ 0.000000] PM: Registered nosave memory: [mem 0x000e0000-0x000fffff] [ 0.000000] e820: [mem 0x40000000-0xdfffffff] available for PCI devices [ 0.000000] Booting paravirtualized kernel on bare hardware [ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns [ 0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1 [ 0.000000] PERCPU: Embedded 18 pages/cpu @f5eea000 s41192 r0 d32536 u73728 [ 0.000000] pcpu-alloc: s41192 r0 d32536 u73728 alloc=18*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 259968 [ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-4.3.0-rc2+ root=UUID=96c96a61-8615-4715-86d0-09cb8c62638c ro [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Initializing CPU#0 [ 0.000000] Initializing HighMem for node 0 (000377fe:0003ffb0) [ 0.000000] Initializing Movable for node 0 (00000000:00000000) [ 0.000000] Memory: 1004448K/1047864K available (5501K kernel code, 547K rwdata, 2084K rodata, 516K init, 8152K bss, 43416K reserved, 0K cma-reserved, 138952K highmem) [ 0.000000] virtual kernel memory layout: fixmap : 0xfff16000 - 0xfffff000 ( 932 kB) pkmap : 0xff800000 - 0xffc00000 (4096 kB) vmalloc : 0xf7ffe000 - 0xff7fe000 ( 120 MB) lowmem : 0xc0000000 - 0xf77fe000 ( 887 MB) .init : 0xc17f4000 - 0xc1875000 ( 516 kB) .data : 0xc155f8ba - 0xc17f2f40 (2637 kB) .text : 0xc1000000 - 0xc155f8ba (5502 kB) [ 0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok. [ 0.000000] Running RCU self tests [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU lockdep checking is enabled. [ 0.000000] Build-time adjustment of leaf fanout to 32. [ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2 [ 0.000000] NR_IRQS:2304 nr_irqs:440 16 [ 0.000000] CPU 0 irqstacks, hard=f5816000 soft=f5818000 [ 0.000000] spurious 8259A interrupt: IRQ7. [ 0.000000] Console: colour VGA+ 80x25 [ 0.000000] console [tty0] enabled [ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 0.000000] ... MAX_LOCK_DEPTH: 48 [ 0.000000] ... MAX_LOCKDEP_KEYS: 8191 [ 0.000000] ... CLASSHASH_SIZE: 4096 [ 0.000000] ... MAX_LOCKDEP_ENTRIES: 32768 [ 0.000000] ... MAX_LOCKDEP_CHAINS: 65536 [ 0.000000] ... CHAINHASH_SIZE: 32768 [ 0.000000] memory used by lock dependency info: 4911 kB [ 0.000000] per task-struct memory footprint: 1344 bytes [ 0.000000] ------------------------ [ 0.000000] | Locking API testsuite: [ 0.000000] ---------------------------------------------------------------------------- [ 0.000000] | spin |wlock |rlock |mutex | wsem | rsem | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] A-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-B-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-B-C-C-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-C-A-B-C deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-B-C-C-D-D-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-C-D-B-D-D-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-C-D-B-C-D-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] double unlock: ok | ok | ok | ok | ok | ok | [ 0.000000] initialize held: ok | ok | ok | ok | ok | ok | [ 0.000000] bad unlock order: ok | ok | ok | ok | ok | ok | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] recursive read-lock: | ok | | ok | [ 0.000000] recursive read-lock #2: | ok | | ok | [ 0.000000] mixed read-write-lock: | ok | | ok | [ 0.000000] mixed write-read-lock: | ok | | ok | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] hard-irqs-on + irq-safe-A/12: ok | ok | ok | [ 0.000000] soft-irqs-on + irq-safe-A/12: ok | ok | ok | [ 0.000000] hard-irqs-on + irq-safe-A/21: ok | ok | ok | [ 0.000000] soft-irqs-on + irq-safe-A/21: ok | ok | ok | [ 0.000000] sirq-safe-A => hirqs-on/12: ok | ok | ok | [ 0.000000] sirq-safe-A => hirqs-on/21: ok | ok | ok | [ 0.000000] hard-safe-A + irqs-on/12: ok | ok | ok | [ 0.000000] soft-safe-A + irqs-on/12: ok | ok | ok | [ 0.000000] hard-safe-A + irqs-on/21: ok | ok | ok | [ 0.000000] soft-safe-A + irqs-on/21: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/123: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/123: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/132: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/132: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/213: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/213: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/231: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/231: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/312: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/312: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/321: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/321: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/123: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/123: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/132: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/132: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/213: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/213: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/231: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/231: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/312: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/312: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/321: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/321: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/123: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/123: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/132: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/132: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/213: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/213: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/231: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/231: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/312: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/312: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/321: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/321: ok | ok | ok | [ 0.000000] hard-irq read-recursion/123: ok | [ 0.000000] soft-irq read-recursion/123: ok | [ 0.000000] hard-irq read-recursion/132: ok | [ 0.000000] soft-irq read-recursion/132: ok | [ 0.000000] hard-irq read-recursion/213: ok | [ 0.000000] soft-irq read-recursion/213: ok | [ 0.000000] hard-irq read-recursion/231: ok | [ 0.000000] soft-irq read-recursion/231: ok | [ 0.000000] hard-irq read-recursion/312: ok | [ 0.000000] soft-irq read-recursion/312: ok | [ 0.000000] hard-irq read-recursion/321: ok | [ 0.000000] soft-irq read-recursion/321: ok | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] | Wound/wait tests | [ 0.000000] --------------------- [ 0.000000] ww api failures: ok | ok | ok | [ 0.000000] ww contexts mixing: ok | ok | [ 0.000000] finishing ww context: ok | ok | ok | ok | [ 0.000000] locking mismatches: ok | ok | ok | [ 0.000000] EDEADLK handling: ok | ok | ok | ok | ok | ok | ok | ok | ok | ok | [ 0.000000] spinlock nest unlocked: ok | [ 0.000000] ----------------------------------------------------- [ 0.000000] |block | try |context| [ 0.000000] ----------------------------------------------------- [ 0.000000] context: ok | ok | ok | [ 0.000000] try: ok | ok | ok | [ 0.000000] block: ok | ok | ok | [ 0.000000] spinlock: ok | ok | ok | [ 0.000000] ------------------------------------------------------- [ 0.000000] Good, all 253 testcases passed! | [ 0.000000] --------------------------------- [ 0.000000] tsc: Fast TSC calibration using PIT [ 0.000000] tsc: Detected 2000.130 MHz processor [ 0.000000] tsc: Marking TSC unstable due to TSCs unsynchronized [ 0.008120] Calibrating delay loop (skipped), value calculated using timer frequency.. 4000.26 BogoMIPS (lpj=8000520) [ 0.008236] pid_max: default: 32768 minimum: 301 [ 0.008346] ACPI: Core revision 20150818 [ 0.018912] ACPI: 1 ACPI AML tables successfully acquired and loaded [ 0.019139] Security Framework initialized [ 0.019196] Yama: becoming mindful. [ 0.019280] AppArmor: AppArmor disabled by boot time parameter [ 0.019377] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.019438] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.020642] Initializing cgroup subsys io [ 0.020733] Initializing cgroup subsys memory [ 0.020813] Initializing cgroup subsys devices [ 0.020896] Initializing cgroup subsys freezer [ 0.020999] Initializing cgroup subsys net_cls [ 0.021061] Initializing cgroup subsys perf_event [ 0.021123] Initializing cgroup subsys net_prio [ 0.021218] mce: CPU supports 5 MCE banks [ 0.021304] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 4 [ 0.021363] Last level dTLB entries: 4KB 512, 2MB 8, 4MB 4, 1GB 0 [ 0.027172] Enabling APIC mode: Flat. Using 1 I/O APICs [ 0.027800] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0 [ 0.068000] smpboot: CPU0: AMD Athlon(tm) 64 Processor 3200+ (family: 0xf, model: 0x2f, stepping: 0x2) [ 0.068000] Performance Events: AMD PMU driver. [ 0.068000] ... version: 0 [ 0.068000] ... bit width: 48 [ 0.068000] ... generic registers: 4 [ 0.068000] ... value mask: 0000ffffffffffff [ 0.068000] ... max period: 00007fffffffffff [ 0.068000] ... fixed-purpose events: 0 [ 0.068000] ... event mask: 000000000000000f [ 0.088063] x86: Booted up 1 node, 1 CPUs [ 0.088124] smpboot: Total of 1 processors activated (4000.26 BogoMIPS) [ 0.089057] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. [ 0.089866] devtmpfs: initialized [ 0.096146] PM: Registering ACPI NVS region [mem 0x3ffbe000-0x3ffdffff] (139264 bytes) [ 0.096499] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.100122] pinctrl core: initialized pinctrl subsystem [ 0.101058] NET: Registered protocol family 16 [ 0.112043] cpuidle: using governor ladder [ 0.124018] cpuidle: using governor menu [ 0.124082] node 0 link 0: io port [1000, ffffff] [ 0.124086] TOM: 0000000040000000 aka 1024M [ 0.124145] node 0 link 0: mmio [a0000, bffff] [ 0.124150] node 0 link 0: mmio [40000000, ffffffff] [ 0.124154] bus: [bus 00-ff] on node 0 link 0 [ 0.124156] bus: 00 [io 0x0000-0xffff] [ 0.124159] bus: 00 [mem 0x000a0000-0x000bffff] [ 0.124161] bus: 00 [mem 0x40000000-0xffffffff] [ 0.124267] ACPI: bus type PCI registered [ 0.124325] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 [ 0.125238] PCI: PCI BIOS revision 3.00 entry at 0xf0031, last bus=5 [ 0.125297] PCI: Using configuration type 1 for base access [ 0.160175] ACPI: Added _OSI(Module Device) [ 0.160236] ACPI: Added _OSI(Processor Device) [ 0.160293] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.160351] ACPI: Added _OSI(Processor Aggregator Device) [ 0.169850] ACPI: Executed 1 blocks of module-level executable AML code [ 0.176466] ACPI: Interpreter enabled [ 0.176545] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20150818/hwxface-580) [ 0.176702] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S3_] (20150818/hwxface-580) [ 0.176906] ACPI: (supports S0 S1 S4 S5) [ 0.176962] ACPI: Using IOAPIC for interrupt routing [ 0.177109] PCI: Ignoring host bridge windows from ACPI; if necessary, use "pci=use_crs" and report a bug [ 0.203606] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) [ 0.203677] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI] [ 0.203819] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM [ 0.204087] acpi PNP0A03:00: host bridge window [io 0x0000-0x0cf7 window] (ignored) [ 0.204090] acpi PNP0A03:00: host bridge window [io 0x0d00-0xffff window] (ignored) [ 0.204094] acpi PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff window] (ignored) [ 0.204097] acpi PNP0A03:00: host bridge window [mem 0x000c0000-0x000dffff window] (ignored) [ 0.204100] acpi PNP0A03:00: host bridge window [mem 0x40000000-0xffffffff window] (ignored) [ 0.204104] PCI: root bus 00: hardware-probed resources [ 0.204154] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. [ 0.205348] PCI host bridge to bus 0000:00 [ 0.205407] pci_bus 0000:00: root bus resource [bus 00-ff] [ 0.205467] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] [ 0.205527] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff] [ 0.205588] pci_bus 0000:00: root bus resource [mem 0x40000000-0xffffffff] [ 0.205739] pci 0000:00:00.0: [1106:0204] type 00 class 0x060000 [ 0.205773] pci 0000:00:00.0: reg 0x10: [mem 0xd0000000-0xdfffffff pref] [ 0.206430] pci 0000:00:00.1: [1106:1204] type 00 class 0x060000 [ 0.206827] pci 0000:00:00.2: [1106:2204] type 00 class 0x060000 [ 0.207206] pci 0000:00:00.3: [1106:3204] type 00 class 0x060000 [ 0.207604] pci 0000:00:00.4: [1106:4204] type 00 class 0x060000 [ 0.207983] pci 0000:00:00.7: [1106:7204] type 00 class 0x060000 [ 0.208378] pci 0000:00:01.0: [1106:b188] type 01 class 0x060400 [ 0.208450] pci 0000:00:01.0: supports D1 [ 0.208793] pci 0000:00:0f.0: [1106:0571] type 00 class 0x01018a [ 0.208864] pci 0000:00:0f.0: reg 0x20: [io 0xfc00-0xfc0f] [ 0.208893] pci 0000:00:0f.0: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7] [ 0.208954] pci 0000:00:0f.0: legacy IDE quirk: reg 0x14: [io 0x03f6] [ 0.209015] pci 0000:00:0f.0: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177] [ 0.209076] pci 0000:00:0f.0: legacy IDE quirk: reg 0x1c: [io 0x0376] [ 0.209455] pci 0000:00:10.0: [1106:3038] type 00 class 0x0c0300 [ 0.209528] pci 0000:00:10.0: reg 0x20: [io 0xec00-0xec1f] [ 0.209581] pci 0000:00:10.0: supports D1 D2 [ 0.209584] pci 0000:00:10.0: PME# supported from D0 D1 D2 D3hot D3cold [ 0.209853] pci 0000:00:10.0: System wakeup disabled by ACPI [ 0.210100] pci 0000:00:10.1: [1106:3038] type 00 class 0x0c0300 [ 0.210172] pci 0000:00:10.1: reg 0x20: [io 0xe880-0xe89f] [ 0.210225] pci 0000:00:10.1: supports D1 D2 [ 0.210228] pci 0000:00:10.1: PME# supported from D0 D1 D2 D3hot D3cold [ 0.210407] pci 0000:00:10.1: System wakeup disabled by ACPI [ 0.210657] pci 0000:00:10.2: [1106:3038] type 00 class 0x0c0300 [ 0.210729] pci 0000:00:10.2: reg 0x20: [io 0xe800-0xe81f] [ 0.210782] pci 0000:00:10.2: supports D1 D2 [ 0.210785] pci 0000:00:10.2: PME# supported from D0 D1 D2 D3hot D3cold [ 0.210966] pci 0000:00:10.2: System wakeup disabled by ACPI [ 0.211212] pci 0000:00:10.3: [1106:3038] type 00 class 0x0c0300 [ 0.211284] pci 0000:00:10.3: reg 0x20: [io 0xe480-0xe49f] [ 0.211337] pci 0000:00:10.3: supports D1 D2 [ 0.211340] pci 0000:00:10.3: PME# supported from D0 D1 D2 D3hot D3cold [ 0.211520] pci 0000:00:10.3: System wakeup disabled by ACPI [ 0.211770] pci 0000:00:10.4: [1106:3104] type 00 class 0x0c0320 [ 0.211806] pci 0000:00:10.4: reg 0x10: [mem 0xff6ffc00-0xff6ffcff] [ 0.211902] pci 0000:00:10.4: supports D1 D2 [ 0.211906] pci 0000:00:10.4: PME# supported from D0 D1 D2 D3hot D3cold [ 0.212099] pci 0000:00:10.4: System wakeup disabled by ACPI [ 0.212354] pci 0000:00:11.0: [1106:3287] type 00 class 0x060100 [ 0.212804] pci 0000:00:11.7: [1106:287e] type 00 class 0x060000 [ 0.213193] pci 0000:00:12.0: [1106:3065] type 00 class 0x020000 [ 0.213224] pci 0000:00:12.0: reg 0x10: [io 0xe000-0xe0ff] [ 0.213238] pci 0000:00:12.0: reg 0x14: [mem 0xff6ff800-0xff6ff8ff] [ 0.213322] pci 0000:00:12.0: supports D1 D2 [ 0.213325] pci 0000:00:12.0: PME# supported from D0 D1 D2 D3hot D3cold [ 0.213506] pci 0000:00:12.0: System wakeup disabled by ACPI [ 0.213751] pci 0000:00:13.0: [1106:287b] type 01 class 0x060400 [ 0.214109] pci 0000:00:13.1: [1106:287a] type 01 class 0x060400 [ 0.214329] pci 0000:00:13.1: System wakeup disabled by ACPI [ 0.214593] pci 0000:00:18.0: [1022:1100] type 00 class 0x060000 [ 0.214924] pci 0000:00:18.1: [1022:1101] type 00 class 0x060000 [ 0.215249] pci 0000:00:18.2: [1022:1102] type 00 class 0x060000 [ 0.215574] pci 0000:00:18.3: [1022:1103] type 00 class 0x060000 [ 0.216030] pci 0000:00:01.0: PCI bridge to [bus 01] [ 0.216092] pci 0000:00:01.0: bridge window [io 0xa000-0xcfff] [ 0.216098] pci 0000:00:01.0: bridge window [mem 0xff400000-0xff4fffff] [ 0.216104] pci 0000:00:01.0: bridge window [mem 0x7ff00000-0xbfefffff pref] [ 0.216123] pci 0000:01:00.0: [1002:4153] type 00 class 0x030000 [ 0.216152] pci 0000:01:00.0: reg 0x10: [mem 0xa0000000-0xafffffff pref] [ 0.216163] pci 0000:01:00.0: reg 0x14: [io 0xc000-0xc0ff] [ 0.216175] pci 0000:01:00.0: reg 0x18: [mem 0xff4f0000-0xff4fffff] [ 0.216211] pci 0000:01:00.0: reg 0x30: [mem 0xff4c0000-0xff4dffff pref] [ 0.216250] pci 0000:01:00.0: supports D1 D2 [ 0.216415] pci 0000:01:00.1: [1002:4173] type 00 class 0x038000 [ 0.216439] pci 0000:01:00.1: reg 0x10: [mem 0x90000000-0x9fffffff pref] [ 0.216451] pci 0000:01:00.1: reg 0x14: [mem 0xff4e0000-0xff4effff] [ 0.216526] pci 0000:01:00.1: supports D1 D2 [ 0.216896] pci 0000:00:13.0: PCI bridge to [bus 02-04] [ 0.216980] pci 0000:02:00.0: [1106:287c] type 01 class 0x060400 [ 0.217062] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold [ 0.217130] pci 0000:02:00.0: System wakeup disabled by ACPI [ 0.217376] pci 0000:02:00.1: [1106:287d] type 01 class 0x060400 [ 0.217457] pci 0000:02:00.1: PME# supported from D0 D3hot D3cold [ 0.217700] pci 0000:02:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force' [ 0.217956] pci 0000:02:00.0: PCI bridge to [bus 03] [ 0.218156] pci 0000:02:00.1: PCI bridge to [bus 04] [ 0.218347] pci 0000:00:13.1: PCI bridge to [bus 05] [ 0.218408] pci 0000:00:13.1: bridge window [io 0xd000-0xdfff] [ 0.218414] pci 0000:00:13.1: bridge window [mem 0xff500000-0xff5fffff] [ 0.218457] pci 0000:05:0b.0: [1102:0004] type 00 class 0x040100 [ 0.218488] pci 0000:05:0b.0: reg 0x10: [io 0xd800-0xd83f] [ 0.218586] pci 0000:05:0b.0: supports D1 D2 [ 0.218750] pci 0000:05:0b.1: [1102:7003] type 00 class 0x098000 [ 0.218780] pci 0000:05:0b.1: reg 0x10: [io 0xdc00-0xdc07] [ 0.218879] pci 0000:05:0b.1: supports D1 D2 [ 0.219042] pci 0000:05:0b.2: [1102:4001] type 00 class 0x0c0010 [ 0.219074] pci 0000:05:0b.2: reg 0x10: [mem 0xff5ef800-0xff5effff] [ 0.219088] pci 0000:05:0b.2: reg 0x14: [mem 0xff5e8000-0xff5ebfff] [ 0.219179] pci 0000:05:0b.2: supports D1 D2 [ 0.219182] pci 0000:05:0b.2: PME# supported from D0 D1 D2 D3hot [ 0.219389] pci 0000:05:0c.0: [1044:a400] type 00 class 0x010000 [ 0.219411] pci 0000:05:0c.0: reg 0x10: [io 0xd880-0xd89f] [ 0.219477] pci 0000:05:0c.0: reg 0x30: [mem 0xff5f0000-0xff5f7fff pref] [ 0.219704] pci_bus 0000:00: on NUMA node 0 [ 0.222482] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15) [ 0.223220] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15) [ 0.223939] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 10 11 12 14 15) [ 0.224635] ACPI: PCI Interrupt Link [LNKD] (IRQs *3 4 5 6 7 10 11 12 14 15) [ 0.225355] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled. [ 0.226166] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled. [ 0.226989] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled. [ 0.227805] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled. [ 0.229417] vgaarb: setting as boot device: PCI:0000:01:00.0 [ 0.229477] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none [ 0.229553] vgaarb: loaded [ 0.229608] vgaarb: bridge control possible 0000:01:00.0 [ 0.232047] PCI: Using ACPI for IRQ routing [ 0.232109] PCI: pci_cache_line_size set to 64 bytes [ 0.232219] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff] [ 0.232232] e820: reserve RAM buffer [mem 0x3ffb0000-0x3fffffff] [ 0.233404] clocksource: Switched to clocksource refined-jiffies [ 0.253390] pnp: PnP ACPI init [ 0.253800] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) [ 0.255100] pnp 00:01: [dma 3] [ 0.255449] pnp 00:01: Plug and Play ACPI device, IDs PNP0401 (active) [ 0.255802] system 00:02: [io 0x0290-0x0297] has been reserved [ 0.255927] system 00:02: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.256394] system 00:03: [io 0x03e0-0x03e7] has been reserved [ 0.256457] system 00:03: [io 0x04d0-0x04d1] has been reserved [ 0.256518] system 00:03: [io 0x0800-0x087f] has been reserved [ 0.256579] system 00:03: [io 0x0400-0x041f] has been reserved [ 0.256640] system 00:03: [mem 0xff780000-0xffffffff] has been reserved [ 0.256702] system 00:03: [mem 0xf0000000-0xf7ffffff] has been reserved [ 0.256768] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.257069] system 00:04: [mem 0xfec00000-0xfec00fff] could not be reserved [ 0.257132] system 00:04: [mem 0xfee00000-0xfee00fff] has been reserved [ 0.257197] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.257394] pnp 00:05: Plug and Play ACPI device, IDs PNP0303 PNP030b (active) [ 0.257638] pnp 00:06: Plug and Play ACPI device, IDs PNP0f03 PNP0f13 (active) [ 0.258280] pnp 00:07: [dma 0 disabled] [ 0.258463] pnp 00:07: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.258689] system 00:08: [mem 0xe0000000-0xefffffff] has been reserved [ 0.258755] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.259438] system 00:09: [mem 0x00000000-0x0009ffff] could not be reserved [ 0.259502] system 00:09: [mem 0x000e0000-0x000fffff] could not be reserved [ 0.259565] system 00:09: [mem 0x00100000-0x3fffffff] could not be reserved [ 0.259631] system 00:09: Plug and Play ACPI device, IDs PNP0c01 (active) [ 0.259986] pnp: PnP ACPI: found 10 devices [ 0.302831] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 0.302932] clocksource: Switched to clocksource acpi_pm [ 0.303032] pci 0000:00:01.0: PCI bridge to [bus 01] [ 0.303093] pci 0000:00:01.0: bridge window [io 0xa000-0xcfff] [ 0.303157] pci 0000:00:01.0: bridge window [mem 0xff400000-0xff4fffff] [ 0.303157] pci 0000:00:01.0: bridge window [mem 0x7ff00000-0xbfefffff pref] [ 0.303157] pci 0000:02:00.0: PCI bridge to [bus 03] [ 0.303157] pci 0000:02:00.1: PCI bridge to [bus 04] [ 0.303157] pci 0000:00:13.0: PCI bridge to [bus 02-04] [ 0.303157] pci 0000:00:13.1: PCI bridge to [bus 05] [ 0.303157] pci 0000:00:13.1: bridge window [io 0xd000-0xdfff] [ 0.303157] pci 0000:00:13.1: bridge window [mem 0xff500000-0xff5fffff] [ 0.303157] pci_bus 0000:00: resource 4 [io 0x0000-0xffff] [ 0.303157] pci_bus 0000:00: resource 5 [mem 0x000a0000-0x000bffff] [ 0.303157] pci_bus 0000:00: resource 6 [mem 0x40000000-0xffffffff] [ 0.303157] pci_bus 0000:01: resource 0 [io 0xa000-0xcfff] [ 0.303157] pci_bus 0000:01: resource 1 [mem 0xff400000-0xff4fffff] [ 0.303157] pci_bus 0000:01: resource 2 [mem 0x7ff00000-0xbfefffff pref] [ 0.303157] pci_bus 0000:05: resource 0 [io 0xd000-0xdfff] [ 0.303157] pci_bus 0000:05: resource 1 [mem 0xff500000-0xff5fffff] [ 0.303157] NET: Registered protocol family 2 [ 0.303157] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.303157] TCP bind hash table entries: 8192 (order: 6, 294912 bytes) [ 0.303544] TCP: Hash tables configured (established 8192 bind 8192) [ 0.303713] UDP hash table entries: 512 (order: 3, 40960 bytes) [ 0.303851] UDP-Lite hash table entries: 512 (order: 3, 40960 bytes) [ 0.304252] NET: Registered protocol family 1 [ 0.304344] pci 0000:00:00.0: MSI quirk detected; MSI disabled [ 0.304428] pci 0000:00:01.0: disabling DAC on VIA PCI bridge [ 0.304662] pci 0000:01:00.0: Video device with shadowed ROM [ 0.304689] PCI: CLS 64 bytes, default 64 [ 0.305054] Unpacking initramfs... [ 0.812170] Freeing initrd memory: 15812K (f610e000 - f707f000) [ 0.812370] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1cd4a912114, max_idle_ns: 440795301067 ns [ 0.812510] microcode: AMD CPU family 0xf not supported [ 0.813726] futex hash table entries: 512 (order: 3, 32768 bytes) [ 0.813876] audit: initializing netlink subsys (disabled) [ 0.814034] audit: type=2000 audit(1442963804.811:1): initialized [ 0.815024] HugeTLB registered 4 MB page size, pre-allocated 0 pages [ 0.815505] VFS: Disk quotas dquot_6.6.0 [ 0.815597] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.818287] bounce: pool size: 64 pages [ 0.818379] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) [ 0.822642] io scheduler noop registered [ 0.822701] io scheduler deadline registered [ 0.822784] io scheduler cfq registered (default) [ 0.823427] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 0.823512] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 [ 0.823705] GHES: HEST is not enabled! [ 0.823924] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.844864] 00:07: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 0.846753] Linux agpgart interface v0.103 [ 0.846848] agpgart-amd64 0000:00:00.0: AGP bridge [1106/0204] [ 0.853985] agpgart-amd64 0000:00:00.0: AGP aperture is 256M @ 0xd0000000 [ 0.854905] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12 [ 0.855658] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 0.856221] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 0.856858] mousedev: PS/2 mouse device common for all mice [ 0.857350] rtc_cmos 00:00: RTC can wake from S4 [ 0.857907] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0 [ 0.858008] rtc_cmos 00:00: alarms up to one year, y3k, 114 bytes nvram [ 0.858378] NET: Registered protocol family 10 [ 0.863397] mip6: Mobile IPv6 [ 0.863482] NET: Registered protocol family 17 [ 0.863549] mpls_gso: MPLS GSO support [ 0.864117] Using IPI No-Shortcut mode [ 0.864746] registered taskstats version 1 [ 0.874368] rtc_cmos 00:00: setting system clock to 2015-09-22 23:16:45 UTC (1442963805) [ 0.874712] PM: Hibernation image not present or could not be loaded. [ 0.875636] Freeing unused kernel memory: 516K (c17f4000 - c1875000) [ 0.875823] Write protecting the kernel text: 5504k [ 0.876126] Write protecting the kernel read-only data: 2088k [ 0.879663] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0 [ 0.970990] random: udevadm urandom read with 0 bits of entropy available [ 1.118871] SCSI subsystem initialized [ 1.133201] ACPI: bus type USB registered [ 1.133373] usbcore: registered new interface driver usbfs [ 1.133523] usbcore: registered new interface driver hub [ 1.137101] via_rhine: v1.10-LK1.5.1 2010-10-09 Written by Donald Becker [ 1.138651] via-rhine 0000:00:12.0 eth0: VIA Rhine II at 0x1e000, 00:13:d4:cc:9b:57, IRQ 23 [ 1.139496] via-rhine 0000:00:12.0 eth0: MII PHY found at address 1, status 0x786d advertising 01e1 Link 45e1 [ 1.139718] usbcore: registered new device driver usb [ 1.141152] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.141876] uhci_hcd: USB Universal Host Controller Interface driver [ 1.142942] ehci-pci: EHCI PCI platform driver [ 1.146234] uhci_hcd 0000:00:10.0: UHCI Host Controller [ 1.146657] uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 1 [ 1.146834] uhci_hcd 0000:00:10.0: detected 2 ports [ 1.147009] uhci_hcd 0000:00:10.0: irq 20, io base 0x0000ec00 [ 1.149999] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.150065] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.150136] usb usb1: Product: UHCI Host Controller [ 1.150194] usb usb1: Manufacturer: Linux 4.3.0-rc2+ uhci_hcd [ 1.150253] usb usb1: SerialNumber: 0000:00:10.0 [ 1.155960] libata version 3.00 loaded. [ 1.159807] hub 1-0:1.0: USB hub found [ 1.161349] hub 1-0:1.0: 2 ports detected [ 1.162515] EATA0: IRQ 10 mapped to IO-APIC IRQ 17. [ 1.162666] EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio. [ 1.162726] EATA config options -> tm:1, lc:y, mq:16, rs:y, et:n, ip:n, ep:n, pp:y. [ 1.162796] EATA0: 2.0C, PCI 0xd890, IRQ 17, BMST, SG 122, MB 64. [ 1.162855] EATA0: wide SCSI support enabled, max_id 16, max_lun 8. [ 1.162913] EATA0: SCSI channel 0 enabled, host target ID 7. [ 1.162978] scsi host0: EATA/DMA 2.0x rev. 8.10.00 [ 1.177205] ehci-pci 0000:00:10.4: EHCI Host Controller [ 1.177320] ehci-pci 0000:00:10.4: new USB bus registered, assigned bus number 2 [ 1.177417] ehci-pci 0000:00:10.4: debug port 1 [ 1.177602] ehci-pci 0000:00:10.4: irq 22, io mem 0xff6ffc00 [ 1.188144] ehci-pci 0000:00:10.4: USB 2.0 started, EHCI 1.00 [ 1.188541] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 [ 1.188602] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.188673] usb usb2: Product: EHCI Host Controller [ 1.188731] usb usb2: Manufacturer: Linux 4.3.0-rc2+ ehci_hcd [ 1.188790] usb usb2: SerialNumber: 0000:00:10.4 [ 1.189794] hub 2-0:1.0: USB hub found [ 1.189912] hub 2-0:1.0: 8 ports detected [ 1.212407] hub 1-0:1.0: USB hub found [ 1.212537] hub 1-0:1.0: 2 ports detected [ 1.213316] pata_via 0000:00:0f.0: version 0.3.4 [ 1.221891] scsi host1: pata_via [ 1.228074] scsi host2: pata_via [ 1.228393] ata1: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xfc00 irq 14 [ 1.228454] ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xfc08 irq 15 [ 1.229384] uhci_hcd 0000:00:10.1: UHCI Host Controller [ 1.229461] uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3 [ 1.229542] uhci_hcd 0000:00:10.1: detected 2 ports [ 1.229625] uhci_hcd 0000:00:10.1: irq 22, io base 0x0000e880 [ 1.229863] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.229925] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.229995] usb usb3: Product: UHCI Host Controller [ 1.230053] usb usb3: Manufacturer: Linux 4.3.0-rc2+ uhci_hcd [ 1.230112] usb usb3: SerialNumber: 0000:00:10.1 [ 1.231134] hub 3-0:1.0: USB hub found [ 1.231242] hub 3-0:1.0: 2 ports detected [ 1.232712] firewire_ohci 0000:05:0b.2: added OHCI v1.10 device as card 0, 4 IR + 8 IT contexts, quirks 0x2 [ 1.233084] uhci_hcd 0000:00:10.2: UHCI Host Controller [ 1.233160] uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4 [ 1.233241] uhci_hcd 0000:00:10.2: detected 2 ports [ 1.233347] uhci_hcd 0000:00:10.2: irq 21, io base 0x0000e800 [ 1.233581] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.233642] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.233713] usb usb4: Product: UHCI Host Controller [ 1.233770] usb usb4: Manufacturer: Linux 4.3.0-rc2+ uhci_hcd [ 1.233829] usb usb4: SerialNumber: 0000:00:10.2 [ 1.237077] hub 4-0:1.0: USB hub found [ 1.238396] hub 4-0:1.0: 2 ports detected [ 1.241434] uhci_hcd 0000:00:10.3: UHCI Host Controller [ 1.241514] uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 5 [ 1.241594] uhci_hcd 0000:00:10.3: detected 2 ports [ 1.241702] uhci_hcd 0000:00:10.3: irq 23, io base 0x0000e480 [ 1.246109] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.246175] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.246246] usb usb5: Product: UHCI Host Controller [ 1.246303] usb usb5: Manufacturer: Linux 4.3.0-rc2+ uhci_hcd [ 1.246362] usb usb5: SerialNumber: 0000:00:10.3 [ 1.248570] hub 5-0:1.0: USB hub found [ 1.249654] hub 5-0:1.0: 2 ports detected [ 1.408734] ata1.00: ATA-8: WDC WD3200AAJB-00WGA0, 00.02C01, max UDMA/100 [ 1.408801] ata1.00: 625142448 sectors, multi 16: LBA48 [ 1.417116] ata1.00: configured for UDMA/100 [ 1.500044] usb 2-5: new high-speed USB device number 2 using ehci-pci [ 1.642255] usb 2-5: New USB device found, idVendor=13fe, idProduct=1e23 [ 1.642318] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1.642379] usb 2-5: Product: STORE N GO [ 1.642437] usb 2-5: Manufacturer: Verbatim [ 1.642494] usb 2-5: SerialNumber: 078A18B40293 [ 1.659306] uas: Unknown symbol usb_stor_adjust_quirks (err 0) [ 1.659422] uas: Unknown symbol usb_stor_sense_invalidCDB (err 0) [ 1.733046] firewire_core 0000:05:0b.2: created device fw0: GUID 00023c0153000612, S400 [ 2.725779] scsi 0:0:6:0: Direct-Access IBM DCAS-34330W S65A PQ: 0 ANSI: 2 [ 2.725858] scsi 0:0:6:0: cmds/lun 16, sorted, simple tags. [ 4.152403] floppy0: no floppy controllers found [ 4.799982] sd 0:0:6:0: [sda] 8466688 512-byte logical blocks: (4.33 GB/4.03 GiB) [ 4.802387] scsi 1:0:0:0: Direct-Access ATA WDC WD3200AAJB-0 2C01 PQ: 0 ANSI: 5 [ 4.803248] sd 1:0:0:0: [sdb] 625142448 512-byte logical blocks: (320 GB/298 GiB) [ 4.803486] sd 1:0:0:0: [sdb] Write Protect is off [ 4.803545] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00 [ 4.803616] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 4.833762] sd 0:0:6:0: [sda] Write Protect is off [ 4.833826] sd 0:0:6:0: [sda] Mode Sense: b3 00 00 08 [ 4.849667] sdb: sdb1 sdb2 < sdb5 sdb6 sdb7 > [ 4.853078] sd 1:0:0:0: [sdb] Attached SCSI disk [ 4.854776] sd 0:0:6:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 4.924903] sda: sda1 sda2 < sda5 > [ 4.976407] ata2.00: ATAPI: HL-DT-ST DVDRAM GSA-4163B, A103, max UDMA/33 [ 4.976846] ata2.01: HPA detected: current 66055248, native 78242976 [ 4.976907] ata2.01: ATA-6: SAMSUNG SP4002H, QU100-57, max UDMA/100 [ 4.976967] ata2.01: 66055248 sectors, multi 16: LBA [ 4.977030] ata2.01: limited to UDMA/33 due to 40-wire cable [ 4.992226] ata2.00: configured for UDMA/33 [ 4.993070] sd 0:0:6:0: [sda] Attached SCSI disk [ 5.008664] ata2.01: configured for UDMA/33 [ 5.019036] scsi 2:0:0:0: CD-ROM HL-DT-ST DVDRAM GSA-4163B A103 PQ: 0 ANSI: 5 [ 5.035702] scsi 2:0:1:0: Direct-Access ATA SAMSUNG SP4002H 0-57 PQ: 0 ANSI: 5 [ 5.037095] sd 2:0:1:0: [sdc] 66055248 512-byte logical blocks: (33.8 GB/31.4 GiB) [ 5.037331] sd 2:0:1:0: [sdc] Write Protect is off [ 5.037391] sd 2:0:1:0: [sdc] Mode Sense: 00 3a 00 00 [ 5.037461] sd 2:0:1:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 5.069331] sdc: sdc1 sdc2 < sdc5 sdc6 sdc7 > sdc3 [ 5.069794] sdc: p3 size 13333950 extends beyond EOD, enabling native capacity [ 5.070043] ata2: soft resetting link [ 5.240359] ata2.01: n_sectors mismatch 66055248 != 78242976 [ 5.240421] ata2.01: new n_sectors matches native, probably late HPA unlock, n_sectors updated [ 5.264233] ata2.00: configured for UDMA/33 [ 5.280636] ata2.01: configured for UDMA/33 [ 5.282848] ata2: EH complete [ 5.283150] sd 2:0:1:0: [sdc] 78242976 512-byte logical blocks: (40.0 GB/37.3 GiB) [ 5.286235] sdc: detected capacity change from 33820286976 to 40060403712 [ 5.344748] sdc: sdc1 sdc2 < sdc5 sdc6 sdc7 > sdc3 [ 5.348090] sd 2:0:1:0: [sdc] Attached SCSI disk [ 5.369956] sr 2:0:0:0: [sr0] scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray [ 5.370036] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 5.371661] sr 2:0:0:0: Attached scsi CD-ROM sr0 [ 5.627634] random: nonblocking pool is initialized [ 6.447623] PM: Starting manual resume from disk [ 6.447707] PM: Hibernation image partition 8:21 present [ 6.447709] PM: Looking for hibernation image. [ 6.448680] PM: Image not found (code -22) [ 6.448684] PM: Hibernation image not present or could not be loaded. [ 6.456476] PM: Marking nosave pages: [mem 0x00000000-0x00000fff] [ 6.456483] PM: Marking nosave pages: [mem 0x0009f000-0x000fffff] [ 6.456487] PM: Basic memory bitmaps created [ 6.457188] PM: Basic memory bitmaps freed [ 34.385463] EXT4-fs (sdb7): mounting ext3 file system using the ext4 subsystem [ 34.436364] EXT4-fs (sdb7): mounted filesystem with ordered data mode. Opts: (null) [ 38.797439] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2 [ 38.797525] ACPI: Sleep Button [SLPB] [ 38.797803] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input3 [ 38.797879] ACPI: Power Button [PWRB] [ 38.798146] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input4 [ 38.798220] ACPI: Power Button [PWRF] [ 38.971314] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4 [ 39.000872] parport_pc 00:01: reported by Plug and Play ACPI [ 39.001287] parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE,EPP] [ 39.593444] gameport gameport0: EMU10K1 is pci0000:05:0b.1/gameport0, io 0xdc00, speed 1209kHz [ 39.897132] EDAC MC: Ver: 3.0.0 [ 39.931620] sd 0:0:6:0: Attached scsi generic sg0 type 0 [ 39.931869] sd 1:0:0:0: Attached scsi generic sg1 type 0 [ 39.932146] sr 2:0:0:0: Attached scsi generic sg2 type 5 [ 39.932348] sd 2:0:1:0: Attached scsi generic sg3 type 0 [ 40.014877] MCE: In-kernel MCE decoding enabled. [ 40.041186] [drm] Initialized drm 1.1.0 20060810 [ 40.081195] AMD64 EDAC driver v3.4.0 [ 40.081326] EDAC amd64: DRAM ECC enabled. [ 40.081386] EDAC amd64: K8 revE or earlier detected (node 0). [ 40.082791] EDAC MC0: Giving out device to module amd64_edac controller K8: DEV 0000:00:18.2 (INTERRUPT) [ 40.088393] EDAC PCI0: Giving out device to module amd64_edac controller EDAC PCI controller: DEV 0000:00:18.2 (POLLED) [ 40.088471] EDAC amd64: amd64_edac on 32-bit is unsupported. USE AT YOUR OWN RISK! [ 40.274609] snd_emu10k1 0000:05:0b.0: Installing spdif_bug patch: SB Audigy 2 ZS [SB0350] [ 40.785679] input: PC Speaker as /devices/platform/pcspkr/input/input6 [ 40.802926] powernow_k8: fid 0xc (2000 MHz), vid 0x6 [ 40.802990] powernow_k8: fid 0xa (1800 MHz), vid 0x8 [ 40.803048] powernow_k8: fid 0x2 (1000 MHz), vid 0x12 [ 40.803940] powernow_k8: Found 1 AMD Athlon(tm) 64 Processor 3200+ (1 cpu cores) (version 2.20.00) [ 40.851981] Error: Driver 'pcspkr' is already registered, aborting... [ 40.870228] ppdev: user-space parallel port driver [ 41.343378] input: ImPS/2 Generic Wheel Mouse as /devices/platform/i8042/serio1/input/input5 [ 41.705226] [drm] radeon kernel modesetting enabled. [ 41.716645] [drm] initializing kernel modesetting (RV350 0x1002:0x4153 0x1458:0x4050). [ 41.716797] [drm] register mmio base: 0xFF4F0000 [ 41.716902] [drm] register mmio size: 65536 [ 41.718200] agpgart-amd64 0000:00:00.0: AGP 3.0 bridge [ 41.718282] agpgart-amd64 0000:00:00.0: putting AGP V3 device into 8x mode [ 41.718434] radeon 0000:01:00.0: putting AGP V3 device into 8x mode [ 41.718538] radeon 0000:01:00.0: GTT: 256M 0xD0000000 - 0xDFFFFFFF [ 41.718600] [drm] Generation 2 PCI interface, using max accessible memory [ 41.718663] radeon 0000:01:00.0: VRAM: 256M 0x00000000A0000000 - 0x00000000AFFFFFFF (256M used) [ 41.718783] [drm] Detected VRAM RAM=256M, BAR=256M [ 41.718841] [drm] RAM width 128bits DDR [ 41.728575] [TTM] Zone kernel: Available graphics memory: 440912 kiB [ 41.728642] [TTM] Zone highmem: Available graphics memory: 510388 kiB [ 41.728701] [TTM] Initializing pool allocator [ 41.728810] [TTM] Initializing DMA pool allocator [ 41.729996] [drm] radeon: 256M of VRAM memory ready [ 41.730056] [drm] radeon: 256M of GTT memory ready. [ 41.730314] [drm] radeon: 1 quad pipes, 1 Z pipes initialized. [ 41.749618] radeon 0000:01:00.0: WB disabled [ 41.749688] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x00000000d0000000 and cpu addr 0xf800e000 [ 41.749769] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 41.749829] [drm] Driver supports precise vblank timestamp query. [ 41.750056] [drm] radeon: irq initialized. [ 41.750167] [drm] Loading R300 Microcode [ 42.041776] [drm] radeon: ring at 0x00000000D0001000 [ 42.042110] [drm] ring test succeeded in 0 usecs [ 42.043455] [drm] ib test succeeded in 0 usecs [ 42.070296] [drm] Radeon Display Connectors [ 42.070370] [drm] Connector 0: [ 42.070433] [drm] VGA-1 [ 42.070497] [drm] DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60 [ 42.070563] [drm] Encoders: [ 42.070624] [drm] CRT1: INTERNAL_DAC1 [ 42.070687] [drm] Connector 1: [ 42.070748] [drm] DVI-I-1 [ 42.070809] [drm] HPD1 [ 42.071553] [drm] DDC: 0x64 0x64 0x64 0x64 0x64 0x64 0x64 0x64 [ 42.071622] [drm] Encoders: [ 42.071683] [drm] CRT2: INTERNAL_DAC2 [ 42.071746] [drm] DFP1: INTERNAL_TMDS1 [ 42.071809] [drm] Connector 2: [ 42.071870] [drm] SVIDEO-1 [ 42.071930] [drm] Encoders: [ 42.071991] [drm] TV1: INTERNAL_DAC2 [ 42.262037] [drm] fb mappable at 0xA0040000 [ 42.262107] [drm] vram apper at 0xA0000000 [ 42.262167] [drm] size 8294400 [ 42.262228] [drm] fb depth is 24 [ 42.262287] [drm] pitch is 7680 [ 42.264987] fbcon: radeondrmfb (fb0) is primary device [ 42.304853] floppy0: no floppy controllers found [ 42.903199] Console: switching to colour frame buffer device 240x67 [ 43.058918] usb-storage 2-5:1.0: USB Mass Storage device detected [ 43.069008] radeon 0000:01:00.0: fb0: radeondrmfb frame buffer device [ 43.072231] scsi host3: usb-storage 2-5:1.0 [ 43.073172] usbcore: registered new interface driver usb-storage [ 43.076829] [drm] Initialized radeon 2.43.0 20080528 for 0000:01:00.0 on minor 0 [ 43.126162] usbcore: registered new interface driver uas [ 44.081889] scsi 3:0:0:0: Direct-Access Verbatim STORE N GO 5.00 PQ: 0 ANSI: 0 CCS [ 44.094011] sd 3:0:0:0: [sdd] 3911680 512-byte logical blocks: (2.00 GB/1.86 GiB) [ 44.094863] sd 3:0:0:0: Attached scsi generic sg4 type 0 [ 44.095691] sd 3:0:0:0: [sdd] Write Protect is off [ 44.096272] sd 3:0:0:0: [sdd] Mode Sense: 23 00 00 00 [ 44.096937] sd 3:0:0:0: [sdd] No Caching mode page found [ 44.097412] sd 3:0:0:0: [sdd] Assuming drive cache: write through [ 44.247037] sdd: sdd1 [ 44.251596] sd 3:0:0:0: [sdd] Attached SCSI removable disk [ 44.345436] ata1.00: configured for UDMA/100 [ 44.345830] ata1: EH complete [ 44.432255] ata2.00: configured for UDMA/33 [ 44.440355] ata2.01: configured for UDMA/33 [ 44.440733] ata2: EH complete [ 45.659607] Adding 2200868k swap on /dev/sdb5. Priority:-1 extents:1 across:2200868k [ 45.815931] EXT4-fs (sdb7): re-mounted. Opts: (null) [ 46.345665] EXT4-fs (sdb7): re-mounted. Opts: errors=remount-ro,data=ordered [ 47.454406] lp0: using parport0 (interrupt-driven). [ 47.645887] Loading iSCSI transport class v2.0-870. [ 47.711023] iscsi: registered transport (tcp) [ 48.048779] iscsi: registered transport (iser) [ 48.176157] fuse init (API version 7.23) [ 48.600094] tun: Universal TUN/TAP device driver, 1.6 [ 48.626555] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> [ 48.724123] w83627ehf: Found W83627EHG chip at 0x290 [ 48.755584] ACPI Warning: SystemIO range 0x0000000000000295-0x0000000000000296 conflicts with OpRegion 0x0000000000000290-0x0000000000000299 (\_SB_.PCI0.SBRG.SIOR.HWRE) (20150818/utaddress-254) [ 48.785081] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver [ 71.731949] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem [ 71.790623] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null) [ 71.873021] FAT-fs (sdb6): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! [ 71.970821] FAT-fs (sdd1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! [ 84.668330] Bluetooth: Core ver 2.20 [ 84.699093] NET: Registered protocol family 31 [ 84.724228] Bluetooth: HCI device and connection manager initialized [ 84.749286] Bluetooth: HCI socket layer initialized [ 84.774066] Bluetooth: L2CAP socket layer initialized [ 84.798763] Bluetooth: SCO socket layer initialized [ 84.873929] Netfilter messages via NETLINK v0.30. [ 85.505288] Process accounting resumed [ 89.189679] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 89.216407] Bluetooth: BNEP filters: protocol multicast [ 89.249958] Bluetooth: BNEP socket layer initialized [ 96.077395] nfc: nfc_init: NFC Core ver 0.1 [ 96.077719] NET: Registered protocol family 39 [ 161.133192] FAT-fs (sda5): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! [ 172.735874] FAT-fs (sda1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! [ 250.483549] ------------[ cut here ]------------ [ 250.530025] WARNING: CPU: 0 PID: 4978 at fs/kernfs/dir.c:1276 kernfs_remove_by_name_ns+0x7e/0x90() [ 250.578197] kernfs: can not remove 'uevent', no directory [ 250.625450] Modules linked in: snd_hrtimer nfc cpufreq_stats cpufreq_conservative cpufreq_powersave cpufreq_userspace bnep nfnetlink_queue nfnetlink_log nfnetlink bluetooth rfkill binfmt_misc nls_utf8 nls_cp437 vfat fat hwmon_vid tun snd_emu10k1_synth snd_emux_synth snd_seq_midi_emul snd_seq_midi snd_seq_virmidi snd_seq_midi_event snd_seq cuse fuse ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi lp uas usb_storage radeon ttm ppdev powernow_k8 pcspkr drm_kms_helper psmouse snd_emu10k1 evdev serio_raw snd_util_mem snd_hwdep snd_rawmidi amd64_edac_mod drm snd_seq_device edac_mce_amd sg snd_ac97_codec edac_core snd_pcm i2c_algo_bit snd_timer fb_sys_fops snd k8temp sysfillrect syscopyarea soundcore sysimgblt ac97_bus emu10k1_gp gameport i2c_viapro [ 250.776774] asus_atk0110 parport_pc parport shpchp button acpi_cpufreq processor ext4 mbcache crc16 jbd2 sr_mod cdrom ata_generic sd_mod pata_via firewire_ohci eata(-) firewire_core crc_itu_t ehci_pci uhci_hcd ehci_hcd via_rhine mii usbcore usb_common libata scsi_mod [ 250.877126] CPU: 0 PID: 4978 Comm: modprobe Not tainted 4.3.0-rc2+ #49 [ 250.926483] Hardware name: System manufacturer System Product Name/A8V-MX, BIOS 0503 12/06/2005 [ 250.976550] 00000000 00000000 f49b5e84 c155149f f49b5ec4 f49b5eb4 c1054858 c1708074 [ 251.027865] f49b5ee0 00001372 c16cc09f 000004fc c121ee1e c121ee1e f81cd014 c16c4617 [ 251.076070] 00000000 f49b5ecc c10548be 00000009 f49b5ec4 c1708074 f49b5ee0 f49b5ef0 [ 251.124440] Call Trace: [ 251.173559] [<c155149f>] dump_stack+0x4b/0x75 [ 251.221133] [<c1054858>] warn_slowpath_common+0x88/0xc0 [ 251.267319] [<c121ee1e>] ? kernfs_remove_by_name_ns+0x7e/0x90 [ 251.313249] [<c121ee1e>] ? kernfs_remove_by_name_ns+0x7e/0x90 [ 251.363179] [<c10548be>] warn_slowpath_fmt+0x2e/0x30 [ 251.408927] [<c121ee1e>] kernfs_remove_by_name_ns+0x7e/0x90 [ 251.454107] [<c122047d>] sysfs_remove_file_ns+0xd/0x10 [ 251.499466] [<c13c3ba1>] driver_remove_file+0x11/0x20 [ 251.543924] [<c13c234f>] bus_remove_driver+0x2f/0xc0 [ 251.586979] [<c155b088>] ? mutex_unlock+0x8/0x10 [ 251.629736] [<c13c3ce3>] driver_unregister+0x23/0x60 [ 251.671754] [<c10e27ea>] ? find_module_all+0x5a/0x80 [ 251.716388] [<c13c4fcb>] platform_driver_unregister+0xb/0x10 [ 251.758185] [<f81cb528>] eata2x_remove_platform_devices+0x10/0x37 [eata] [ 251.799292] [<f81cb566>] eata2x_exit+0x8/0xaa2 [eata] [ 251.839785] [<c10e529c>] SyS_delete_module+0x18c/0x1d0 [ 251.880566] [<c11acd87>] ? __sb_end_write+0x17/0x20 [ 251.920102] [<c11ab200>] ? vfs_write+0x150/0x1a0 [ 251.958220] [<c10a2d2c>] ? trace_hardirqs_on_caller+0x12c/0x1d0 [ 251.995313] [<c11aba5d>] ? SyS_write+0x4d/0xa0 [ 252.031947] [<c155db18>] sysenter_do_call+0x12/0x12 [ 252.084787] ---[ end trace 236d3cf6c65d2fd3 ]--- [ 252.120953] ------------[ cut here ]------------ [ 252.124595] WARNING: CPU: 0 PID: 4978 at kernel/locking/lockdep.c:973 __bfs+0x19a/0x230() [ 252.124595] Modules linked in: snd_hrtimer nfc cpufreq_stats cpufreq_conservative cpufreq_powersave cpufreq_userspace bnep nfnetlink_queue nfnetlink_log nfnetlink bluetooth rfkill binfmt_misc nls_utf8 nls_cp437 vfat fat hwmon_vid tun snd_emu10k1_synth snd_emux_synth snd_seq_midi_emul snd_seq_midi snd_seq_virmidi snd_seq_midi_event snd_seq cuse fuse ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi lp uas usb_storage radeon ttm ppdev powernow_k8 pcspkr drm_kms_helper psmouse snd_emu10k1 evdev serio_raw snd_util_mem snd_hwdep snd_rawmidi amd64_edac_mod drm snd_seq_device edac_mce_amd sg snd_ac97_codec edac_core snd_pcm i2c_algo_bit snd_timer fb_sys_fops snd k8temp sysfillrect syscopyarea soundcore sysimgblt ac97_bus emu10k1_gp gameport i2c_viapro [ 252.124595] asus_atk0110 parport_pc parport shpchp button acpi_cpufreq processor ext4 mbcache crc16 jbd2 sr_mod cdrom ata_generic sd_mod pata_via firewire_ohci eata(-) firewire_core crc_itu_t ehci_pci uhci_hcd ehci_hcd via_rhine mii usbcore usb_common libata scsi_mod [ 252.124595] CPU: 0 PID: 4978 Comm: modprobe Tainted: G W 4.3.0-rc2+ #49 [ 252.124595] Hardware name: System manufacturer System Product Name/A8V-MX, BIOS 0503 12/06/2005 [ 252.124595] 00000000 00000000 f49b5d04 c155149f 00000000 f49b5d34 c1054858 c16f8e3c [ 252.124595] 00000000 00001372 c16c1c5d 000003cd c109fdaa c109fdaa 00000000 c1ec1908 [ 252.124595] f49b5d98 f49b5d44 c105490d 00000009 00000000 f49b5d78 c109fdaa f49b4000 [ 252.124595] Call Trace: [ 252.124595] [<c155149f>] dump_stack+0x4b/0x75 [ 252.124595] [<c1054858>] warn_slowpath_common+0x88/0xc0 [ 252.124595] [<c109fdaa>] ? __bfs+0x19a/0x230 [ 252.124595] [<c109fdaa>] ? __bfs+0x19a/0x230 [ 252.124595] [<c105490d>] warn_slowpath_null+0x1d/0x20 [ 252.124595] [<c109fdaa>] __bfs+0x19a/0x230 [ 252.124595] [<c107b1b6>] ? preempt_count_sub+0x26/0x70 [ 252.124595] [<c109f730>] ? noop_count+0x10/0x10 [ 252.124595] [<c10a1ae2>] check_usage_backwards+0x52/0x120 [ 252.124595] [<c10a1a90>] ? print_shortest_lock_dependencies+0x1a0/0x1a0 [ 252.124595] [<c10a287e>] mark_lock+0x2fe/0x5f0 [ 252.124595] [<c107b1b6>] ? preempt_count_sub+0x26/0x70 [ 252.124595] [<c10a37b6>] __lock_acquire+0x6f6/0x16a0 [ 252.124595] [<c10bf3aa>] ? debug_lockdep_rcu_enabled+0x1a/0x20 [ 252.124595] [<c10a39d0>] ? __lock_acquire+0x910/0x16a0 [ 252.124595] [<c10a5001>] lock_acquire+0xb1/0x1d0 [ 252.124595] [<c154f363>] ? klist_put+0x23/0x90 [ 252.124595] [<c155ccbd>] _raw_spin_lock+0x3d/0x50 [ 252.124595] [<c154f363>] ? klist_put+0x23/0x90 [ 252.124595] [<c154f363>] klist_put+0x23/0x90 [ 252.124595] [<c154f469>] klist_remove+0x59/0xa0 [ 252.124595] [<c13c235a>] bus_remove_driver+0x3a/0xc0 [ 252.124595] [<c155b088>] ? mutex_unlock+0x8/0x10 [ 252.124595] [<c13c3ce3>] driver_unregister+0x23/0x60 [ 252.124595] [<c10e27ea>] ? find_module_all+0x5a/0x80 [ 252.124595] [<c13c4fcb>] platform_driver_unregister+0xb/0x10 [ 252.124595] [<f81cb528>] eata2x_remove_platform_devices+0x10/0x37 [eata] [ 252.124595] [<f81cb566>] eata2x_exit+0x8/0xaa2 [eata] [ 252.124595] [<c10e529c>] SyS_delete_module+0x18c/0x1d0 [ 252.124595] [<c11acd87>] ? __sb_end_write+0x17/0x20 [ 252.124595] [<c11ab200>] ? vfs_write+0x150/0x1a0 [ 252.124595] [<c10a2d2c>] ? trace_hardirqs_on_caller+0x12c/0x1d0 [ 252.124595] [<c11aba5d>] ? SyS_write+0x4d/0xa0 [ 252.124595] [<c155db18>] sysenter_do_call+0x12/0x12 [ 252.124595] ---[ end trace 236d3cf6c65d2fd4 ]--- [ 252.124595] BUG: unable to handle kernel NULL pointer dereference at 00000008 [ 252.124595] IP: [<c109fdaa>] __bfs+0x19a/0x230 [ 252.124595] *pde = 00000000 [ 252.124595] Oops: 0000 [#1] PREEMPT SMP [ 252.124595] Modules linked in: snd_hrtimer nfc cpufreq_stats cpufreq_conservative cpufreq_powersave cpufreq_userspace bnep nfnetlink_queue nfnetlink_log nfnetlink bluetooth rfkill binfmt_misc nls_utf8 nls_cp437 vfat fat hwmon_vid tun snd_emu10k1_synth snd_emux_synth snd_seq_midi_emul snd_seq_midi snd_seq_virmidi snd_seq_midi_event snd_seq cuse fuse ib_iser rdma_cm iw_cm ib_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi lp uas usb_storage radeon ttm ppdev powernow_k8 pcspkr drm_kms_helper psmouse snd_emu10k1 evdev serio_raw snd_util_mem snd_hwdep snd_rawmidi amd64_edac_mod drm snd_seq_device edac_mce_amd sg snd_ac97_codec edac_core snd_pcm i2c_algo_bit snd_timer fb_sys_fops snd k8temp sysfillrect syscopyarea soundcore sysimgblt ac97_bus emu10k1_gp gameport i2c_viapro [ 252.124595] asus_atk0110 parport_pc parport shpchp button acpi_cpufreq processor ext4 mbcache crc16 jbd2 sr_mod cdrom ata_generic sd_mod pata_via firewire_ohci eata(-) firewire_core crc_itu_t ehci_pci uhci_hcd ehci_hcd via_rhine mii usbcore usb_common libata scsi_mod [ 252.124595] CPU: 0 PID: 4978 Comm: modprobe Tainted: G W 4.3.0-rc2+ #49 [ 252.124595] Hardware name: System manufacturer System Product Name/A8V-MX, BIOS 0503 12/06/2005 [ 252.124595] task: f498b080 ti: f49b4000 task.ti: f49b4000 [ 252.124595] EIP: 0060:[<c109fdaa>] EFLAGS: 00010096 CPU: 0 [ 252.124595] EIP is at __bfs+0x19a/0x230 [ 252.124595] EAX: 00000009 EBX: 00000000 ECX: f5eecf08 EDX: ffffffff [ 252.124595] ESI: c1ec1908 EDI: f49b5d98 EBP: f49b5d78 ESP: f49b5d4c [ 252.124595] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [ 252.124595] CR0: 8005003b CR2: 00000008 CR3: 34941000 CR4: 000006d0 [ 252.124595] Stack: [ 252.124595] f49b4000 c107b1b6 f49b4000 f49b5d8c 8ff24808 c109f730 00000000 00000000 [ 252.124595] f498b4ec f498b4ec f498b080 f49b5dc8 c10a1ae2 f49b5d94 00000000 f498b080 [ 252.124595] 00000000 c1ec1850 00000002 f498b4ec f49b5db4 c1ec1810 f49b5d9c c1561e1c [ 252.124595] Call Trace: [ 252.124595] [<c107b1b6>] ? preempt_count_sub+0x26/0x70 [ 252.124595] [<c109f730>] ? noop_count+0x10/0x10 [ 252.124595] [<c10a1ae2>] check_usage_backwards+0x52/0x120 [ 252.124595] [<c10a1a90>] ? print_shortest_lock_dependencies+0x1a0/0x1a0 [ 252.124595] [<c10a287e>] mark_lock+0x2fe/0x5f0 [ 252.124595] [<c107b1b6>] ? preempt_count_sub+0x26/0x70 [ 252.124595] [<c10a37b6>] __lock_acquire+0x6f6/0x16a0 [ 252.124595] [<c10bf3aa>] ? debug_lockdep_rcu_enabled+0x1a/0x20 [ 252.124595] [<c10a39d0>] ? __lock_acquire+0x910/0x16a0 [ 252.124595] [<c10a5001>] lock_acquire+0xb1/0x1d0 [ 252.124595] [<c154f363>] ? klist_put+0x23/0x90 [ 252.124595] [<c155ccbd>] _raw_spin_lock+0x3d/0x50 [ 252.124595] [<c154f363>] ? klist_put+0x23/0x90 [ 252.124595] [<c154f363>] klist_put+0x23/0x90 [ 252.124595] [<c154f469>] klist_remove+0x59/0xa0 [ 252.124595] [<c13c235a>] bus_remove_driver+0x3a/0xc0 [ 252.124595] [<c155b088>] ? mutex_unlock+0x8/0x10 [ 252.124595] [<c13c3ce3>] driver_unregister+0x23/0x60 [ 252.124595] [<c10e27ea>] ? find_module_all+0x5a/0x80 [ 252.124595] [<c13c4fcb>] platform_driver_unregister+0xb/0x10 [ 252.124595] [<f81cb528>] eata2x_remove_platform_devices+0x10/0x37 [eata] [ 252.124595] [<f81cb566>] eata2x_exit+0x8/0xaa2 [eata] [ 252.124595] [<c10e529c>] SyS_delete_module+0x18c/0x1d0 [ 252.124595] [<c11acd87>] ? __sb_end_write+0x17/0x20 [ 252.124595] [<c11ab200>] ? vfs_write+0x150/0x1a0 [ 252.124595] [<c10a2d2c>] ? trace_hardirqs_on_caller+0x12c/0x1d0 [ 252.124595] [<c11aba5d>] ? SyS_write+0x4d/0xa0 [ 252.124595] [<c155db18>] sysenter_do_call+0x12/0x12 [ 252.124595] Code: fe ff ff 8d b6 00 00 00 00 83 c4 20 b8 ff ff ff ff 5b 5e 5f 5d c3 8d 76 00 ba cd 03 00 00 b8 5d 1c 6c c1 89 4d e4 e8 46 4b fb ff <8b> 43 08 8b 15 a0 1f a7 c1 39 50 18 0f 84 7b ff ff ff 8b 4d e4 [ 252.124595] EIP: [<c109fdaa>] __bfs+0x19a/0x230 SS:ESP 0068:f49b5d4c [ 252.124595] CR2: 0000000000000008 [ 252.124595] ---[ end trace 236d3cf6c65d2fd5 ]--- [ 252.124595] note: modprobe[4978] exited with preempt_count 1 ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-22 23:36 ` Arthur Marsh @ 2015-09-23 5:24 ` Jiang Liu 2015-09-23 10:44 ` Arthur Marsh 0 siblings, 1 reply; 42+ messages in thread From: Jiang Liu @ 2015-09-23 5:24 UTC (permalink / raw) To: Arthur Marsh, James Bottomley Cc: Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 [-- Attachment #1: Type: text/plain, Size: 1181 bytes --] On 2015/9/23 7:36, Arthur Marsh wrote: > James Bottomley wrote on 23/09/15 08:15: >> On Wed, 2015-09-23 at 07:55 +0930, Arthur Marsh wrote: >> It looks to be some problem in shut down. Can you simply remove and >> re-insert the driver successfully? If it's your root disk driver, >> you'll have to do this from an initrd so as not to have root mounted >> from the eata controller. >> >> If the remove and reinsert fails, it means we have a problem in the >> driver shut down. If not, it's likely something kexec related. >> >> James > > OK, it looks like there was a problem with unloading the driver. > > After un-mounting file systems on the disk attached to the SCSI > controller using the eata driver I could do a: > > modprobe -r eata > > but received the output of the attached dmesg log. > > Attempting to do > > modprobe eata > > after the previous modprobe -r eata resulted in a complete lock-up. Hi Arthur, I have found the cause of the warning messages, it's caused by a flaw in the conversion. But according to my understanding, it isn't related to the kexec/kdump failure. Could you please help to test the attached new version? Thanks! Gerry > > Arthur. [-- Attachment #2: 0001-eata-Convert-eata-driver-as-normal-PCI-and-platform-.patch --] [-- Type: text/x-patch, Size: 19508 bytes --] >From 2231506adf7da0944fac82ec38040cc2f70562f7 Mon Sep 17 00:00:00 2001 From: Jiang Liu <jiang.liu@linux.intel.com> Date: Tue, 22 Sep 2015 10:16:20 +0800 Subject: [Bugfix v3] eata: Convert eata driver as normal PCI and platform device drivers To: Thomas Gleixner <tglx@linutronix.de>, Bjorn Helgaas <bhelgaas@google.com>, Arthur Marsh <arthur.marsh@internode.on.net>, Hannes Reinecke <hare@suse.de>, Ballabio, Dario <dario.ballabio@emc.com>, Christoph Hellwig <hch@infradead.org> Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, x86@kernel.org 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() and pcibios_free_irq()") changes the way to allocate PCI legacy IRQ for PCI devices on x86 platforms. Instead of allocating PCI legacy IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() will be called by pci_device_probe() to allocate PCI legacy IRQs when binding PCI drivers to PCI devices. But the eata driver directly accesses PCI devices without implementing corresponding PCI drivers, so pcibios_alloc_irq() won't be called for those PCI devices and wrong IRQ number may be used to manage the PCI device. This patch implements a PCI device driver to manage eata PCI devices, so eata driver could properly cooperate with the PCI core. It 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 <jiang.liu@linux.intel.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Ballabio, Dario <dario.ballabio@emc.com> Cc: Christoph Hellwig <hch@infradead.org> --- drivers/scsi/eata.c | 451 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 272 insertions(+), 179 deletions(-) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 227dd2c2ec2f..11813a72c2e9 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -486,6 +486,8 @@ #include <linux/interrupt.h> #include <linux/stat.h> #include <linux/pci.h> +#include <linux/platform_device.h> +#include <linux/idr.h> #include <linux/init.h> #include <linux/ctype.h> #include <linux/spinlock.h> @@ -503,8 +505,6 @@ #include <scsi/scsi_tcq.h> #include <scsi/scsicam.h> -static int eata2x_detect(struct scsi_host_template *); -static int eata2x_release(struct Scsi_Host *); static int eata2x_queuecommand(struct Scsi_Host *, struct scsi_cmnd *); static int eata2x_eh_abort(struct scsi_cmnd *); static int eata2x_eh_host_reset(struct scsi_cmnd *); @@ -513,9 +513,9 @@ static int eata2x_bios_param(struct scsi_device *, struct block_device *, static int eata2x_slave_configure(struct scsi_device *); static struct scsi_host_template driver_template = { + .module = THIS_MODULE, + .proc_name = "eata2x", .name = "EATA/DMA 2.0x rev. 8.10.00 ", - .detect = eata2x_detect, - .release = eata2x_release, .queuecommand = eata2x_queuecommand, .eh_abort_handler = eata2x_eh_abort, .eh_host_reset_handler = eata2x_eh_host_reset, @@ -834,12 +834,10 @@ struct hostdata { struct mssp sp; /* Local copy of sp buffer */ }; -static struct Scsi_Host *sh[MAX_BOARDS]; static const char *driver_name = "EATA"; -static char sha[MAX_BOARDS]; - -/* Initialize num_boards so that ihdlr can work while detect is in progress */ -static unsigned int num_boards = MAX_BOARDS; +static DEFINE_IDA(eata2x_ida); +static struct platform_device *eata2x_platform_devs[MAX_BOARDS]; +static bool eata2x_platform_driver_registered; static unsigned long io_port[] = { @@ -850,10 +848,6 @@ static unsigned long io_port[] = { /* First ISA */ 0x1f0, - /* Space for MAX_PCI ports possibly reported by PCI_BIOS */ - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, - SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, SKIP, - /* MAX_EISA ports */ 0x1c88, 0x2c88, 0x3c88, 0x4c88, 0x5c88, 0x6c88, 0x7c88, 0x8c88, 0x9c88, 0xac88, 0xbc88, 0xcc88, 0xdc88, 0xec88, 0xfc88, @@ -1024,74 +1018,42 @@ static int read_pio(unsigned long iobase, ushort * start, ushort * end) return 0; } -static struct pci_dev *get_pci_dev(unsigned long port_base) -{ -#if defined(CONFIG_PCI) - unsigned int addr; - struct pci_dev *dev = NULL; - - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { - addr = pci_resource_start(dev, 0); - -#if defined(DEBUG_PCI_DETECT) - printk("%s: get_pci_dev, bus %d, devfn 0x%x, addr 0x%x.\n", - driver_name, dev->bus->number, dev->devfn, addr); -#endif - - /* we are in so much trouble for a pci hotplug system with this driver - * anyway, so doing this at least lets people unload the driver and not - * cause memory problems, but in general this is a bad thing to do (this - * driver needs to be converted to the proper PCI api someday... */ - pci_dev_put(dev); - if (addr + PCI_BASE_ADDRESS_0 == port_base) - return dev; - } -#endif /* end CONFIG_PCI */ - return NULL; -} - -static void enable_pci_ports(void) -{ -#if defined(CONFIG_PCI) - struct pci_dev *dev = NULL; - - while ((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { -#if defined(DEBUG_PCI_DETECT) - printk("%s: enable_pci_ports, bus %d, devfn 0x%x.\n", - driver_name, dev->bus->number, dev->devfn); -#endif - - if (pci_enable_device(dev)) - printk - ("%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n", - driver_name, dev->bus->number, dev->devfn); - } - -#endif /* end CONFIG_PCI */ -} - -static int port_detect(unsigned long port_base, unsigned int j, - struct scsi_host_template *tpnt) +static int port_detect(unsigned long port_base, struct device *dev) { unsigned char irq, dma_channel, subversion, i, is_pci = 0; unsigned char protocol_rev; struct eata_info info; char *bus_type, dma_name[16]; - struct pci_dev *pdev; + struct pci_dev *pdev = NULL; /* Allowed DMA channels for ISA (0 indicates reserved) */ unsigned char dma_channel_table[4] = { 5, 6, 7, 0 }; struct Scsi_Host *shost; struct hostdata *ha; char name[16]; + int idx, ret = -ENODEV; - sprintf(name, "%s%d", driver_name, j); + idx = ida_simple_get(&eata2x_ida, 0, MAX_BOARDS, GFP_KERNEL); + if (idx < 0) { + ret = idx; + goto fail; + } + + shost = scsi_host_alloc(&driver_template, sizeof(struct hostdata)); + if (shost == NULL) { + dev_warn(dev, "%s: unable to alloc host, detaching.\n", + driver_name); + ret = -ENOMEM; + goto freeid; + } + + sprintf(name, "%s%d", driver_name, idx); if (!request_region(port_base, REGION_SIZE, driver_name)) { #if defined(DEBUG_DETECT) printk("%s: address 0x%03lx in use, skipping probe.\n", name, port_base); #endif - goto fail; + goto freeshost; } if (do_dma(port_base, 0, READ_CONFIG_PIO)) { @@ -1199,15 +1161,11 @@ static int port_detect(unsigned long port_base, unsigned int j, ("%s: warning, LEVEL triggering is suggested for IRQ %u.\n", name, irq); - if (is_pci) { - pdev = get_pci_dev(port_base); - if (!pdev) - printk - ("%s: warning, failed to get pci_dev structure.\n", - name); - } else - pdev = NULL; - + if (dev_is_pci(dev)) + pdev = to_pci_dev(dev); + if (is_pci && !pdev) + dev_warn(dev, "%s: warning, failed to get pci_dev structure.\n", + name); if (pdev && (irq != pdev->irq)) { printk("%s: IRQ %u mapped to IO-APIC IRQ %u.\n", name, irq, pdev->irq); @@ -1217,7 +1175,7 @@ static int port_detect(unsigned long port_base, unsigned int j, /* Board detected, allocate its IRQ */ if (request_irq(irq, do_interrupt_handler, (subversion == ESA) ? IRQF_SHARED : 0, - driver_name, (void *)&sha[j])) { + driver_name, shost)) { printk("%s: unable to allocate IRQ %u, detaching.\n", name, irq); goto freelock; @@ -1259,12 +1217,6 @@ static int port_detect(unsigned long port_base, unsigned int j, } #endif - sh[j] = shost = scsi_register(tpnt, sizeof(struct hostdata)); - if (shost == NULL) { - printk("%s: unable to register host, detaching.\n", name); - goto freedma; - } - shost->io_port = port_base; shost->unique_id = port_base; shost->n_io_port = REGION_SIZE; @@ -1282,7 +1234,7 @@ static int port_detect(unsigned long port_base, unsigned int j, ha->protocol_rev = protocol_rev; ha->is_pci = is_pci; ha->pdev = pdev; - ha->board_number = j; + ha->board_number = idx; if (ha->subversion == ESA) shost->unchecked_isa_dma = 0; @@ -1350,7 +1302,7 @@ static int port_detect(unsigned long port_base, unsigned int j, printk ("%s: kmalloc SGlist failed, mbox %d, detaching.\n", ha->board_name, i); - goto release; + goto free_cp_dma_addr; } } @@ -1358,7 +1310,7 @@ static int port_detect(unsigned long port_base, unsigned int j, sizeof(struct mssp), &ha->sp_dma_addr))) { printk("%s: pci_alloc_consistent failed, detaching.\n", ha->board_name); - goto release; + goto free_sglist; } if (max_queue_depth > MAX_TAGGED_CMD_PER_LUN) @@ -1370,7 +1322,7 @@ static int port_detect(unsigned long port_base, unsigned int j, if (tag_mode != TAG_DISABLED && tag_mode != TAG_SIMPLE) tag_mode = TAG_ORDERED; - if (j == 0) { + if (idx == 0) { printk ("EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio.\n"); printk @@ -1420,21 +1372,65 @@ static int port_detect(unsigned long port_base, unsigned int j, ha->board_name); } - return 1; + ret = scsi_add_host(shost, NULL); + if (!ret) { + dev_set_drvdata(dev, shost); + scsi_scan_host(shost); + return idx; + } - freedma: + if (ha->sp_cpu_addr) + pci_free_consistent(ha->pdev, sizeof(struct mssp), + ha->sp_cpu_addr, ha->sp_dma_addr); +free_sglist: + for (i = 0; i < shost->can_queue; i++) + kfree((&ha->cp[i])->sglist); +free_cp_dma_addr: + for (i = 0; i < shost->can_queue; i++) + pci_unmap_single(ha->pdev, ha->cp[i].cp_dma_addr, + sizeof(struct mscp), PCI_DMA_BIDIRECTIONAL); +#if defined(FORCE_CONFIG) +freedma: if (subversion == ISA) free_dma(dma_channel); - freeirq: - free_irq(irq, &sha[j]); - freelock: +#endif +freeirq: + free_irq(irq, shost); +freelock: release_region(port_base, REGION_SIZE); - fail: - return 0; +freeshost: + scsi_host_put(shost); +freeid: + ida_simple_remove(&eata2x_ida, idx); +fail: + return ret; +} - release: - eata2x_release(shost); - return 0; +static void port_remove(struct device *dev) +{ + struct Scsi_Host *shost = dev_get_drvdata(dev); + struct hostdata *ha; + unsigned int i; + + if (!shost) + return; + + scsi_remove_host(shost); + ha = (struct hostdata *)shost->hostdata; + for (i = 0; i < shost->can_queue; i++) + kfree((&ha->cp[i])->sglist); + for (i = 0; i < shost->can_queue; i++) + pci_unmap_single(ha->pdev, ha->cp[i].cp_dma_addr, + sizeof(struct mscp), PCI_DMA_BIDIRECTIONAL); + if (ha->sp_cpu_addr) + pci_free_consistent(ha->pdev, sizeof(struct mssp), + ha->sp_cpu_addr, ha->sp_dma_addr); + if (shost->dma_channel != NO_DMA) + free_dma(shost->dma_channel); + free_irq(shost->irq, shost); + release_region(shost->io_port, shost->n_io_port); + ida_simple_remove(&eata2x_ida, ha->board_number); + scsi_host_put(shost); } static void internal_setup(char *str, int *ints) @@ -1509,59 +1505,126 @@ static int option_setup(char *str) return 1; } -static void add_pci_ports(void) +#ifdef CONFIG_PCI +static int eata2x_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { -#if defined(CONFIG_PCI) - unsigned int addr, k; - struct pci_dev *dev = NULL; + int i; + resource_size_t addr; + unsigned long port_base; + + if (pci_enable_device(dev)) { + if (config_enabled(DEBUG_PCI_DETECT)) + pr_warn("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", + driver_name, dev->bus->number, dev->devfn); + goto out_error; + } - for (k = 0; k < MAX_PCI; k++) { + addr = pci_resource_start(dev, 0); + port_base = addr + PCI_BASE_ADDRESS_0; + if (config_enabled(DEBUG_PCI_DETECT)) + dev_dbg(&dev->dev, + "%s: detect, bus %d, devfn 0x%x, addr 0x%x.\n", + driver_name, dev->bus->number, dev->devfn, + (unsigned int)addr); + + if (setup_done) { + /* + * Handle kernel or module parameter + * . probe board if its port is specified by user + * . otherwise ignore the board + */ + for (i = 1; i < MAX_INT_PARAM; i++) + if (io_port[i] == port_base) { + io_port[i] = SKIP; + break; + } + if (i >= MAX_INT_PARAM) + goto out_disable_device; + } - if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) - break; + if (port_detect(port_base, &dev->dev) >= 0) + return 0; - if (pci_enable_device(dev)) { -#if defined(DEBUG_PCI_DETECT) - printk - ("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", - driver_name, dev->bus->number, dev->devfn); -#endif +out_disable_device: + pci_disable_device(dev); +out_error: + return -ENXIO; +} - continue; - } +static void eata2x_pci_remove(struct pci_dev *pdev) +{ + port_remove(&pdev->dev); + pci_disable_device(pdev); +} - addr = pci_resource_start(dev, 0); +static struct pci_device_id eata2x_tbl[] = { + { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) }, + { }, +}; +MODULE_DEVICE_TABLE(pci, eata2x_tbl); -#if defined(DEBUG_PCI_DETECT) - printk("%s: detect, seq. %d, bus %d, devfn 0x%x, addr 0x%x.\n", - driver_name, k, dev->bus->number, dev->devfn, addr); -#endif +static struct pci_driver eata2x_pci_driver = { + .name = "eata_pci", + .id_table = eata2x_tbl, + .probe = eata2x_pci_probe, + .remove = eata2x_pci_remove, +}; - /* Order addresses according to rev_scan value */ - io_port[MAX_INT_PARAM + (rev_scan ? (MAX_PCI - k) : (1 + k))] = - addr + PCI_BASE_ADDRESS_0; - } +static int eata2x_register_pci_driver(void) +{ + if (!pci_probe) + return 0; + if (!pci_register_driver(&eata2x_pci_driver)) + return 1; + pr_warn("%s: failed to register PCI device driver.\n", driver_name); + return -ENODEV; +} - pci_dev_put(dev); -#endif /* end CONFIG_PCI */ +static void eata2x_unregister_pci_driver(void) +{ + pci_unregister_driver(&eata2x_pci_driver); } +#else /* CONFIG_PCI */ +static inline int eata2x_register_pci_driver(void) { return 0; } +static inline void eata2x_unregister_pci_driver(void) {} +#endif /* CONFIG_PCI */ -static int eata2x_detect(struct scsi_host_template *tpnt) +static int __init eata2x_platform_probe(struct platform_device *pdev) { - unsigned int j = 0, k; + int ret = -EIO; + struct resource *res; - tpnt->proc_name = "eata2x"; + res = platform_get_resource(pdev, IORESOURCE_IO, 0); + if (!res) + dev_warn(&pdev->dev, "failed to get base IOPORT.\n"); + else + ret = port_detect(res->start, &pdev->dev); - if (strlen(boot_options)) - option_setup(boot_options); + return ret >= 0 ? 0 : ret; +} -#if defined(MODULE) - /* io_port could have been modified when loading as a module */ - if (io_port[0] != SKIP) { - setup_done = 1; - io_port[MAX_INT_PARAM] = 0; - } -#endif +static int __exit eata2x_platform_remove(struct platform_device *pdev) +{ + port_remove(&pdev->dev); + return 0; +} + +static struct platform_driver eata2x_platform_driver = { + .remove = __exit_p(eata2x_platform_remove), + .driver = { + .name = "eata_plat", + .owner = THIS_MODULE, + }, +}; + +static int eata2x_probe_platform_devices(void) +{ + int k, count = 0, idx = 0, error = 0; + struct platform_driver *driver = &eata2x_platform_driver; + struct platform_device *pdev; + struct resource res = { + .flags = IORESOURCE_IO, + }; for (k = MAX_INT_PARAM; io_port[k]; k++) if (io_port[k] == SKIP) @@ -1574,25 +1637,86 @@ static int eata2x_detect(struct scsi_host_template *tpnt) if (!eisa_probe) io_port[k] = SKIP; } - - if (pci_probe) { - if (!setup_done) - add_pci_ports(); + for (k = 0; error == 0 && io_port[k]; k++) { + if (io_port[k] == SKIP) + continue; + res.start = io_port[k]; + res.end = io_port[k] + REGION_SIZE - 1; + pdev = platform_device_register_simple(driver->driver.name, + idx, &res, 1); + if (!pdev) + error = -ENOMEM; else - enable_pci_ports(); + eata2x_platform_devs[idx++] = pdev; + } + if (error == 0) { + error = platform_driver_probe(driver, eata2x_platform_probe); + if (error == 0) + eata2x_platform_driver_registered = true; + } + for (k = 0; k < idx; k++) { + pdev = eata2x_platform_devs[k]; + if (error || platform_get_drvdata(pdev) == NULL) { + platform_device_unregister(pdev); + eata2x_platform_devs[idx] = NULL; + } else { + count++; + } } - for (k = 0; io_port[k]; k++) { + return count; +} - if (io_port[k] == SKIP) - continue; +static void eata2x_remove_platform_devices(void) +{ + int idx; + struct platform_device *pdev; + + if (eata2x_platform_driver_registered) { + platform_driver_unregister(&eata2x_platform_driver); + for (idx = 0; idx < MAX_BOARDS; idx++) { + pdev = eata2x_platform_devs[idx]; + if (pdev) { + platform_device_unregister(pdev); + eata2x_platform_devs[idx] = NULL; + } + } + eata2x_platform_driver_registered = false; + } +} + +static int __init eata2x_init(void) +{ + int ret, count = 0; - if (j < MAX_BOARDS && port_detect(io_port[k], j, tpnt)) - j++; + if (strlen(boot_options)) + option_setup(boot_options); + + /* io_port could have been modified when loading as a module */ + if (config_enabled(MODULE) && io_port[0] != SKIP) { + setup_done = 1; + io_port[MAX_INT_PARAM] = 0; } - num_boards = j; - return j; + ret = eata2x_register_pci_driver(); + if (ret >= 0) { + count += ret; + ret = eata2x_probe_platform_devices(); + if (ret > 0) + count += ret; + } + if (ret >= 0 && count > 0) + return 0; + + eata2x_remove_platform_devices(); + eata2x_unregister_pci_driver(); + return ret < 0 ? ret : -ENODEV; +} + +static void __exit eata2x_exit(void) +{ + eata2x_remove_platform_devices(); + eata2x_unregister_pci_driver(); } static void map_dma(unsigned int i, struct hostdata *ha) @@ -2527,51 +2651,20 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost) return IRQ_NONE; } -static irqreturn_t do_interrupt_handler(int dummy, void *shap) +static irqreturn_t do_interrupt_handler(int dummy, void *data) { - struct Scsi_Host *shost; - unsigned int j; + struct Scsi_Host *shost = data; unsigned long spin_flags; irqreturn_t ret; - /* Check if the interrupt must be processed by this handler */ - if ((j = (unsigned int)((char *)shap - sha)) >= num_boards) - return IRQ_NONE; - shost = sh[j]; - spin_lock_irqsave(shost->host_lock, spin_flags); ret = ihdlr(shost); spin_unlock_irqrestore(shost->host_lock, spin_flags); return ret; } -static int eata2x_release(struct Scsi_Host *shost) -{ - struct hostdata *ha = (struct hostdata *)shost->hostdata; - unsigned int i; - - for (i = 0; i < shost->can_queue; i++) - kfree((&ha->cp[i])->sglist); - - for (i = 0; i < shost->can_queue; i++) - pci_unmap_single(ha->pdev, ha->cp[i].cp_dma_addr, - sizeof(struct mscp), PCI_DMA_BIDIRECTIONAL); - - if (ha->sp_cpu_addr) - pci_free_consistent(ha->pdev, sizeof(struct mssp), - ha->sp_cpu_addr, ha->sp_dma_addr); - - free_irq(shost->irq, &sha[ha->board_number]); - - if (shost->dma_channel != NO_DMA) - free_dma(shost->dma_channel); - - release_region(shost->io_port, shost->n_io_port); - scsi_unregister(shost); - return 0; -} - -#include "scsi_module.c" +module_init(eata2x_init); +module_exit(eata2x_exit); #ifndef MODULE __setup("eata=", option_setup); -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-23 5:24 ` Jiang Liu @ 2015-09-23 10:44 ` Arthur Marsh 2015-09-23 14:40 ` James Bottomley 0 siblings, 1 reply; 42+ messages in thread From: Arthur Marsh @ 2015-09-23 10:44 UTC (permalink / raw) To: Jiang Liu, James Bottomley Cc: Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 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 in the conversion. But according to my understanding, > it isn't related to the kexec/kdump failure. Could you please help > to test the attached new version? > Thanks! > Gerry > Thanks, the patch worked, I could successfully unload and reload the eata module, and perform a kexec reboot with the eata module loading successfully afterwards. Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-23 10:44 ` Arthur Marsh @ 2015-09-23 14:40 ` James Bottomley 2015-09-24 4:28 ` Jiang Liu 0 siblings, 1 reply; 42+ messages in thread From: James Bottomley @ 2015-09-23 14:40 UTC (permalink / raw) To: Arthur Marsh Cc: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 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 in the conversion. But according to my understanding, > > it isn't related to the kexec/kdump failure. Could you please help > > to test the attached new version? > > Thanks! > > Gerry > > > > Thanks, the patch worked, I could successfully unload and reload the > eata module, and perform a kexec reboot with the eata module loading > successfully afterwards. Great, so the bug was unconditionally unregistering the platform driver when it would fail to attach if none of the legacy IO ports were detected. I think the driver needs a bit of a tidy up. There's no need at all to use ida_get_simple(): the only reason for a dense array of numbers was for storing the hba private data in the array you got rid of; we can now simply use shost->host_no ... it's more useful anyway because the numbers match those SCSI is using. Also, if you insist on converting the printk's to dev warn, you no longer need to print out the driver name ... dev_printk already prints out the device and driver name as the prefix. The if (error == 0) is usually written as if (!error) but that's minor. Thanks for doing the conversion, James ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-23 14:40 ` James Bottomley @ 2015-09-24 4:28 ` Jiang Liu 2015-09-24 5:56 ` Arthur Marsh 0 siblings, 1 reply; 42+ messages in thread From: Jiang Liu @ 2015-09-24 4:28 UTC (permalink / raw) To: James Bottomley, Arthur Marsh Cc: Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 [-- Attachment #1: Type: text/plain, Size: 1538 bytes --] 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 in the conversion. But according to my understanding, >>> it isn't related to the kexec/kdump failure. Could you please help >>> to test the attached new version? >>> Thanks! >>> Gerry >>> >> >> Thanks, the patch worked, I could successfully unload and reload the >> eata module, and perform a kexec reboot with the eata module loading >> successfully afterwards. > > Great, so the bug was unconditionally unregistering the platform driver > when it would fail to attach if none of the legacy IO ports were > detected. > > I think the driver needs a bit of a tidy up. There's no need at all to > use ida_get_simple(): the only reason for a dense array of numbers was > for storing the hba private data in the array you got rid of; we can now > simply use shost->host_no ... it's more useful anyway because the > numbers match those SCSI is using. > > Also, if you insist on converting the printk's to dev warn, you no > longer need to print out the driver name ... dev_printk already prints > out the device and driver name as the prefix. > > The if (error == 0) is usually written as if (!error) but that's minor. Hi James, Thanks for review. How about the attached patch which addresses the three suggestions from you? Thanks! Gerry > > Thanks for doing the conversion, > > James > > [-- Attachment #2: 0001-.patch --] [-- Type: text/x-patch, Size: 16417 bytes --] >From aeb4859ff2c86434814cfc88f1a36481f3dcbc86 Mon Sep 17 00:00:00 2001 From: Jiang Liu <jiang.liu@linux.intel.com> Date: Thu, 24 Sep 2015 12:24:33 +0800 Subject: [PATCH] Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> --- drivers/scsi/eata.c | 234 +++++++++++++++++++++------------------------------ 1 file changed, 97 insertions(+), 137 deletions(-) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 11813a72c2e9..ceeba4d7b4ff 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -487,7 +487,6 @@ #include <linux/stat.h> #include <linux/pci.h> #include <linux/platform_device.h> -#include <linux/idr.h> #include <linux/init.h> #include <linux/ctype.h> #include <linux/spinlock.h> @@ -818,7 +817,6 @@ struct hostdata { unsigned int cp_stat[MAX_MAILBOXES]; /* FREE, IN_USE, LOCKED, IN_RESET */ unsigned int last_cp_used; /* Index of last mailbox used */ unsigned int iocount; /* Total i/o done for this board */ - int board_number; /* Number of this board */ char board_name[16]; /* Name of this board */ int in_reset; /* True if board is doing a reset */ int target_to[MAX_TARGET][MAX_CHANNEL]; /* N. of timeout errors on target */ @@ -835,7 +833,6 @@ struct hostdata { }; static const char *driver_name = "EATA"; -static DEFINE_IDA(eata2x_ida); static struct platform_device *eata2x_platform_devs[MAX_BOARDS]; static bool eata2x_platform_driver_registered; @@ -864,6 +861,10 @@ static unsigned long io_port[] = { #define DEV2H(x) be32_to_cpu(x) #define H2DEV16(x) cpu_to_be16(x) #define DEV2H16(x) be16_to_cpu(x) +#define dev_warn_on(dev, cond, fmt, ...) \ + if (cond) dev_warn(dev, fmt, ##__VA_ARGS__) +#define dev_info_on(dev, cond, fmt, ...) \ + if (cond) dev_info(dev, fmt, ##__VA_ARGS__) /* But transfer orientation from the 16 bit data register is Little Endian */ #define REG2H(x) le16_to_cpu(x) @@ -1029,47 +1030,32 @@ static int port_detect(unsigned long port_base, struct device *dev) unsigned char dma_channel_table[4] = { 5, 6, 7, 0 }; struct Scsi_Host *shost; struct hostdata *ha; - char name[16]; - int idx, ret = -ENODEV; - - idx = ida_simple_get(&eata2x_ida, 0, MAX_BOARDS, GFP_KERNEL); - if (idx < 0) { - ret = idx; - goto fail; - } + int ret = -ENODEV; shost = scsi_host_alloc(&driver_template, sizeof(struct hostdata)); if (shost == NULL) { - dev_warn(dev, "%s: unable to alloc host, detaching.\n", - driver_name); + dev_warn(dev, "unable to alloc host, detaching.\n"); ret = -ENOMEM; - goto freeid; + goto fail; } - sprintf(name, "%s%d", driver_name, idx); - if (!request_region(port_base, REGION_SIZE, driver_name)) { -#if defined(DEBUG_DETECT) - printk("%s: address 0x%03lx in use, skipping probe.\n", name, - port_base); -#endif + dev_warn_on(dev, config_enabled(DEBUG_DETECT), + "address 0x%03lx in use, skipping probe.\n", + port_base); goto freeshost; } if (do_dma(port_base, 0, READ_CONFIG_PIO)) { -#if defined(DEBUG_DETECT) - printk("%s: detect, do_dma failed at 0x%03lx.\n", name, - port_base); -#endif + dev_warn_on(dev, config_enabled(DEBUG_DETECT), + "detect, do_dma failed at 0x%03lx.\n", port_base); goto freelock; } /* Read the info structure */ if (read_pio(port_base, (ushort *) & info, (ushort *) & info.ipad[0])) { -#if defined(DEBUG_DETECT) - printk("%s: detect, read_pio failed at 0x%03lx.\n", name, - port_base); -#endif + dev_warn_on(dev, config_enabled(DEBUG_DETECT), + "detect, read_pio failed at 0x%03lx.\n", port_base); goto freelock; } @@ -1083,16 +1069,15 @@ static int port_detect(unsigned long port_base, struct device *dev) /* Check the controller "EATA" signature */ if (info.sign != EATA_SIG_BE) { -#if defined(DEBUG_DETECT) - printk("%s: signature 0x%04x discarded.\n", name, info.sign); -#endif + dev_warn_on(dev, config_enabled(DEBUG_DETECT), + "signature 0x%04x discarded.\n", info.sign); goto freelock; } if (info.data_len < EATA_2_0A_SIZE) { - printk - ("%s: config structure size (%d bytes) too short, detaching.\n", - name, info.data_len); + dev_warn(dev, + "config structure size (%d bytes) too short, detaching.\n", + info.data_len); goto freelock; } else if (info.data_len == EATA_2_0A_SIZE) protocol_rev = 'A'; @@ -1102,7 +1087,7 @@ static int port_detect(unsigned long port_base, struct device *dev) protocol_rev = 'C'; if (protocol_rev != 'A' && info.forcaddr) { - printk("%s: warning, port address has been forced.\n", name); + dev_warn(dev, "warning, port address has been forced.\n"); bus_type = "PCI"; is_pci = 1; subversion = ESA; @@ -1128,47 +1113,40 @@ static int port_detect(unsigned long port_base, struct device *dev) } if (!info.haaval || info.ata) { - printk - ("%s: address 0x%03lx, unusable %s board (%d%d), detaching.\n", - name, port_base, bus_type, info.haaval, info.ata); + dev_warn(dev, + "address 0x%03lx, unusable %s board (%d%d), detaching.\n", + port_base, bus_type, info.haaval, info.ata); goto freelock; } if (info.drqvld) { - if (subversion == ESA) - printk("%s: warning, weird %s board using DMA.\n", name, - bus_type); - + dev_warn_on(dev, subversion == ESA, + "warning, weird %s board using DMA.\n", bus_type); subversion = ISA; dma_channel = dma_channel_table[3 - info.drqx]; } else { - if (subversion == ISA) - printk("%s: warning, weird %s board not using DMA.\n", - name, bus_type); - + dev_warn_on(dev, subversion == ISA, + "warning, weird %s board not using DMA.\n", + bus_type); subversion = ESA; dma_channel = NO_DMA; } - if (!info.dmasup) - printk("%s: warning, DMA protocol support not asserted.\n", - name); + dev_warn_on(dev, !info.dmasup, + "warning, DMA protocol support not asserted.\n"); irq = info.irq; - - if (subversion == ESA && !info.irq_tr) - printk - ("%s: warning, LEVEL triggering is suggested for IRQ %u.\n", - name, irq); + dev_info_on(dev, subversion == ESA && !info.irq_tr, + "warning, LEVEL triggering is suggested for IRQ %u.\n", + irq); if (dev_is_pci(dev)) pdev = to_pci_dev(dev); - if (is_pci && !pdev) - dev_warn(dev, "%s: warning, failed to get pci_dev structure.\n", - name); + dev_warn_on(dev, is_pci && !pdev, + "warning, failed to get pci_dev structure.\n"); if (pdev && (irq != pdev->irq)) { - printk("%s: IRQ %u mapped to IO-APIC IRQ %u.\n", name, irq, - pdev->irq); + dev_info(dev, "IRQ %u mapped to IO-APIC IRQ %u.\n", + irq, pdev->irq); irq = pdev->irq; } @@ -1176,14 +1154,13 @@ static int port_detect(unsigned long port_base, struct device *dev) if (request_irq(irq, do_interrupt_handler, (subversion == ESA) ? IRQF_SHARED : 0, driver_name, shost)) { - printk("%s: unable to allocate IRQ %u, detaching.\n", name, - irq); + dev_warn(dev, "unable to allocate IRQ %u, detaching.\n", irq); goto freelock; } if (subversion == ISA && request_dma(dma_channel, driver_name)) { - printk("%s: unable to allocate DMA channel %u, detaching.\n", - name, dma_channel); + dev_warn(dev, "unable to allocate DMA channel %u, detaching.\n", + dma_channel); goto freeirq; } #if defined(FORCE_CONFIG) @@ -1195,9 +1172,8 @@ static int port_detect(unsigned long port_base, struct device *dev) &cf_dma_addr); if (!cf) { - printk - ("%s: config, pci_alloc_consistent failed, detaching.\n", - name); + dev_warn(dev, + "config, pci_alloc_consistent failed, detaching.\n"); goto freedma; } @@ -1206,9 +1182,8 @@ static int port_detect(unsigned long port_base, struct device *dev) cf->ocena = 1; if (do_dma(port_base, cf_dma_addr, SET_CONFIG_DMA)) { - printk - ("%s: busy timeout sending configuration, detaching.\n", - name); + dev_warn(dev, + "busy timeout sending configuration, detaching.\n"); pci_free_consistent(pdev, sizeof(struct eata_config), cf, cf_dma_addr); goto freedma; @@ -1234,7 +1209,6 @@ static int port_detect(unsigned long port_base, struct device *dev) ha->protocol_rev = protocol_rev; ha->is_pci = is_pci; ha->pdev = pdev; - ha->board_number = idx; if (ha->subversion == ESA) shost->unchecked_isa_dma = 0; @@ -1251,19 +1225,19 @@ static int port_detect(unsigned long port_base, struct device *dev) } - strcpy(ha->board_name, name); + sprintf(ha->board_name, "%s%d", driver_name, shost->host_no); /* DPT PM2012 does not allow to detect sg_tablesize correctly */ if (shost->sg_tablesize > MAX_SGLIST || shost->sg_tablesize < 2) { - printk("%s: detect, wrong n. of SG lists %d, fixed.\n", - ha->board_name, shost->sg_tablesize); + dev_info(dev, "detect, wrong n. of SG lists %d, fixed.\n", + shost->sg_tablesize); shost->sg_tablesize = MAX_SGLIST; } /* DPT PM2012 does not allow to detect can_queue correctly */ if (shost->can_queue > MAX_MAILBOXES || shost->can_queue < 2) { - printk("%s: detect, wrong n. of mbox %d, fixed.\n", - ha->board_name, shost->can_queue); + dev_info(dev, "detect, wrong n. of mbox %d, fixed.\n", + shost->can_queue); shost->can_queue = MAX_MAILBOXES; } @@ -1299,9 +1273,9 @@ static int port_detect(unsigned long port_base, struct device *dev) gfp_t gfp_mask = (shost->unchecked_isa_dma ? GFP_DMA : 0) | GFP_ATOMIC; ha->cp[i].sglist = kmalloc(sz, gfp_mask); if (!ha->cp[i].sglist) { - printk - ("%s: kmalloc SGlist failed, mbox %d, detaching.\n", - ha->board_name, i); + dev_err(dev, + "kmalloc SGlist failed, mbox %d, detaching.\n", + i); goto free_cp_dma_addr; } } @@ -1309,7 +1283,7 @@ static int port_detect(unsigned long port_base, struct device *dev) if (!(ha->sp_cpu_addr = pci_alloc_consistent(ha->pdev, sizeof(struct mssp), &ha->sp_dma_addr))) { - printk("%s: pci_alloc_consistent failed, detaching.\n", ha->board_name); + dev_err(dev, "pci_alloc_consistent failed, detaching.\n"); goto free_sglist; } @@ -1322,61 +1296,52 @@ static int port_detect(unsigned long port_base, struct device *dev) if (tag_mode != TAG_DISABLED && tag_mode != TAG_SIMPLE) tag_mode = TAG_ORDERED; - if (idx == 0) { - printk - ("EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio.\n"); - printk - ("%s config options -> tm:%d, lc:%c, mq:%d, rs:%c, et:%c, " - "ip:%c, ep:%c, pp:%c.\n", driver_name, tag_mode, - YESNO(linked_comm), max_queue_depth, YESNO(rev_scan), - YESNO(ext_tran), YESNO(isa_probe), YESNO(eisa_probe), - YESNO(pci_probe)); - } - - printk("%s: 2.0%c, %s 0x%03lx, IRQ %u, %s, SG %d, MB %d.\n", - ha->board_name, ha->protocol_rev, bus_type, - (unsigned long)shost->io_port, shost->irq, dma_name, - shost->sg_tablesize, shost->can_queue); - - if (shost->max_id > 8 || shost->max_lun > 8) - printk - ("%s: wide SCSI support enabled, max_id %u, max_lun %llu.\n", - ha->board_name, shost->max_id, shost->max_lun); + dev_info_once(dev, + "EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio.\n"); + dev_info_once(dev, + "config options -> tm:%d, lc:%c, mq:%d, rs:%c, et:%c, " + "ip:%c, ep:%c, pp:%c.\n", tag_mode, YESNO(linked_comm), + max_queue_depth, YESNO(rev_scan), YESNO(ext_tran), + YESNO(isa_probe), YESNO(eisa_probe), YESNO(pci_probe)); + + dev_info(dev, "2.0%c, %s 0x%03lx, IRQ %u, %s, SG %d, MB %d.\n", + ha->protocol_rev, bus_type, (unsigned long)shost->io_port, + shost->irq, dma_name, shost->sg_tablesize, shost->can_queue); + dev_info_on(dev, shost->max_id > 8 || shost->max_lun > 8, + "wide SCSI support enabled, max_id %u, max_lun %llu.\n", + shost->max_id, shost->max_lun); for (i = 0; i <= shost->max_channel; i++) - printk("%s: SCSI channel %u enabled, host target ID %d.\n", - ha->board_name, i, info.host_addr[3 - i]); - -#if defined(DEBUG_DETECT) - printk("%s: Vers. 0x%x, ocs %u, tar %u, trnxfr %u, more %u, SYNC 0x%x, " - "sec. %u, infol %d, cpl %d spl %d.\n", name, info.version, - info.ocsena, info.tarsup, info.trnxfr, info.morsup, info.sync, - info.second, info.data_len, info.cp_len, info.sp_len); - - if (protocol_rev == 'B' || protocol_rev == 'C') - printk("%s: isaena %u, forcaddr %u, max_id %u, max_chan %u, " - "large_sg %u, res1 %u.\n", name, info.isaena, - info.forcaddr, info.max_id, info.max_chan, info.large_sg, - info.res1); - - if (protocol_rev == 'C') - printk("%s: max_lun %u, m1 %u, idquest %u, pci %u, eisa %u, " - "raidnum %u.\n", name, info.max_lun, info.m1, - info.idquest, info.pci, info.eisa, info.raidnum); -#endif + dev_info(dev, "SCSI channel %u enabled, host target ID %d.\n", + i, info.host_addr[3 - i]); + + dev_info_on(dev, config_enabled(DEBUG_DETECT), + "Vers. 0x%x, ocs %u, tar %u, trnxfr %u, more %u, SYNC 0x%x, " + "sec. %u, infol %d, cpl %d spl %d.\n", info.version, + info.ocsena, info.tarsup, info.trnxfr, info.morsup, + info.sync, info.second, info.data_len, info.cp_len, + info.sp_len); + dev_info_on(dev, config_enabled(DEBUG_DETECT) && + (protocol_rev == 'B' || protocol_rev == 'C'), + "isaena %u, forcaddr %u, max_id %u, max_chan %u, " + "large_sg %u, res1 %u.\n", info.isaena, info.forcaddr, + info.max_id, info.max_chan, info.large_sg, info.res1); + dev_info_on(dev, config_enabled(DEBUG_DETECT) && protocol_rev == 'C', + "max_lun %u, m1 %u, idquest %u, pci %u, eisa %u, raidnum %u.\n", + info.max_lun, info.m1, info.idquest, info.pci, info.eisa, + info.raidnum); if (ha->pdev) { pci_set_master(ha->pdev); if (pci_set_dma_mask(ha->pdev, DMA_BIT_MASK(32))) - printk("%s: warning, pci_set_dma_mask failed.\n", - ha->board_name); + dev_warn(dev, "warning, pci_set_dma_mask failed.\n"); } ret = scsi_add_host(shost, NULL); if (!ret) { dev_set_drvdata(dev, shost); scsi_scan_host(shost); - return idx; + return 0; } if (ha->sp_cpu_addr) @@ -1400,8 +1365,6 @@ freelock: release_region(port_base, REGION_SIZE); freeshost: scsi_host_put(shost); -freeid: - ida_simple_remove(&eata2x_ida, idx); fail: return ret; } @@ -1429,7 +1392,6 @@ static void port_remove(struct device *dev) free_dma(shost->dma_channel); free_irq(shost->irq, shost); release_region(shost->io_port, shost->n_io_port); - ida_simple_remove(&eata2x_ida, ha->board_number); scsi_host_put(shost); } @@ -1513,19 +1475,17 @@ static int eata2x_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) unsigned long port_base; if (pci_enable_device(dev)) { - if (config_enabled(DEBUG_PCI_DETECT)) - pr_warn("%s: detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", - driver_name, dev->bus->number, dev->devfn); + dev_warn_on(&dev->dev, config_enabled(DEBUG_PCI_DETECT), + "detect, bus %d, devfn 0x%x, pci_enable_device failed.\n", + dev->bus->number, dev->devfn); goto out_error; } addr = pci_resource_start(dev, 0); port_base = addr + PCI_BASE_ADDRESS_0; - if (config_enabled(DEBUG_PCI_DETECT)) - dev_dbg(&dev->dev, - "%s: detect, bus %d, devfn 0x%x, addr 0x%x.\n", - driver_name, dev->bus->number, dev->devfn, - (unsigned int)addr); + dev_info_on(&dev->dev, config_enabled(DEBUG_PCI_DETECT), + "detect, bus %d, devfn 0x%x, addr 0x%x.\n", + dev->bus->number, dev->devfn, (unsigned int)addr); if (setup_done) { /* @@ -1576,7 +1536,7 @@ static int eata2x_register_pci_driver(void) return 0; if (!pci_register_driver(&eata2x_pci_driver)) return 1; - pr_warn("%s: failed to register PCI device driver.\n", driver_name); + pr_warn("failed to register PCI device driver.\n"); return -ENODEV; } @@ -1637,7 +1597,7 @@ static int eata2x_probe_platform_devices(void) if (!eisa_probe) io_port[k] = SKIP; } - for (k = 0; error == 0 && io_port[k]; k++) { + for (k = 0; !error && io_port[k]; k++) { if (io_port[k] == SKIP) continue; res.start = io_port[k]; @@ -1649,9 +1609,9 @@ static int eata2x_probe_platform_devices(void) else eata2x_platform_devs[idx++] = pdev; } - if (error == 0) { + if (!error) { error = platform_driver_probe(driver, eata2x_platform_probe); - if (error == 0) + if (!error) eata2x_platform_driver_registered = true; } for (k = 0; k < idx; k++) { -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-24 4:28 ` Jiang Liu @ 2015-09-24 5:56 ` Arthur Marsh 2015-09-26 6:27 ` Arthur Marsh 0 siblings, 1 reply; 42+ messages in thread From: Arthur Marsh @ 2015-09-24 5:56 UTC (permalink / raw) To: Jiang Liu, James Bottomley Cc: Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 Jiang Liu wrote on 24/09/15 13:58: > Hi James, > Thanks for review. How about the attached patch which addresses > the three suggestions from you? > Thanks! > Gerry I've applied the patch, rebuilt the kernel and verified that it allows unloading of the eata module and reloading it, as well as a successful kexec. Regards, Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-24 5:56 ` Arthur Marsh @ 2015-09-26 6:27 ` Arthur Marsh 2015-10-03 8:11 ` Jiang Liu 0 siblings, 1 reply; 42+ messages in thread From: Arthur Marsh @ 2015-09-26 6:27 UTC (permalink / raw) To: Jiang Liu, James Bottomley Cc: Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 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 suggestions from you? >> Thanks! >> Gerry > > I've applied the patch, rebuilt the kernel and verified that it allows > unloading of the eata module and reloading it, as well as a successful > kexec. > > Regards, > > Arthur. After some more thorough testing I've encountered an ongoing problem trying to use kexec with filesystems mounted with the eata driver. If I boot up and have the eata driver loaded but no filesystem check or mounting of filesystems on the disk attached to the DPT2044W controller, then attempt a kexec reboot I get the reboot pausing after the "synchronizing scsi cache" messages and getting the errors that I have included as pictures in my previous reports. If I do a normal boot which includes eata being loaded, the disk attached to the DPT2044W controller having its filesystems checked and mounted, then attempt a kexec reboot, I get the reboot pausing after the "synchronizing SCSI cache" messages as before. If I un-mount the filesystems on the disk attached to the DPT2044W controller after start-up and try a reboot I get the same problem. If I do modprobe -r eata after un-mounting the filesystems on the disk attached to the DPT2044W controller after a start-up kexec *works fine*. If I do: start-up un-mount filesystems on disk attached to DPT2044W controller modprobe -r eata modprobe eata fsck -a of filesystems on disk attached to DPT2044W controller mount filesystems then a kexec reboot works fine. I did some more experimenting and found a workaround: I was unable to blacklist the eata module but if I did: modprobe -r eata modprobe eata in a cron job before the fsck and mount commands then I could then perform a kexec reboot successfully. I also verified that if I did: modprobe -r eata after eata was loaded on boot-up without any fsck or mounting of filesystems on the disk attached to the DPT2044W controller using the eata the kexec reboot worked fine. In summary: if eata is loaded kexec reboot will fail unless a modprobe -r eata is done either manually or by a cron job. if a modprobe -r eata has been done, then even if I modprobe eata and fsck and mount filesystems, kexec reboot works. Any suggestions for further tests or checks welcome. Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-09-26 6:27 ` Arthur Marsh @ 2015-10-03 8:11 ` Jiang Liu 2015-10-03 11:14 ` Arthur Marsh 2015-10-05 8:29 ` Arthur Marsh 0 siblings, 2 replies; 42+ messages in thread From: Jiang Liu @ 2015-10-03 8:11 UTC (permalink / raw) To: Arthur Marsh, James Bottomley Cc: Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 [-- Attachment #1: Type: text/plain, Size: 1693 bytes --] 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 suggestions from you? >>> Thanks! >>> Gerry >> >> I've applied the patch, rebuilt the kernel and verified that it allows >> unloading of the eata module and reloading it, as well as a successful >> kexec. >> >> Regards, >> >> Arthur. > > After some more thorough testing I've encountered an ongoing problem > trying to use kexec with filesystems mounted with the eata driver. > > If I boot up and have the eata driver loaded but no filesystem check or > mounting of filesystems on the disk attached to the DPT2044W controller, > then attempt a kexec reboot I get the reboot pausing after the > "synchronizing scsi cache" messages and getting the errors that I have > included as pictures in my previous reports. > > If I do a normal boot which includes eata being loaded, the disk > attached to the DPT2044W controller having its filesystems checked and > mounted, then attempt a kexec reboot, I get the reboot pausing after the > "synchronizing SCSI cache" messages as before. > > If I un-mount the filesystems on the disk attached to the DPT2044W > controller after start-up and try a reboot I get the same problem. > > If I do modprobe -r eata after un-mounting the filesystems on the disk > attached to the DPT2044W controller after a start-up kexec *works fine*. Hi Arthur, The above results suggest that we need to shutdown eata controller for kexec. So could you please try to apply the attached patch upon the previous two patches? Thanks! Gerry [-- Attachment #2: 0001-eata-Implement-shutdown-callback-for-eata-driver.patch --] [-- Type: text/x-patch, Size: 1601 bytes --] >From 44a7ee9008951684a6ee1482a4445a64da61f54a Mon Sep 17 00:00:00 2001 From: Jiang Liu <jiang.liu@linux.intel.com> Date: Sat, 3 Oct 2015 15:57:39 +0800 Subject: [PATCH] eata: Implement shutdown callback for eata driver Implement shutdown callback for eata driver, so eata controllers will be put into ready state for kexec. Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> --- drivers/scsi/eata.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index ceeba4d7b4ff..f3ef9ac97646 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -1517,6 +1517,11 @@ static void eata2x_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); } +static void eata2x_pci_shutdown(struct pci_dev *pdev) +{ + port_remove(&pdev->dev); +} + static struct pci_device_id eata2x_tbl[] = { { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) }, { }, @@ -1528,6 +1533,7 @@ static struct pci_driver eata2x_pci_driver = { .id_table = eata2x_tbl, .probe = eata2x_pci_probe, .remove = eata2x_pci_remove, + .shutdown = eata2x_pci_shutdown, }; static int eata2x_register_pci_driver(void) @@ -1569,8 +1575,14 @@ static int __exit eata2x_platform_remove(struct platform_device *pdev) return 0; } +static void eata2x_platform_shutdown(struct platform_device *pdev) +{ + port_remove(&pdev->dev); +} + static struct platform_driver eata2x_platform_driver = { .remove = __exit_p(eata2x_platform_remove), + .shutdown = eata2x_platform_shutdown, .driver = { .name = "eata_plat", .owner = THIS_MODULE, -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-10-03 8:11 ` Jiang Liu @ 2015-10-03 11:14 ` Arthur Marsh 2015-10-05 8:29 ` Arthur Marsh 1 sibling, 0 replies; 42+ messages in thread From: Arthur Marsh @ 2015-10-03 11:14 UTC (permalink / raw) To: Jiang Liu, James Bottomley Cc: Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 Jiang Liu wrote on 03/10/15 17:41: > Hi Arthur, > The above results suggest that we need to shutdown eata > controller for kexec. So could you please try to apply the attached > patch upon the previous two patches? > Thanks! > Gerry > Hi, I still get kexec shutdown errors like this with the 3rd patch applied: http://www.users.on.net/~arthur.marsh/20151003566.jpg I can still unmount filesystems, modprobe -r eata and modprobe eata to get things into a state where a kexec reboot works. Regards, Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers 2015-10-03 8:11 ` Jiang Liu 2015-10-03 11:14 ` Arthur Marsh @ 2015-10-05 8:29 ` Arthur Marsh 1 sibling, 0 replies; 42+ messages in thread From: Arthur Marsh @ 2015-10-05 8:29 UTC (permalink / raw) To: Jiang Liu, James Bottomley Cc: Thomas Gleixner, Bjorn Helgaas, Hannes Reinecke, Ballabio Dario, Christoph Hellwig, Dario Ballabio, linux-kernel, linux-pci, linux-scsi, x86 Jiang Liu wrote on 03/10/15 17:41: >> If I do a normal boot which includes eata being loaded, the disk >> attached to the DPT2044W controller having its filesystems checked and >> mounted, then attempt a kexec reboot, I get the reboot pausing after the >> "synchronizing SCSI cache" messages as before. >> >> If I un-mount the filesystems on the disk attached to the DPT2044W >> controller after start-up and try a reboot I get the same problem. >> >> If I do modprobe -r eata after un-mounting the filesystems on the disk >> attached to the DPT2044W controller after a start-up kexec *works fine*. > Hi Arthur, > The above results suggest that we need to shutdown eata > controller for kexec. So could you please try to apply the attached > patch upon the previous two patches? > Thanks! > Gerry > To clarify, if the eata driver gets loaded once and stays loaded, at a kexec reboot attempt the "Synchronising SCSI cache" message is missing for the SCSI disk attached to the controller using the eata driver and eventually other error messages appear as seen in screen images that I have previously posted. If the eata driver is loaded, unloaded via modprobe -r, then reloaded, a kexec reboot shows 2 "Synchronising SCSI cache" messages for the SCSI disk attached to the controller using the eata driver and the kexec reboot is successful. Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver 2015-09-14 3:08 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu ` (2 preceding siblings ...) 2015-09-14 3:08 ` [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Jiang Liu @ 2015-09-14 16:01 ` Arthur Marsh 2015-09-15 2:31 ` Jiang Liu 3 siblings, 1 reply; 42+ messages in thread From: Arthur Marsh @ 2015-09-14 16:01 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas Cc: linux-kernel, linux-pci, linux-scsi, x86 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, but I have no change to test due to > limited knowledge about scsi subsystem and lacking of hardware for > tests. > So 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 +++++++++++++++++++++++++++------------------------ > 1 file changed, 125 insertions(+), 107 deletions(-) > With patches 1 and 2 applied, I get a successful boot with IRQ mapping: [ 1.147056] EATA0: IRQ 10 mapped to IO-APIC IRQ 17. [ 1.160404] EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio. [ 1.160469] EATA config options -> tm:1, lc:y, mq:16, rs:y, et:n, ip:n, ep:n, pp:y. [ 1.160541] EATA0: 2.0C, PCI 0xd890, IRQ 17, BMST, SG 122, MB 64. [ 1.160600] EATA0: wide SCSI support enabled, max_id 16, max_lun 8. [ 1.160658] EATA0: SCSI channel 0 enabled, host target ID 7. [ 1.161207] scsi host0: EATA/DMA 2.0x rev. 8.10.00 but I still get errors when trying to do a kexec reboot, see http://www.users.on.net/~arthur.marsh/20150915547.jpg roughly it reads (after the synchronising SCSI cache reboot messages) and a long period of a dark screen: sd 0:0:6:0: abort, mbox 63. EATA0: abort, mbox 63 is in use. sd 0:0:6:0: reset, enter. EATA0: reset, mbox 63 in reset. EATA0: reset, board reset done, enabling interrupts. EATA0: reset, interrupts disabled, loops 100469. EATA0: reset, mbox 63 locked, DID_RESET, done. EATA0: reset, exit, done. sd 0:0:6:0: qcomm, mbox 0, adapter busy, will start sd 0:0:6:0: abort, mbox 0. EATA0: abort, timeout error. sd 0:0:6:0: reset, enter. EATA0: reset, exit, timeout error. sd 0:0:6:0 Device offlinled - not ready after error recovery sd 0:0:6:0 rejecting I/O to offline device sd 0:0:6:0 rejecting I/O to offline device sd 0:0:6:0 [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK starting new kernel It would be great if this problem could be fixed. Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver 2015-09-14 16:01 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Arthur Marsh @ 2015-09-15 2:31 ` Jiang Liu 2015-09-15 7:19 ` Arthur Marsh 0 siblings, 1 reply; 42+ messages in thread From: Jiang Liu @ 2015-09-15 2:31 UTC (permalink / raw) To: Arthur Marsh, Thomas Gleixner, Bjorn Helgaas Cc: linux-kernel, linux-pci, linux-scsi, x86 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, but I have no change to test due to >> limited knowledge about scsi subsystem and lacking of hardware for >> tests. >> So 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 >> +++++++++++++++++++++++++++------------------------ >> 1 file changed, 125 insertions(+), 107 deletions(-) >> > > With patches 1 and 2 applied, I get a successful boot with IRQ mapping: > > [ 1.147056] EATA0: IRQ 10 mapped to IO-APIC IRQ 17. > [ 1.160404] EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio. > [ 1.160469] EATA config options -> tm:1, lc:y, mq:16, rs:y, et:n, > ip:n, ep:n, pp:y. > [ 1.160541] EATA0: 2.0C, PCI 0xd890, IRQ 17, BMST, SG 122, MB 64. > [ 1.160600] EATA0: wide SCSI support enabled, max_id 16, max_lun 8. > [ 1.160658] EATA0: SCSI channel 0 enabled, host target ID 7. > [ 1.161207] scsi host0: EATA/DMA 2.0x rev. 8.10.00 > > > but I still get errors when trying to do a kexec reboot, see > http://www.users.on.net/~arthur.marsh/20150915547.jpg > > roughly it reads (after the synchronising SCSI cache reboot messages) > and a long period of a dark screen: > > sd 0:0:6:0: abort, mbox 63. > EATA0: abort, mbox 63 is in use. > sd 0:0:6:0: reset, enter. > EATA0: reset, mbox 63 in reset. > EATA0: reset, board reset done, enabling interrupts. > EATA0: reset, interrupts disabled, loops 100469. > EATA0: reset, mbox 63 locked, DID_RESET, done. > EATA0: reset, exit, done. > sd 0:0:6:0: qcomm, mbox 0, adapter busy, will start > sd 0:0:6:0: abort, mbox 0. > EATA0: abort, timeout error. > sd 0:0:6:0: reset, enter. > EATA0: reset, exit, timeout error. > sd 0:0:6:0 Device offlinled - not ready after error recovery > sd 0:0:6:0 rejecting I/O to offline device > sd 0:0:6:0 rejecting I/O to offline device > sd 0:0:6:0 [sda] Synchronize Cache(10) failed: Result: > hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK > starting new kernel > > It would be great if this problem could be fixed. 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 to me. So could you please help to provide full dmesg logs with working kernels so I could try to figure out the order among scsi and PCI devices. It may be shutdown order related. Thanks! Gerry > > Arthur. > ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver 2015-09-15 2:31 ` Jiang Liu @ 2015-09-15 7:19 ` Arthur Marsh 2015-09-16 5:07 ` Jiang Liu 0 siblings, 1 reply; 42+ messages in thread From: Arthur Marsh @ 2015-09-15 7:19 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas Cc: linux-kernel, linux-pci, linux-scsi, x86 [-- Attachment #1: Type: text/plain, Size: 482 bytes --] 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 to me. So could you > please help to provide full dmesg logs with working kernels > so I could try to figure out the order among scsi and PCI devices. > It may be shutdown order related. > Thanks! > Gerry OK, attached is the dmesg output from the 4.2.0 kernel where kexec worked. Arthur. [-- Attachment #2: 20150915-4.2.0dmesg.txt --] [-- Type: text/plain, Size: 53620 bytes --] [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.2.0 (root@am64) (gcc version 5.1.1 20150711 (Debian 5.1.1-14) ) #1921 SMP PREEMPT Sun Sep 6 00:08:31 ACST 2015 [ 0.000000] x86/fpu: Legacy x87 FPU detected. [ 0.000000] x86/fpu: Using 'lazy' FPU context switches. [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable [ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003ffaffff] usable [ 0.000000] BIOS-e820: [mem 0x000000003ffb0000-0x000000003ffbdfff] ACPI data [ 0.000000] BIOS-e820: [mem 0x000000003ffbe000-0x000000003ffdffff] ACPI NVS [ 0.000000] BIOS-e820: [mem 0x000000003ffe0000-0x000000003fffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000ff780000-0x00000000ffffffff] reserved [ 0.000000] Notice: NX (Execute Disable) protection cannot be enabled: non-PAE kernel! [ 0.000000] SMBIOS 2.3 present. [ 0.000000] DMI: System manufacturer System Product Name/A8V-MX, BIOS 0503 12/06/2005 [ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable [ 0.000000] e820: last_pfn = 0x3ffb0 max_arch_pfn = 0x100000 [ 0.000000] MTRR default type: uncachable [ 0.000000] MTRR fixed ranges enabled: [ 0.000000] 00000-9FFFF write-back [ 0.000000] A0000-EFFFF uncachable [ 0.000000] F0000-FFFFF write-protect [ 0.000000] MTRR variable ranges enabled: [ 0.000000] 0 base 0000000000 mask FFC0000000 write-back [ 0.000000] 1 base 00D0000000 mask FFF0000000 write-combining [ 0.000000] 2 disabled [ 0.000000] 3 disabled [ 0.000000] 4 disabled [ 0.000000] 5 disabled [ 0.000000] 6 disabled [ 0.000000] 7 disabled [ 0.000000] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WC UC- WT [ 0.000000] found SMP MP-table at [mem 0x000ff780-0x000ff78f] mapped at [c00ff780] [ 0.000000] initial memory mapped: [mem 0x00000000-0x023fffff] [ 0.000000] Base memory trampoline at [c009b000] 9b000 size 16384 [ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff] [ 0.000000] [mem 0x00000000-0x000fffff] page 4k [ 0.000000] init_memory_mapping: [mem 0x35c00000-0x35ffffff] [ 0.000000] [mem 0x35c00000-0x35ffffff] page 4M [ 0.000000] init_memory_mapping: [mem 0x00100000-0x35bfffff] [ 0.000000] [mem 0x00100000-0x003fffff] page 4k [ 0.000000] [mem 0x00400000-0x35bfffff] page 4M [ 0.000000] init_memory_mapping: [mem 0x36000000-0x377fdfff] [ 0.000000] [mem 0x36000000-0x373fffff] page 4M [ 0.000000] [mem 0x37400000-0x377fdfff] page 4k [ 0.000000] BRK [0x0207d000, 0x0207dfff] PGTABLE [ 0.000000] RAMDISK: [mem 0x36140000-0x37097fff] [ 0.000000] ACPI: Early table checksum verification disabled [ 0.000000] ACPI: RSDP 0x00000000000FAC60 000024 (v02 ACPIAM) [ 0.000000] ACPI: XSDT 0x000000003FFB0100 00003C (v01 A M I OEMXSDT 12000506 MSFT 00000097) [ 0.000000] ACPI: FACP 0x000000003FFB0290 0000F4 (v03 A M I OEMFACP 12000506 MSFT 00000097) [ 0.000000] ACPI: DSDT 0x000000003FFB03F0 0046F0 (v01 A0347 A0347001 00000001 INTL 02002026) [ 0.000000] ACPI: FACS 0x000000003FFBE000 000040 [ 0.000000] ACPI: FACS 0x000000003FFBE000 000040 [ 0.000000] ACPI: APIC 0x000000003FFB0390 00005C (v01 A M I OEMAPIC 12000506 MSFT 00000097) [ 0.000000] ACPI: OEMB 0x000000003FFBE040 000046 (v01 A M I AMI_OEM 12000506 MSFT 00000097) [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] 135MB HIGHMEM available. [ 0.000000] 887MB LOWMEM available. [ 0.000000] mapped low ram: 0 - 377fe000 [ 0.000000] low ram: 0 - 377fe000 [ 0.000000] BRK [0x0207e000, 0x0207efff] PGTABLE [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff] [ 0.000000] Normal [mem 0x0000000001000000-0x00000000377fdfff] [ 0.000000] HighMem [mem 0x00000000377fe000-0x000000003ffaffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff] [ 0.000000] node 0: [mem 0x0000000000100000-0x000000003ffaffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000003ffaffff] [ 0.000000] On node 0 totalpages: 261966 [ 0.000000] DMA zone: 36 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 3998 pages, LIFO batch:0 [ 0.000000] Normal zone: 1962 pages used for memmap [ 0.000000] Normal zone: 223230 pages, LIFO batch:31 [ 0.000000] HighMem zone: 34738 pages, LIFO batch:7 [ 0.000000] Using APIC driver default [ 0.000000] ACPI: PM-Timer IO Port: 0x808 [ 0.000000] ACPI: Local APIC address 0xfee00000 [ 0.000000] IOAPIC[0]: apic_id 1, version 3, address 0xfec00000, GSI 0-23 [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl) [ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) [ 0.000000] ACPI: IRQ0 used by override. [ 0.000000] ACPI: IRQ9 used by override. [ 0.000000] Using ACPI (MADT) for SMP configuration information [ 0.000000] smpboot: Allowing 2 CPUs, 1 hotplug CPUs [ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff] [ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff] [ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000dffff] [ 0.000000] PM: Registered nosave memory: [mem 0x000e0000-0x000fffff] [ 0.000000] e820: [mem 0x40000000-0xdfffffff] available for PCI devices [ 0.000000] Booting paravirtualized kernel on bare hardware [ 0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns [ 0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:2 nr_node_ids:1 [ 0.000000] PERCPU: Embedded 17 pages/cpu @f5ef6000 s40744 r0 d28888 u69632 [ 0.000000] pcpu-alloc: s40744 r0 d28888 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 259968 [ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-4.2.0 root=UUID=96c96a61-8615-4715-86d0-09cb8c62638c ro [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Initializing CPU#0 [ 0.000000] Initializing HighMem for node 0 (000377fe:0003ffb0) [ 0.000000] Initializing Movable for node 0 (00000000:00000000) [ 0.000000] Memory: 1004544K/1047864K available (5537K kernel code, 538K rwdata, 2072K rodata, 520K init, 8144K bss, 43320K reserved, 0K cma-reserved, 138952K highmem) [ 0.000000] virtual kernel memory layout: fixmap : 0xfff16000 - 0xfffff000 ( 932 kB) pkmap : 0xff800000 - 0xffc00000 (4096 kB) vmalloc : 0xf7ffe000 - 0xff7fe000 ( 120 MB) lowmem : 0xc0000000 - 0xf77fe000 ( 887 MB) .init : 0xc17f8000 - 0xc187a000 ( 520 kB) .data : 0xc1568a7a - 0xc17f69c0 (2615 kB) .text : 0xc1000000 - 0xc1568a7a (5538 kB) [ 0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok. [ 0.000000] Running RCU self tests [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] RCU lockdep checking is enabled. [ 0.000000] Additional per-CPU info printed with stalls. [ 0.000000] Build-time adjustment of leaf fanout to 32. [ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2 [ 0.000000] NR_IRQS:2304 nr_irqs:440 16 [ 0.000000] CPU 0 irqstacks, hard=f5816000 soft=f5818000 [ 0.000000] spurious 8259A interrupt: IRQ7. [ 0.000000] Console: colour VGA+ 80x25 [ 0.000000] console [tty0] enabled [ 0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar [ 0.000000] ... MAX_LOCKDEP_SUBCLASSES: 8 [ 0.000000] ... MAX_LOCK_DEPTH: 48 [ 0.000000] ... MAX_LOCKDEP_KEYS: 8191 [ 0.000000] ... CLASSHASH_SIZE: 4096 [ 0.000000] ... MAX_LOCKDEP_ENTRIES: 32768 [ 0.000000] ... MAX_LOCKDEP_CHAINS: 65536 [ 0.000000] ... CHAINHASH_SIZE: 32768 [ 0.000000] memory used by lock dependency info: 4911 kB [ 0.000000] per task-struct memory footprint: 1344 bytes [ 0.000000] ------------------------ [ 0.000000] | Locking API testsuite: [ 0.000000] ---------------------------------------------------------------------------- [ 0.000000] | spin |wlock |rlock |mutex | wsem | rsem | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] A-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-B-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-B-C-C-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-C-A-B-C deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-B-C-C-D-D-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-C-D-B-D-D-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] A-B-C-D-B-C-D-A deadlock: ok | ok | ok | ok | ok | ok | [ 0.000000] double unlock: ok | ok | ok | ok | ok | ok | [ 0.000000] initialize held: ok | ok | ok | ok | ok | ok | [ 0.000000] bad unlock order: ok | ok | ok | ok | ok | ok | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] recursive read-lock: | ok | | ok | [ 0.000000] recursive read-lock #2: | ok | | ok | [ 0.000000] mixed read-write-lock: | ok | | ok | [ 0.000000] mixed write-read-lock: | ok | | ok | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] hard-irqs-on + irq-safe-A/12: ok | ok | ok | [ 0.000000] soft-irqs-on + irq-safe-A/12: ok | ok | ok | [ 0.000000] hard-irqs-on + irq-safe-A/21: ok | ok | ok | [ 0.000000] soft-irqs-on + irq-safe-A/21: ok | ok | ok | [ 0.000000] sirq-safe-A => hirqs-on/12: ok | ok | ok | [ 0.000000] sirq-safe-A => hirqs-on/21: ok | ok | ok | [ 0.000000] hard-safe-A + irqs-on/12: ok | ok | ok | [ 0.000000] soft-safe-A + irqs-on/12: ok | ok | ok | [ 0.000000] hard-safe-A + irqs-on/21: ok | ok | ok | [ 0.000000] soft-safe-A + irqs-on/21: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/123: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/123: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/132: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/132: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/213: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/213: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/231: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/231: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/312: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/312: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #1/321: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #1/321: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/123: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/123: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/132: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/132: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/213: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/213: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/231: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/231: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/312: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/312: ok | ok | ok | [ 0.000000] hard-safe-A + unsafe-B #2/321: ok | ok | ok | [ 0.000000] soft-safe-A + unsafe-B #2/321: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/123: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/123: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/132: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/132: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/213: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/213: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/231: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/231: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/312: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/312: ok | ok | ok | [ 0.000000] hard-irq lock-inversion/321: ok | ok | ok | [ 0.000000] soft-irq lock-inversion/321: ok | ok | ok | [ 0.000000] hard-irq read-recursion/123: ok | [ 0.000000] soft-irq read-recursion/123: ok | [ 0.000000] hard-irq read-recursion/132: ok | [ 0.000000] soft-irq read-recursion/132: ok | [ 0.000000] hard-irq read-recursion/213: ok | [ 0.000000] soft-irq read-recursion/213: ok | [ 0.000000] hard-irq read-recursion/231: ok | [ 0.000000] soft-irq read-recursion/231: ok | [ 0.000000] hard-irq read-recursion/312: ok | [ 0.000000] soft-irq read-recursion/312: ok | [ 0.000000] hard-irq read-recursion/321: ok | [ 0.000000] soft-irq read-recursion/321: ok | [ 0.000000] -------------------------------------------------------------------------- [ 0.000000] | Wound/wait tests | [ 0.000000] --------------------- [ 0.000000] ww api failures: ok | ok | ok | [ 0.000000] ww contexts mixing: ok | ok | [ 0.000000] finishing ww context: ok | ok | ok | ok | [ 0.000000] locking mismatches: ok | ok | ok | [ 0.000000] EDEADLK handling: ok | ok | ok | ok | ok | ok | ok | ok | ok | ok | [ 0.000000] spinlock nest unlocked: ok | [ 0.000000] ----------------------------------------------------- [ 0.000000] |block | try |context| [ 0.000000] ----------------------------------------------------- [ 0.000000] context: ok | ok | ok | [ 0.000000] try: ok | ok | ok | [ 0.000000] block: ok | ok | ok | [ 0.000000] spinlock: ok | ok | ok | [ 0.000000] ------------------------------------------------------- [ 0.000000] Good, all 253 testcases passed! | [ 0.000000] --------------------------------- [ 0.000000] tsc: Fast TSC calibration using PIT [ 0.000000] tsc: Detected 1999.920 MHz processor [ 0.000000] tsc: Marking TSC unstable due to TSCs unsynchronized [ 0.008119] Calibrating delay loop (skipped), value calculated using timer frequency.. 3999.84 BogoMIPS (lpj=7999680) [ 0.008234] pid_max: default: 32768 minimum: 301 [ 0.008344] ACPI: Core revision 20150619 [ 0.017932] ACPI: All ACPI Tables successfully acquired [ 0.018152] Security Framework initialized [ 0.018212] AppArmor: AppArmor disabled by boot time parameter [ 0.018270] Yama: becoming mindful. [ 0.018387] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.018448] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.019612] Initializing cgroup subsys blkio [ 0.019695] Initializing cgroup subsys memory [ 0.019773] Initializing cgroup subsys devices [ 0.019855] Initializing cgroup subsys freezer [ 0.019956] Initializing cgroup subsys net_cls [ 0.020009] Initializing cgroup subsys perf_event [ 0.020070] Initializing cgroup subsys net_prio [ 0.020164] mce: CPU supports 5 MCE banks [ 0.020229] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 4 [ 0.020287] Last level dTLB entries: 4KB 512, 2MB 8, 4MB 4, 1GB 0 [ 0.026283] Enabling APIC mode: Flat. Using 1 I/O APICs [ 0.026899] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0 [ 0.068000] smpboot: CPU0: AMD Athlon(tm) 64 Processor 3200+ (fam: 0f, model: 2f, stepping: 02) [ 0.068000] Performance Events: AMD PMU driver. [ 0.068000] ... version: 0 [ 0.068000] ... bit width: 48 [ 0.068000] ... generic registers: 4 [ 0.068000] ... value mask: 0000ffffffffffff [ 0.068000] ... max period: 00007fffffffffff [ 0.068000] ... fixed-purpose events: 0 [ 0.068000] ... event mask: 000000000000000f [ 0.076063] x86: Booted up 1 node, 1 CPUs [ 0.076124] smpboot: Total of 1 processors activated (3999.84 BogoMIPS) [ 0.076892] NMI watchdog: enabled on all CPUs, permanently consumes one hw-PMU counter. [ 0.077941] devtmpfs: initialized [ 0.080630] PM: Registering ACPI NVS region [mem 0x3ffbe000-0x3ffdffff] (139264 bytes) [ 0.080968] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.081242] pinctrl core: initialized pinctrl subsystem [ 0.082154] NET: Registered protocol family 16 [ 0.092043] cpuidle: using governor ladder [ 0.104019] cpuidle: using governor menu [ 0.104083] node 0 link 0: io port [1000, ffffff] [ 0.104088] TOM: 0000000040000000 aka 1024M [ 0.104146] node 0 link 0: mmio [a0000, bffff] [ 0.104151] node 0 link 0: mmio [40000000, ffffffff] [ 0.104155] bus: [bus 00-ff] on node 0 link 0 [ 0.104157] bus: 00 [io 0x0000-0xffff] [ 0.104160] bus: 00 [mem 0x000a0000-0x000bffff] [ 0.104162] bus: 00 [mem 0x40000000-0xffffffff] [ 0.104270] ACPI: bus type PCI registered [ 0.104328] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 [ 0.105298] PCI: PCI BIOS revision 3.00 entry at 0xf0031, last bus=5 [ 0.105356] PCI: Using configuration type 1 for base access [ 0.121547] ACPI: Added _OSI(Module Device) [ 0.121608] ACPI: Added _OSI(Processor Device) [ 0.121666] ACPI: Added _OSI(3.0 _SCP Extensions) [ 0.121723] ACPI: Added _OSI(Processor Aggregator Device) [ 0.129256] ACPI: Executed 1 blocks of module-level executable AML code [ 0.135364] ACPI: Interpreter enabled [ 0.135442] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20150619/hwxface-580) [ 0.135598] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S3_] (20150619/hwxface-580) [ 0.135801] ACPI: (supports S0 S1 S4 S5) [ 0.135858] ACPI: Using IOAPIC for interrupt routing [ 0.136009] PCI: Ignoring host bridge windows from ACPI; if necessary, use "pci=use_crs" and report a bug [ 0.160807] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) [ 0.160878] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI] [ 0.161020] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM [ 0.161275] acpi PNP0A03:00: host bridge window [io 0x0000-0x0cf7 window] (ignored) [ 0.161279] acpi PNP0A03:00: host bridge window [io 0x0d00-0xffff window] (ignored) [ 0.161283] acpi PNP0A03:00: host bridge window [mem 0x000a0000-0x000bffff window] (ignored) [ 0.161286] acpi PNP0A03:00: host bridge window [mem 0x000c0000-0x000dffff window] (ignored) [ 0.161289] acpi PNP0A03:00: host bridge window [mem 0x40000000-0xffffffff window] (ignored) [ 0.161293] PCI: root bus 00: hardware-probed resources [ 0.161343] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. [ 0.162451] PCI host bridge to bus 0000:00 [ 0.162510] pci_bus 0000:00: root bus resource [bus 00-ff] [ 0.162570] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] [ 0.162629] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff] [ 0.162690] pci_bus 0000:00: root bus resource [mem 0x40000000-0xffffffff] [ 0.162794] pci 0000:00:00.0: [1106:0204] type 00 class 0x060000 [ 0.162827] pci 0000:00:00.0: reg 0x10: [mem 0xd0000000-0xdfffffff pref] [ 0.163455] pci 0000:00:00.1: [1106:1204] type 00 class 0x060000 [ 0.163823] pci 0000:00:00.2: [1106:2204] type 00 class 0x060000 [ 0.164183] pci 0000:00:00.3: [1106:3204] type 00 class 0x060000 [ 0.164553] pci 0000:00:00.4: [1106:4204] type 00 class 0x060000 [ 0.164905] pci 0000:00:00.7: [1106:7204] type 00 class 0x060000 [ 0.165256] pci 0000:00:01.0: [1106:b188] type 01 class 0x060400 [ 0.165328] pci 0000:00:01.0: supports D1 [ 0.165638] pci 0000:00:0f.0: [1106:0571] type 00 class 0x01018a [ 0.165709] pci 0000:00:0f.0: reg 0x20: [io 0xfc00-0xfc0f] [ 0.165738] pci 0000:00:0f.0: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7] [ 0.165799] pci 0000:00:0f.0: legacy IDE quirk: reg 0x14: [io 0x03f6] [ 0.165859] pci 0000:00:0f.0: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177] [ 0.165919] pci 0000:00:0f.0: legacy IDE quirk: reg 0x1c: [io 0x0376] [ 0.166270] pci 0000:00:10.0: [1106:3038] type 00 class 0x0c0300 [ 0.166340] pci 0000:00:10.0: reg 0x20: [io 0xec00-0xec1f] [ 0.166391] pci 0000:00:10.0: supports D1 D2 [ 0.166394] pci 0000:00:10.0: PME# supported from D0 D1 D2 D3hot D3cold [ 0.166641] pci 0000:00:10.0: System wakeup disabled by ACPI [ 0.166881] pci 0000:00:10.1: [1106:3038] type 00 class 0x0c0300 [ 0.166951] pci 0000:00:10.1: reg 0x20: [io 0xe880-0xe89f] [ 0.167002] pci 0000:00:10.1: supports D1 D2 [ 0.167005] pci 0000:00:10.1: PME# supported from D0 D1 D2 D3hot D3cold [ 0.167165] pci 0000:00:10.1: System wakeup disabled by ACPI [ 0.167406] pci 0000:00:10.2: [1106:3038] type 00 class 0x0c0300 [ 0.167476] pci 0000:00:10.2: reg 0x20: [io 0xe800-0xe81f] [ 0.167528] pci 0000:00:10.2: supports D1 D2 [ 0.167531] pci 0000:00:10.2: PME# supported from D0 D1 D2 D3hot D3cold [ 0.167691] pci 0000:00:10.2: System wakeup disabled by ACPI [ 0.167934] pci 0000:00:10.3: [1106:3038] type 00 class 0x0c0300 [ 0.168014] pci 0000:00:10.3: reg 0x20: [io 0xe480-0xe49f] [ 0.168066] pci 0000:00:10.3: supports D1 D2 [ 0.168070] pci 0000:00:10.3: PME# supported from D0 D1 D2 D3hot D3cold [ 0.168226] pci 0000:00:10.3: System wakeup disabled by ACPI [ 0.168469] pci 0000:00:10.4: [1106:3104] type 00 class 0x0c0320 [ 0.168504] pci 0000:00:10.4: reg 0x10: [mem 0xff6ffc00-0xff6ffcff] [ 0.168599] pci 0000:00:10.4: supports D1 D2 [ 0.168602] pci 0000:00:10.4: PME# supported from D0 D1 D2 D3hot D3cold [ 0.168763] pci 0000:00:10.4: System wakeup disabled by ACPI [ 0.169008] pci 0000:00:11.0: [1106:3287] type 00 class 0x060100 [ 0.169429] pci 0000:00:11.7: [1106:287e] type 00 class 0x060000 [ 0.169793] pci 0000:00:12.0: [1106:3065] type 00 class 0x020000 [ 0.169825] pci 0000:00:12.0: reg 0x10: [io 0xe000-0xe0ff] [ 0.169838] pci 0000:00:12.0: reg 0x14: [mem 0xff6ff800-0xff6ff8ff] [ 0.169919] pci 0000:00:12.0: supports D1 D2 [ 0.169922] pci 0000:00:12.0: PME# supported from D0 D1 D2 D3hot D3cold [ 0.170081] pci 0000:00:12.0: System wakeup disabled by ACPI [ 0.170317] pci 0000:00:13.0: [1106:287b] type 01 class 0x060400 [ 0.170642] pci 0000:00:13.1: [1106:287a] type 01 class 0x060400 [ 0.170843] pci 0000:00:13.1: System wakeup disabled by ACPI [ 0.171097] pci 0000:00:18.0: [1022:1100] type 00 class 0x060000 [ 0.171401] pci 0000:00:18.1: [1022:1101] type 00 class 0x060000 [ 0.171699] pci 0000:00:18.2: [1022:1102] type 00 class 0x060000 [ 0.172006] pci 0000:00:18.3: [1022:1103] type 00 class 0x060000 [ 0.172437] pci 0000:01:00.0: [1002:4153] type 00 class 0x030000 [ 0.172467] pci 0000:01:00.0: reg 0x10: [mem 0xa0000000-0xafffffff pref] [ 0.172478] pci 0000:01:00.0: reg 0x14: [io 0xc000-0xc0ff] [ 0.172489] pci 0000:01:00.0: reg 0x18: [mem 0xff4f0000-0xff4fffff] [ 0.172523] pci 0000:01:00.0: reg 0x30: [mem 0xff4c0000-0xff4dffff pref] [ 0.172559] pci 0000:01:00.0: supports D1 D2 [ 0.172716] pci 0000:01:00.1: [1002:4173] type 00 class 0x038000 [ 0.172740] pci 0000:01:00.1: reg 0x10: [mem 0x90000000-0x9fffffff pref] [ 0.172751] pci 0000:01:00.1: reg 0x14: [mem 0xff4e0000-0xff4effff] [ 0.172820] pci 0000:01:00.1: supports D1 D2 [ 0.173014] pci 0000:00:01.0: PCI bridge to [bus 01] [ 0.173076] pci 0000:00:01.0: bridge window [io 0xa000-0xcfff] [ 0.173082] pci 0000:00:01.0: bridge window [mem 0xff400000-0xff4fffff] [ 0.173087] pci 0000:00:01.0: bridge window [mem 0x7ff00000-0xbfefffff pref] [ 0.173266] pci 0000:02:00.0: [1106:287c] type 01 class 0x060400 [ 0.173347] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold [ 0.173415] pci 0000:02:00.0: System wakeup disabled by ACPI [ 0.173653] pci 0000:02:00.1: [1106:287d] type 01 class 0x060400 [ 0.173733] pci 0000:02:00.1: PME# supported from D0 D3hot D3cold [ 0.173961] pci 0000:02:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force' [ 0.174087] pci 0000:00:13.0: PCI bridge to [bus 02-04] [ 0.174278] pci 0000:02:00.0: PCI bridge to [bus 03] [ 0.174476] pci 0000:02:00.1: PCI bridge to [bus 04] [ 0.174697] pci 0000:05:0b.0: [1102:0004] type 00 class 0x040100 [ 0.174728] pci 0000:05:0b.0: reg 0x10: [io 0xd800-0xd83f] [ 0.174823] pci 0000:05:0b.0: supports D1 D2 [ 0.174980] pci 0000:05:0b.1: [1102:7003] type 00 class 0x098000 [ 0.175009] pci 0000:05:0b.1: reg 0x10: [io 0xdc00-0xdc07] [ 0.175105] pci 0000:05:0b.1: supports D1 D2 [ 0.175260] pci 0000:05:0b.2: [1102:4001] type 00 class 0x0c0010 [ 0.175292] pci 0000:05:0b.2: reg 0x10: [mem 0xff5ef800-0xff5effff] [ 0.175305] pci 0000:05:0b.2: reg 0x14: [mem 0xff5e8000-0xff5ebfff] [ 0.175393] pci 0000:05:0b.2: supports D1 D2 [ 0.175396] pci 0000:05:0b.2: PME# supported from D0 D1 D2 D3hot [ 0.175596] pci 0000:05:0c.0: [1044:a400] type 00 class 0x010000 [ 0.175617] pci 0000:05:0c.0: reg 0x10: [io 0xd880-0xd89f] [ 0.175680] pci 0000:05:0c.0: reg 0x30: [mem 0xff5f0000-0xff5f7fff pref] [ 0.175882] pci 0000:00:13.1: PCI bridge to [bus 05] [ 0.175943] pci 0000:00:13.1: bridge window [io 0xd000-0xdfff] [ 0.175949] pci 0000:00:13.1: bridge window [mem 0xff500000-0xff5fffff] [ 0.175972] pci_bus 0000:00: on NUMA node 0 [ 0.178525] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11 12 14 15) [ 0.179250] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *10 11 12 14 15) [ 0.179954] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 10 11 12 14 15) [ 0.180665] ACPI: PCI Interrupt Link [LNKD] (IRQs *3 4 5 6 7 10 11 12 14 15) [ 0.181372] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled. [ 0.182171] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled. [ 0.182970] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled. [ 0.183770] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 11 12 14 15) *0, disabled. [ 0.185361] vgaarb: setting as boot device: PCI:0000:01:00.0 [ 0.185421] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=io+mem,locks=none [ 0.185497] vgaarb: loaded [ 0.185551] vgaarb: bridge control possible 0000:01:00.0 [ 0.185950] PCI: Using ACPI for IRQ routing [ 0.186011] PCI: pci_cache_line_size set to 64 bytes [ 0.186118] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff] [ 0.186131] e820: reserve RAM buffer [mem 0x3ffb0000-0x3fffffff] [ 0.187283] clocksource: Switched to clocksource refined-jiffies [ 0.206676] pnp: PnP ACPI init [ 0.207063] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) [ 0.208274] pnp 00:01: [dma 3] [ 0.208590] pnp 00:01: Plug and Play ACPI device, IDs PNP0401 (active) [ 0.208942] system 00:02: [io 0x0290-0x0297] has been reserved [ 0.209064] system 00:02: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.209503] system 00:03: [io 0x03e0-0x03e7] has been reserved [ 0.209564] system 00:03: [io 0x04d0-0x04d1] has been reserved [ 0.209625] system 00:03: [io 0x0800-0x087f] has been reserved [ 0.209685] system 00:03: [io 0x0400-0x041f] has been reserved [ 0.209746] system 00:03: [mem 0xff780000-0xffffffff] has been reserved [ 0.209808] system 00:03: [mem 0xf0000000-0xf7ffffff] has been reserved [ 0.209872] system 00:03: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.210339] system 00:04: [mem 0xfec00000-0xfec00fff] could not be reserved [ 0.210401] system 00:04: [mem 0xfee00000-0xfee00fff] has been reserved [ 0.210466] system 00:04: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.210655] pnp 00:05: Plug and Play ACPI device, IDs PNP0303 PNP030b (active) [ 0.210884] pnp 00:06: Plug and Play ACPI device, IDs PNP0f03 PNP0f13 (active) [ 0.211471] pnp 00:07: [dma 0 disabled] [ 0.211644] pnp 00:07: Plug and Play ACPI device, IDs PNP0501 (active) [ 0.211856] system 00:08: [mem 0xe0000000-0xefffffff] has been reserved [ 0.211921] system 00:08: Plug and Play ACPI device, IDs PNP0c02 (active) [ 0.212582] system 00:09: [mem 0x00000000-0x0009ffff] could not be reserved [ 0.212645] system 00:09: [mem 0x000e0000-0x000fffff] could not be reserved [ 0.212708] system 00:09: [mem 0x00100000-0x3fffffff] could not be reserved [ 0.212773] system 00:09: Plug and Play ACPI device, IDs PNP0c01 (active) [ 0.213102] pnp: PnP ACPI: found 10 devices [ 0.255771] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 0.255871] clocksource: Switched to clocksource acpi_pm [ 0.255970] pci 0000:00:01.0: PCI bridge to [bus 01] [ 0.255970] pci 0000:00:01.0: bridge window [io 0xa000-0xcfff] [ 0.255970] pci 0000:00:01.0: bridge window [mem 0xff400000-0xff4fffff] [ 0.255970] pci 0000:00:01.0: bridge window [mem 0x7ff00000-0xbfefffff pref] [ 0.255970] pci 0000:02:00.0: PCI bridge to [bus 03] [ 0.255970] pci 0000:02:00.1: PCI bridge to [bus 04] [ 0.255970] pci 0000:00:13.0: PCI bridge to [bus 02-04] [ 0.255970] pci 0000:00:13.1: PCI bridge to [bus 05] [ 0.255970] pci 0000:00:13.1: bridge window [io 0xd000-0xdfff] [ 0.255970] pci 0000:00:13.1: bridge window [mem 0xff500000-0xff5fffff] [ 0.255970] pci_bus 0000:00: resource 4 [io 0x0000-0xffff] [ 0.255970] pci_bus 0000:00: resource 5 [mem 0x000a0000-0x000bffff] [ 0.255970] pci_bus 0000:00: resource 6 [mem 0x40000000-0xffffffff] [ 0.255970] pci_bus 0000:01: resource 0 [io 0xa000-0xcfff] [ 0.255970] pci_bus 0000:01: resource 1 [mem 0xff400000-0xff4fffff] [ 0.255970] pci_bus 0000:01: resource 2 [mem 0x7ff00000-0xbfefffff pref] [ 0.255970] pci_bus 0000:05: resource 0 [io 0xd000-0xdfff] [ 0.255970] pci_bus 0000:05: resource 1 [mem 0xff500000-0xff5fffff] [ 0.255970] NET: Registered protocol family 2 [ 0.255970] TCP established hash table entries: 8192 (order: 3, 32768 bytes) [ 0.255970] TCP bind hash table entries: 8192 (order: 6, 294912 bytes) [ 0.255970] TCP: Hash tables configured (established 8192 bind 8192) [ 0.255970] UDP hash table entries: 512 (order: 3, 40960 bytes) [ 0.255970] UDP-Lite hash table entries: 512 (order: 3, 40960 bytes) [ 0.256242] NET: Registered protocol family 1 [ 0.256324] pci 0000:00:00.0: MSI quirk detected; MSI disabled [ 0.256405] pci 0000:00:01.0: disabling DAC on VIA PCI bridge [ 0.258314] pci 0000:01:00.0: Video device with shadowed ROM [ 0.258341] PCI: CLS 64 bytes, default 64 [ 0.258696] Unpacking initramfs... [ 0.766681] Freeing initrd memory: 15712K (f6140000 - f7098000) [ 0.766886] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x39a7c5a7520, max_idle_ns: 881590795718 ns [ 0.767010] microcode: AMD CPU family 0xf not supported [ 0.768216] futex hash table entries: 512 (order: 3, 32768 bytes) [ 0.768424] audit: initializing netlink subsys (disabled) [ 0.768581] audit: type=2000 audit(1442300665.767:1): initialized [ 0.769493] HugeTLB registered 4 MB page size, pre-allocated 0 pages [ 0.769931] VFS: Disk quotas dquot_6.6.0 [ 0.770021] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.772425] bounce: pool size: 64 pages [ 0.772519] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) [ 0.772761] io scheduler noop registered [ 0.772820] io scheduler deadline registered [ 0.772900] io scheduler cfq registered (default) [ 0.773533] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 0.773615] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 [ 0.773806] GHES: HEST is not enabled! [ 0.774022] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.794868] 00:07: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 0.796801] Linux agpgart interface v0.103 [ 0.796896] agpgart-amd64 0000:00:00.0: AGP bridge [1106/0204] [ 0.804131] agpgart-amd64 0000:00:00.0: AGP aperture is 256M @ 0xd0000000 [ 0.805006] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12 [ 0.805749] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 0.806270] serio: i8042 AUX port at 0x60,0x64 irq 12 [ 0.806878] mousedev: PS/2 mouse device common for all mice [ 0.807360] rtc_cmos 00:00: RTC can wake from S4 [ 0.807895] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0 [ 0.807994] rtc_cmos 00:00: alarms up to one year, y3k, 114 bytes nvram [ 0.808396] NET: Registered protocol family 10 [ 0.809222] mip6: Mobile IPv6 [ 0.809305] NET: Registered protocol family 17 [ 0.809372] mpls_gso: MPLS GSO support [ 0.809890] Using IPI No-Shortcut mode [ 0.810625] registered taskstats version 1 [ 0.810700] page_owner is disabled [ 0.812423] rtc_cmos 00:00: setting system clock to 2015-09-15 07:04:26 UTC (1442300666) [ 0.812752] PM: Hibernation image not present or could not be loaded. [ 0.813675] Freeing unused kernel memory: 520K (c17f8000 - c187a000) [ 0.813852] Write protecting the kernel text: 5540k [ 0.814055] Write protecting the kernel read-only data: 2076k [ 0.830935] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0 [ 0.909928] random: systemd-udevd urandom read with 0 bits of entropy available [ 1.053872] SCSI subsystem initialized [ 1.069152] via_rhine: v1.10-LK1.5.1 2010-10-09 Written by Donald Becker [ 1.070526] via-rhine 0000:00:12.0 eth0: VIA Rhine II at 0x1e000, 00:13:d4:cc:9b:57, IRQ 23 [ 1.071379] via-rhine 0000:00:12.0 eth0: MII PHY found at address 1, status 0x786d advertising 01e1 Link 45e1 [ 1.078148] ACPI: bus type USB registered [ 1.078329] usbcore: registered new interface driver usbfs [ 1.078519] usbcore: registered new interface driver hub [ 1.079347] usbcore: registered new device driver usb [ 1.081093] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 1.081767] uhci_hcd: USB Universal Host Controller Interface driver [ 1.082471] ehci-pci: EHCI PCI platform driver [ 1.085601] uhci_hcd 0000:00:10.0: UHCI Host Controller [ 1.086045] uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 1 [ 1.086222] uhci_hcd 0000:00:10.0: detected 2 ports [ 1.086412] uhci_hcd 0000:00:10.0: irq 20, io base 0x0000ec00 [ 1.091236] libata version 3.00 loaded. [ 1.092130] usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.092196] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.092266] usb usb1: Product: UHCI Host Controller [ 1.092324] usb usb1: Manufacturer: Linux 4.2.0 uhci_hcd [ 1.092382] usb usb1: SerialNumber: 0000:00:10.0 [ 1.098772] hub 1-0:1.0: USB hub found [ 1.100452] hub 1-0:1.0: 2 ports detected [ 1.112301] ehci-pci 0000:00:10.4: EHCI Host Controller [ 1.112427] ehci-pci 0000:00:10.4: new USB bus registered, assigned bus number 2 [ 1.112525] ehci-pci 0000:00:10.4: debug port 1 [ 1.112738] ehci-pci 0000:00:10.4: irq 22, io mem 0xff6ffc00 [ 1.124132] ehci-pci 0000:00:10.4: USB 2.0 started, EHCI 1.00 [ 1.124715] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 [ 1.124776] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.124847] usb usb2: Product: EHCI Host Controller [ 1.124904] usb usb2: Manufacturer: Linux 4.2.0 ehci_hcd [ 1.124962] usb usb2: SerialNumber: 0000:00:10.4 [ 1.125945] hub 2-0:1.0: USB hub found [ 1.126066] hub 2-0:1.0: 8 ports detected [ 1.140445] firewire_ohci 0000:05:0b.2: added OHCI v1.10 device as card 0, 4 IR + 8 IT contexts, quirks 0x2 [ 1.148438] hub 1-0:1.0: USB hub found [ 1.148579] hub 1-0:1.0: 2 ports detected [ 1.149310] pata_via 0000:00:0f.0: version 0.3.4 [ 1.158573] scsi host0: pata_via [ 1.166030] scsi host1: pata_via [ 1.166355] ata1: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xfc00 irq 14 [ 1.166416] ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0xfc08 irq 15 [ 1.167406] uhci_hcd 0000:00:10.1: UHCI Host Controller [ 1.167483] uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3 [ 1.167571] uhci_hcd 0000:00:10.1: detected 2 ports [ 1.167653] uhci_hcd 0000:00:10.1: irq 22, io base 0x0000e880 [ 1.167897] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.167958] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.168070] usb usb3: Product: UHCI Host Controller [ 1.168128] usb usb3: Manufacturer: Linux 4.2.0 uhci_hcd [ 1.168186] usb usb3: SerialNumber: 0000:00:10.1 [ 1.168800] hub 3-0:1.0: USB hub found [ 1.168881] hub 3-0:1.0: 2 ports detected [ 1.169667] uhci_hcd 0000:00:10.2: UHCI Host Controller [ 1.169743] uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4 [ 1.169820] uhci_hcd 0000:00:10.2: detected 2 ports [ 1.169923] uhci_hcd 0000:00:10.2: irq 21, io base 0x0000e800 [ 1.170245] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.170307] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.170377] usb usb4: Product: UHCI Host Controller [ 1.170435] usb usb4: Manufacturer: Linux 4.2.0 uhci_hcd [ 1.170493] usb usb4: SerialNumber: 0000:00:10.2 [ 1.172414] hub 4-0:1.0: USB hub found [ 1.173523] hub 4-0:1.0: 2 ports detected [ 1.175867] uhci_hcd 0000:00:10.3: UHCI Host Controller [ 1.175947] uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 5 [ 1.177104] uhci_hcd 0000:00:10.3: detected 2 ports [ 1.177216] uhci_hcd 0000:00:10.3: irq 23, io base 0x0000e480 [ 1.178399] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001 [ 1.178462] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.178533] usb usb5: Product: UHCI Host Controller [ 1.178590] usb usb5: Manufacturer: Linux 4.2.0 uhci_hcd [ 1.178648] usb usb5: SerialNumber: 0000:00:10.3 [ 1.180970] hub 5-0:1.0: USB hub found [ 1.181494] hub 5-0:1.0: 2 ports detected [ 1.337396] ata1.00: ATA-8: WDC WD3200AAJB-00WGA0, 00.02C01, max UDMA/100 [ 1.337463] ata1.00: 625142448 sectors, multi 16: LBA48 [ 1.344882] ata1.00: configured for UDMA/100 [ 1.345910] scsi 0:0:0:0: Direct-Access ATA WDC WD3200AAJB-0 2C01 PQ: 0 ANSI: 5 [ 1.436044] usb 2-5: new high-speed USB device number 2 using ehci-pci [ 1.520371] ata2.00: ATAPI: HL-DT-ST DVDRAM GSA-4163B, A103, max UDMA/33 [ 1.520820] ata2.01: HPA detected: current 66055248, native 78242976 [ 1.520881] ata2.01: ATA-6: SAMSUNG SP4002H, QU100-57, max UDMA/100 [ 1.520941] ata2.01: 66055248 sectors, multi 16: LBA [ 1.521004] ata2.01: limited to UDMA/33 due to 40-wire cable [ 1.536236] ata2.00: configured for UDMA/33 [ 1.552641] ata2.01: configured for UDMA/33 [ 1.572725] scsi 1:0:0:0: CD-ROM HL-DT-ST DVDRAM GSA-4163B A103 PQ: 0 ANSI: 5 [ 1.578632] usb 2-5: New USB device found, idVendor=13fe, idProduct=1e23 [ 1.578693] usb 2-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1.578754] usb 2-5: Product: STORE N GO [ 1.578811] usb 2-5: Manufacturer: Verbatim [ 1.578868] usb 2-5: SerialNumber: 078A18B40293 [ 1.586881] scsi 1:0:1:0: Direct-Access ATA SAMSUNG SP4002H 0-57 PQ: 0 ANSI: 5 [ 1.598401] sd 0:0:0:0: [sda] 625142448 512-byte logical blocks: (320 GB/298 GiB) [ 1.598652] sd 0:0:0:0: [sda] Write Protect is off [ 1.598711] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 [ 1.598785] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 1.608250] sr 1:0:0:0: [sr0] scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray [ 1.609374] cdrom: Uniform CD-ROM driver Revision: 3.20 [ 1.611298] sr 1:0:0:0: Attached scsi CD-ROM sr0 [ 1.613338] sd 1:0:1:0: [sdb] 66055248 512-byte logical blocks: (33.8 GB/31.4 GiB) [ 1.613586] sd 1:0:1:0: [sdb] Write Protect is off [ 1.613645] sd 1:0:1:0: [sdb] Mode Sense: 00 3a 00 00 [ 1.613718] sd 1:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 1.619737] uas: Unknown symbol usb_stor_adjust_quirks (err 0) [ 1.619850] uas: Unknown symbol usb_stor_sense_invalidCDB (err 0) [ 1.638093] sda: sda1 sda2 < sda5 sda6 sda7 > [ 1.641126] firewire_core 0000:05:0b.2: created device fw0: GUID 00023c0153000612, S400 [ 1.641572] sd 0:0:0:0: [sda] Attached SCSI disk [ 1.688148] sdb: sdb1 sdb2 < sdb5 sdb6 sdb7 > sdb3 [ 1.688638] sdb: p3 size 13333950 extends beyond EOD, enabling native capacity [ 1.690289] ata2: soft resetting link [ 1.860364] ata2.01: n_sectors mismatch 66055248 != 78242976 [ 1.860424] ata2.01: new n_sectors matches native, probably late HPA unlock, n_sectors updated [ 1.884239] ata2.00: configured for UDMA/33 [ 1.900634] ata2.01: configured for UDMA/33 [ 1.902837] ata2: EH complete [ 1.914087] sd 1:0:1:0: [sdb] 78242976 512-byte logical blocks: (40.0 GB/37.3 GiB) [ 1.914683] sdb: detected capacity change from 33820286976 to 40060403712 [ 1.988603] sdb: sdb1 sdb2 < sdb5 sdb6 sdb7 > sdb3 [ 2.006504] sd 1:0:1:0: [sdb] Attached SCSI disk [ 2.824751] random: nonblocking pool is initialized [ 4.064517] floppy0: no floppy controllers found [ 4.094169] PM: Starting manual resume from disk [ 4.094253] PM: Hibernation image partition 8:5 present [ 4.094256] PM: Looking for hibernation image. [ 4.095037] PM: Image not found (code -22) [ 4.095041] PM: Hibernation image not present or could not be loaded. [ 4.102678] PM: Marking nosave pages: [mem 0x00000000-0x00000fff] [ 4.102686] PM: Marking nosave pages: [mem 0x0009f000-0x000fffff] [ 4.102690] PM: Basic memory bitmaps created [ 4.103346] PM: Basic memory bitmaps freed [ 4.464454] EXT4-fs (sda7): mounting ext3 file system using the ext4 subsystem [ 4.510296] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null) [ 8.684433] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2 [ 8.684519] ACPI: Sleep Button [SLPB] [ 8.684788] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input3 [ 8.684863] ACPI: Power Button [PWRB] [ 8.685121] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input4 [ 8.685194] ACPI: Power Button [PWRF] [ 8.709959] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4 [ 8.862429] parport_pc 00:01: reported by Plug and Play ACPI [ 8.862838] parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE,EPP] [ 8.969749] [drm] Initialized drm 1.1.0 20060810 [ 8.996873] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 8.997091] sr 1:0:0:0: Attached scsi generic sg1 type 5 [ 8.997288] sd 1:0:1:0: Attached scsi generic sg2 type 0 [ 9.308279] gameport gameport0: EMU10K1 is pci0000:05:0b.1/gameport0, io 0xdc00, speed 1201kHz [ 9.570108] EATA0: IRQ 10 mapped to IO-APIC IRQ 17. [ 9.571578] EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio. [ 9.571639] EATA config options -> tm:1, lc:y, mq:16, rs:y, et:n, ip:n, ep:n, pp:y. [ 9.571710] EATA0: 2.0C, PCI 0xd890, IRQ 17, BMST, SG 122, MB 64. [ 9.571769] EATA0: wide SCSI support enabled, max_id 16, max_lun 8. [ 9.571828] EATA0: SCSI channel 0 enabled, host target ID 7. [ 9.571892] scsi host2: EATA/DMA 2.0x rev. 8.10.00 [ 9.636442] [drm] radeon kernel modesetting enabled. [ 9.641905] [drm] initializing kernel modesetting (RV350 0x1002:0x4153 0x1458:0x4050). [ 9.642049] [drm] register mmio base: 0xFF4F0000 [ 9.642106] [drm] register mmio size: 65536 [ 9.643298] agpgart-amd64 0000:00:00.0: AGP 3.0 bridge [ 9.643375] agpgart-amd64 0000:00:00.0: putting AGP V3 device into 8x mode [ 9.643514] radeon 0000:01:00.0: putting AGP V3 device into 8x mode [ 9.643609] radeon 0000:01:00.0: GTT: 256M 0xD0000000 - 0xDFFFFFFF [ 9.643670] [drm] Generation 2 PCI interface, using max accessible memory [ 9.643731] radeon 0000:01:00.0: VRAM: 256M 0x00000000A0000000 - 0x00000000AFFFFFFF (256M used) [ 9.643843] [drm] Detected VRAM RAM=256M, BAR=256M [ 9.643900] [drm] RAM width 128bits DDR [ 9.646121] [TTM] Zone kernel: Available graphics memory: 440912 kiB [ 9.646184] [TTM] Zone highmem: Available graphics memory: 510388 kiB [ 9.646242] [TTM] Initializing pool allocator [ 9.646344] [TTM] Initializing DMA pool allocator [ 9.647367] [drm] radeon: 256M of VRAM memory ready [ 9.647426] [drm] radeon: 256M of GTT memory ready. [ 9.647634] [drm] radeon: 1 quad pipes, 1 Z pipes initialized. [ 9.650518] radeon 0000:01:00.0: WB disabled [ 9.650586] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x00000000d0000000 and cpu addr 0xf802a000 [ 9.650666] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 9.650725] [drm] Driver supports precise vblank timestamp query. [ 9.650969] [drm] radeon: irq initialized. [ 9.651078] [drm] Loading R300 Microcode [ 9.789084] [drm] radeon: ring at 0x00000000D0001000 [ 9.789267] [drm] ring test succeeded in 0 usecs [ 9.789954] [drm] ib test succeeded in 0 usecs [ 9.795984] [drm] Radeon Display Connectors [ 9.796067] [drm] Connector 0: [ 9.796122] [drm] VGA-1 [ 9.796177] [drm] DDC: 0x60 0x60 0x60 0x60 0x60 0x60 0x60 0x60 [ 9.796235] [drm] Encoders: [ 9.796290] [drm] CRT1: INTERNAL_DAC1 [ 9.796346] [drm] Connector 1: [ 9.796400] [drm] DVI-I-1 [ 9.796454] [drm] HPD1 [ 9.796509] [drm] DDC: 0x64 0x64 0x64 0x64 0x64 0x64 0x64 0x64 [ 9.796567] [drm] Encoders: [ 9.796621] [drm] CRT2: INTERNAL_DAC2 [ 9.796677] [drm] DFP1: INTERNAL_TMDS1 [ 9.796733] [drm] Connector 2: [ 9.796787] [drm] SVIDEO-1 [ 9.796841] [drm] Encoders: [ 9.796895] [drm] TV1: INTERNAL_DAC2 [ 10.014854] [drm] fb mappable at 0xA0040000 [ 10.014917] [drm] vram apper at 0xA0000000 [ 10.014973] [drm] size 8294400 [ 10.015028] [drm] fb depth is 24 [ 10.015083] [drm] pitch is 7680 [ 10.018043] fbcon: radeondrmfb (fb0) is primary device [ 10.099478] EDAC MC: Ver: 3.0.0 [ 10.139774] MCE: In-kernel MCE decoding enabled. [ 10.208686] snd_emu10k1 0000:05:0b.0: Installing spdif_bug patch: SB Audigy 2 ZS [SB0350] [ 10.280827] AMD64 EDAC driver v3.4.0 [ 10.280892] EDAC amd64: DRAM ECC enabled. [ 10.280896] EDAC amd64: K8 revE or earlier detected (node 0). [ 10.282212] EDAC MC0: Giving out device to module amd64_edac controller K8: DEV 0000:00:18.2 (INTERRUPT) [ 10.282513] EDAC PCI0: Giving out device to module amd64_edac controller EDAC PCI controller: DEV 0000:00:18.2 (POLLED) [ 10.282514] EDAC amd64: amd64_edac on 32-bit is unsupported. USE AT YOUR OWN RISK! [ 10.287091] Console: switching to colour frame buffer device 240x67 [ 10.396939] input: PC Speaker as /devices/platform/pcspkr/input/input5 [ 10.501817] Error: Driver 'pcspkr' is already registered, aborting... [ 10.513631] powernow_k8: fid 0xc (2000 MHz), vid 0x6 [ 10.513632] powernow_k8: fid 0xa (1800 MHz), vid 0x8 [ 10.513633] powernow_k8: fid 0x2 (1000 MHz), vid 0x12 [ 10.514460] powernow_k8: Found 1 AMD Athlon(tm) 64 Processor 3200+ (1 cpu cores) (version 2.20.00) [ 10.563490] radeon 0000:01:00.0: fb0: radeondrmfb frame buffer device [ 10.573944] radeon 0000:01:00.0: registered panic notifier [ 10.580133] [drm] Initialized radeon 2.43.0 20080528 for 0000:01:00.0 on minor 0 [ 10.782436] ppdev: user-space parallel port driver [ 11.106463] scsi 2:0:6:0: Direct-Access IBM DCAS-34330W S65A PQ: 0 ANSI: 2 [ 11.107318] scsi 2:0:6:0: cmds/lun 16, sorted, simple tags. [ 11.405959] usb-storage 2-5:1.0: USB Mass Storage device detected [ 11.416151] scsi host3: usb-storage 2-5:1.0 [ 11.417424] usbcore: registered new interface driver usb-storage [ 11.451990] usbcore: registered new interface driver uas [ 11.848832] floppy0: no floppy controllers found [ 11.929217] input: ImPS/2 Generic Wheel Mouse as /devices/platform/i8042/serio1/input/input6 [ 12.419780] scsi 3:0:0:0: Direct-Access Verbatim STORE N GO 5.00 PQ: 0 ANSI: 0 CCS [ 13.148261] sd 2:0:6:0: Attached scsi generic sg3 type 0 [ 13.148801] sd 2:0:6:0: [sdc] 8466688 512-byte logical blocks: (4.33 GB/4.03 GiB) [ 13.154101] sd 3:0:0:0: Attached scsi generic sg4 type 0 [ 13.156748] sd 3:0:0:0: [sdd] 3911680 512-byte logical blocks: (2.00 GB/1.86 GiB) [ 13.158116] sd 3:0:0:0: [sdd] Write Protect is off [ 13.158556] sd 3:0:0:0: [sdd] Mode Sense: 23 00 00 00 [ 13.159238] sd 3:0:0:0: [sdd] No Caching mode page found [ 13.159723] sd 3:0:0:0: [sdd] Assuming drive cache: write through [ 13.170121] sdd: sdd1 [ 13.174619] sd 3:0:0:0: [sdd] Attached SCSI removable disk [ 13.189076] sd 2:0:6:0: [sdc] Write Protect is off [ 13.189524] sd 2:0:6:0: [sdc] Mode Sense: b3 00 00 08 [ 13.209963] sd 2:0:6:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 13.291310] sdc: sdc1 sdc2 < sdc5 > [ 13.358301] sd 2:0:6:0: [sdc] Attached SCSI disk [ 15.397117] ata1.00: configured for UDMA/100 [ 15.422022] ata1: EH complete [ 15.516276] ata2.00: configured for UDMA/33 [ 15.552254] ata2.01: configured for UDMA/33 [ 15.589979] ata2: EH complete [ 16.715752] Adding 2200868k swap on /dev/sda5. Priority:-1 extents:1 across:2200868k [ 16.884970] EXT4-fs (sda7): re-mounted. Opts: (null) [ 17.440147] EXT4-fs (sda7): re-mounted. Opts: errors=remount-ro,data=ordered [ 18.483892] lp0: using parport0 (interrupt-driven). [ 18.686394] Loading iSCSI transport class v2.0-870. [ 18.795807] iscsi: registered transport (tcp) [ 18.959804] iscsi: registered transport (iser) [ 19.082932] fuse init (API version 7.23) [ 19.249050] tun: Universal TUN/TAP device driver, 1.6 [ 19.279558] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> [ 19.349866] w83627ehf: Found W83627EHG chip at 0x290 [ 19.380951] ACPI Warning: SystemIO range 0x0000000000000295-0x0000000000000296 conflicts with OpRegion 0x0000000000000290-0x0000000000000299 (\_SB_.PCI0.SBRG.SIOR.HWRE) (20150619/utaddress-254) [ 19.411023] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver [ 50.464824] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem [ 50.515884] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) [ 50.592678] FAT-fs (sda6): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! [ 50.672241] FAT-fs (sdd1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! [ 63.158660] Bluetooth: Core ver 2.20 [ 63.191435] NET: Registered protocol family 31 [ 63.220495] Bluetooth: HCI device and connection manager initialized [ 63.248462] Bluetooth: HCI socket layer initialized [ 63.277868] Bluetooth: L2CAP socket layer initialized [ 63.306857] Bluetooth: SCO socket layer initialized [ 63.366128] Netfilter messages via NETLINK v0.30. [ 63.647362] Process accounting resumed [ 67.352379] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 67.377345] Bluetooth: BNEP filters: protocol multicast [ 67.403262] Bluetooth: BNEP socket layer initialized [ 77.449236] nfc: nfc_init: NFC Core ver 0.1 [ 77.449511] NET: Registered protocol family 39 ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver 2015-09-15 7:19 ` Arthur Marsh @ 2015-09-16 5:07 ` Jiang Liu 2015-09-16 7:37 ` Arthur Marsh 0 siblings, 1 reply; 42+ messages in thread From: Jiang Liu @ 2015-09-16 5:07 UTC (permalink / raw) To: Arthur Marsh, Thomas Gleixner, Bjorn Helgaas Cc: linux-kernel, linux-pci, linux-scsi, x86 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 to me. So could you >> please help to provide full dmesg logs with working kernels >> so I could try to figure out the order among scsi and PCI devices. >> It may be shutdown order related. >> Thanks! >> Gerry > > OK, attached is the dmesg output from the 4.2.0 kernel where kexec worked. Hi Arthur, Could you please also help to capture the log messages of kexec, I need to those log messages to figure out the order to shutdown PCI devices and scsi devices during kexec. Thanks! Gerry ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver 2015-09-16 5:07 ` Jiang Liu @ 2015-09-16 7:37 ` Arthur Marsh 2015-09-16 8:21 ` Jiang Liu 0 siblings, 1 reply; 42+ messages in thread From: Arthur Marsh @ 2015-09-16 7:37 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas Cc: linux-kernel, linux-pci, linux-scsi, x86 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 your help to test the patches. That's >>> a good sign we have moved forward a bit:) >>> For kexec, it's always challenging to me. So could you >>> please help to provide full dmesg logs with working kernels >>> so I could try to figure out the order among scsi and PCI devices. >>> It may be shutdown order related. >>> Thanks! >>> Gerry >> >> OK, attached is the dmesg output from the 4.2.0 kernel where kexec worked. > Hi Arthur, > Could you please also help to capture the log messages > of kexec, I need to those log messages to figure out the order > to shutdown PCI devices and scsi devices during kexec. > Thanks! > Gerry > How would I capture the log messages of kexec (assuming that there are any, I couldn't see from the manual page entries and haven't seen anything beyond the screen images that I have already sent you)? Regards, Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver 2015-09-16 7:37 ` Arthur Marsh @ 2015-09-16 8:21 ` Jiang Liu 2015-09-16 11:29 ` Arthur Marsh 0 siblings, 1 reply; 42+ messages in thread From: Jiang Liu @ 2015-09-16 8:21 UTC (permalink / raw) To: Arthur Marsh, Thomas Gleixner, Bjorn Helgaas Cc: linux-kernel, linux-pci, linux-scsi, x86 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 your help to test the patches. That's >>>> a good sign we have moved forward a bit:) >>>> For kexec, it's always challenging to me. So could you >>>> please help to provide full dmesg logs with working kernels >>>> so I could try to figure out the order among scsi and PCI devices. >>>> It may be shutdown order related. >>>> Thanks! >>>> Gerry >>> >>> OK, attached is the dmesg output from the 4.2.0 kernel where kexec >>> worked. >> Hi Arthur, >> Could you please also help to capture the log messages >> of kexec, I need to those log messages to figure out the order >> to shutdown PCI devices and scsi devices during kexec. >> Thanks! >> Gerry >> > > How would I capture the log messages of kexec (assuming that there are > any, I couldn't see from the manual page entries and haven't seen > anything beyond the screen images that I have already sent you)? Hi Arthur, It would be great if we could capture the text as in the picture posted by you at: http://www.users.on.net/~arthur.marsh/20150915547.jpg I guess a serial console could help us to capture those log messages. To use serial console, we need to setup serial cable, configure grub and kernel to use serial port as console. Thanks! Gerry > > Regards, > > Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix 0/3] Convert eata driver to a normal PCI device driver 2015-09-16 8:21 ` Jiang Liu @ 2015-09-16 11:29 ` Arthur Marsh 0 siblings, 0 replies; 42+ messages in thread From: Arthur Marsh @ 2015-09-16 11:29 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas Cc: linux-kernel, linux-pci, linux-scsi, x86 Jiang Liu wrote on 16/09/15 17:51: > Hi Arthur, > It would be great if we could capture the text as in the > picture posted by you at: > http://www.users.on.net/~arthur.marsh/20150915547.jpg > I guess a serial console could help us to capture those > log messages. To use serial console, we need to setup serial cable, > configure grub and kernel to use serial port as console. > Thanks! > Gerry > >> >> Regards, >> >> Arthur. > I've already included the text of what appeaered in the image above: sd 0:0:6:0: abort, mbox 63. EATA0: abort, mbox 63 is in use. sd 0:0:6:0: reset, enter. EATA0: reset, mbox 63 in reset. EATA0: reset, board reset done, enabling interrupts. EATA0: reset, interrupts disabled, loops 100469. EATA0: reset, mbox 63 locked, DID_RESET, done. EATA0: reset, exit, done. sd 0:0:6:0: qcomm, mbox 0, adapter busy, will start sd 0:0:6:0: abort, mbox 0. EATA0: abort, timeout error. sd 0:0:6:0: reset, enter. EATA0: reset, exit, timeout error. sd 0:0:6:0 Device offlinled - not ready after error recovery sd 0:0:6:0 rejecting I/O to offline device sd 0:0:6:0 rejecting I/O to offline device sd 0:0:6:0 [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK starting new kernel As mentioned previously this occurred after the normal Synchronizing SCSI cache messages. I don't think that there is anything else that gets sent to the console. Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers 2015-09-08 7:26 ` [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Jiang Liu 2015-09-08 9:03 ` Arthur Marsh 2015-09-08 16:27 ` Bjorn Helgaas @ 2015-09-09 19:04 ` Arthur Marsh 2 siblings, 0 replies; 42+ messages in thread From: Arthur Marsh @ 2015-09-09 19:04 UTC (permalink / raw) To: Jiang Liu, Thomas Gleixner, Bjorn Helgaas, Ingo Molnar, H. Peter Anvin, x86 Cc: linux-kernel, linux-pci, linux-scsi Jiang Liu wrote on 08/09/15 16:56: > Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()") changes the way to allocate PCI legacy IRQ > for PCI devices on x86 platforms. Instead of allocating PCI legacy > IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() > will be called by pci_device_probe() to allocate PCI legacy IRQs > when binding PCI drivers to PCI devices. > > But some device drivers, such as eata, directly access PCI devices > without implementing corresponding PCI drivers, so pcibios_alloc_irq() > won't be called for those PCI devices and wrong IRQ number may be > used 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 <jiang.liu@linux.intel.com> > --- > arch/x86/pci/common.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c > index 09d3afc0a181..60b237783582 100644 > --- a/arch/x86/pci/common.c > +++ b/arch/x86/pci/common.c > @@ -685,6 +685,16 @@ void pcibios_free_irq(struct pci_dev *dev) > > int pcibios_enable_device(struct pci_dev *dev, int mask) > { > + /* > + * By design, pcibios_alloc_irq() will be called by pci_device_probe() > + * when binding a PCI device to a PCI driver. But some device drivers, > + * such as eata, directly make use of PCI devices without implementing > + * PCI device drivers, so pcibios_alloc_irq() won't be called for those > + * PCI devices. > + */ > + if (!dev->driver) > + pcibios_alloc_irq(dev); > + > return pci_enable_resources(dev, mask); > } > > Sorry for the late report but this patch messes up things for kexec - rebooting is delayed with the error messages as shown in the fuzzy screen image here: http://www.users.on.net/~arthur.marsh/20150910541.jpg (the error messages are similar to what I was seeing on boot-up before Jiang Liu's patch) and the SCSI card is not recognised by the kernel after a kexec restart, and eata fails to load. Arthur. ^ permalink raw reply [flat|nested] 42+ messages in thread
end of thread, other threads:[~2015-10-05 8:29 UTC | newest] Thread overview: 42+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <55EE8106.6060100@internode.on.net> 2015-09-08 7:26 ` [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Jiang Liu 2015-09-08 9:03 ` Arthur Marsh 2015-09-08 9:44 ` Jiang Liu 2015-09-08 16:27 ` Bjorn Helgaas 2015-09-08 16:49 ` Jiang Liu 2015-09-09 19:11 ` Bjorn Helgaas 2015-09-10 8:58 ` Jiang Liu 2015-09-14 3:08 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Jiang Liu 2015-09-14 3:08 ` [Bugfix 1/3] eata: Use IDA to manage eata board IDs Jiang Liu 2015-09-14 8:08 ` Hannes Reinecke 2015-09-14 3:08 ` [Bugfix 2/3] eata: Implement PCI driver to manage eata PCI devices Jiang Liu 2015-09-14 8:17 ` Hannes Reinecke 2015-09-14 8:31 ` Jiang Liu 2015-09-14 3:08 ` [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal Jiang Liu 2015-09-14 8:21 ` Hannes Reinecke 2015-09-14 8:31 ` Ballabio, Dario 2015-09-14 8:33 ` Jiang Liu 2015-09-16 13:42 ` Christoph Hellwig 2015-09-17 6:49 ` Jiang Liu 2015-09-18 15:08 ` Arthur Marsh 2015-09-22 7:30 ` [RFT v3] eata: Convert eata driver as normal PCI and platform device drivers Jiang Liu 2015-09-22 20:27 ` Hannes Reinecke 2015-09-22 22:25 ` Arthur Marsh 2015-09-22 22:45 ` James Bottomley 2015-09-22 23:36 ` Arthur Marsh 2015-09-23 5:24 ` Jiang Liu 2015-09-23 10:44 ` Arthur Marsh 2015-09-23 14:40 ` James Bottomley 2015-09-24 4:28 ` Jiang Liu 2015-09-24 5:56 ` Arthur Marsh 2015-09-26 6:27 ` Arthur Marsh 2015-10-03 8:11 ` Jiang Liu 2015-10-03 11:14 ` Arthur Marsh 2015-10-05 8:29 ` Arthur Marsh 2015-09-14 16:01 ` [Bugfix 0/3] Convert eata driver to a normal PCI device driver Arthur Marsh 2015-09-15 2:31 ` Jiang Liu 2015-09-15 7:19 ` Arthur Marsh 2015-09-16 5:07 ` Jiang Liu 2015-09-16 7:37 ` Arthur Marsh 2015-09-16 8:21 ` Jiang Liu 2015-09-16 11:29 ` Arthur Marsh 2015-09-09 19:04 ` [Bugfix] PCI, x86: Correctly allocate IRQs for PCI devices managed by non-PCI drivers Arthur Marsh
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).