diff mbox

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

Message ID 1442907023-12709-1-git-send-email-jiang.liu@linux.intel.com
State Not Applicable
Headers show

Commit Message

Jiang Liu Sept. 22, 2015, 7:30 a.m. UTC
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(-)

Comments

Hannes Reinecke Sept. 22, 2015, 8:27 p.m. UTC | #1
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
Arthur Marsh Sept. 22, 2015, 10:25 p.m. UTC | #2
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
James Bottomley Sept. 22, 2015, 10:45 p.m. UTC | #3
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


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arthur Marsh Sept. 22, 2015, 11:36 p.m. UTC | #4
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.
[    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
diff mbox

Patch

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);