# Resolved: udev  and IDE cdrom issues

## tubocurarine

Hi, all

	I just got a new pc, and installed gentoo. Everything goes well except the cdrom.

	The problem is when cdrom is disabled from bios, the OS can be started properly. But when this cdrom is enabled, most of the time, OS will failed to boot, leaving a message: "Waiting for uevents to be processed". I've tried to wait for several minutes, but without any result. 	What's more strange, when cdrom is 	enabled, the OS boots normally *SOMETIMES*, and cdrom works properly.

	I've tried to set "udev_log" into debug in /etc/udev/udev.conf , and the boot process stuck at different places every-time when cdrom is not connected. And I've also tried to downgrade or upgrade udev to different versions, but this issue remains.

	Following is some information about my PC and OS:

```

lspci -v

00:00.0 Host bridge: Advanced Micro Devices [AMD] RS780 Host Bridge Alternate

   Subsystem: ASUSTeK Computer Inc. Device 843e

   Flags: bus master, 66MHz, medium devsel, latency 0

   Capabilities: [c4] HyperTransport: Slave or Primary Interface

   Capabilities: [54] HyperTransport: UnitID Clumping

   Capabilities: [40] HyperTransport: Retry Mode

   Capabilities: [9c] HyperTransport: #1a

   Capabilities: [f8] HyperTransport: #1c

00:01.0 PCI bridge: ASUSTeK Computer Inc. Device 9602 (prog-if 00 [Normal decode])

   Flags: bus master, 66MHz, medium devsel, latency 64

   Bus: primary=00, secondary=01, subordinate=01, sec-latency=64

   I/O behind bridge: 0000d000-0000dfff

   Memory behind bridge: fe900000-feafffff

   Prefetchable memory behind bridge: 00000000d0000000-00000000dfffffff

   Capabilities: [44] HyperTransport: MSI Mapping Enable+ Fixed+

   Capabilities: [b0] Subsystem: ASUSTeK Computer Inc. Device 843e

   Kernel modules: shpchp

00:0a.0 PCI bridge: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 5) (prog-if 00 [Normal decode])

   Flags: bus master, fast devsel, latency 0

   Bus: primary=00, secondary=02, subordinate=02, sec-latency=0

   I/O behind bridge: 0000e000-0000efff

   Memory behind bridge: feb00000-febfffff

   Prefetchable memory behind bridge: 00000000fdf00000-00000000fdffffff

   Capabilities: [50] Power Management version 3

   Capabilities: [58] Express Root Port (Slot+), MSI 00

   Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit-

   Capabilities: [b0] Subsystem: ASUSTeK Computer Inc. Device 843e

   Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+

   Capabilities: [100] Vendor Specific Information <?>

   Capabilities: [110] Virtual Channel <?>

   Kernel driver in use: pcieport

   Kernel modules: shpchp

00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode] (rev 40) (prog-if 01 [AHCI 1.0])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 41

   I/O ports at c000 [size=8]

   I/O ports at b000 [size=4]

   I/O ports at a000 [size=8]

   I/O ports at 9000 [size=4]

   I/O ports at 8000 [size=16]

   Memory at fe8ffc00 (32-bit, non-prefetchable) [size=1K]

   Capabilities: [50] MSI: Enable+ Count=1/4 Maskable- 64bit+

   Capabilities: [70] SATA HBA <?>

   Capabilities: [a4] PCI Advanced Features

   Kernel driver in use: ahci

00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller (prog-if 10 [OHCI])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 18

   Memory at fe8fe000 (32-bit, non-prefetchable) [size=4K]

   Kernel driver in use: ohci_hcd

00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller (prog-if 20 [EHCI])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17

   Memory at fe8ff800 (32-bit, non-prefetchable) [size=256]

   Capabilities: [c0] Power Management version 2

   Capabilities: [e4] Debug port: BAR=1 offset=00e0

   Kernel driver in use: ehci_hcd

00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller (prog-if 10 [OHCI])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 18

   Memory at fe8fd000 (32-bit, non-prefetchable) [size=4K]

   Kernel driver in use: ohci_hcd

00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller (prog-if 20 [EHCI])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17

   Memory at fe8ff400 (32-bit, non-prefetchable) [size=256]

   Capabilities: [c0] Power Management version 2

   Capabilities: [e4] Debug port: BAR=1 offset=00e0

   Kernel driver in use: ehci_hcd

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 41)

   Flags: 66MHz, medium devsel

   Kernel modules: i2c-piix4

00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller (rev 40) (prog-if 8a [Master SecP PriP])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17

   I/O ports at 01f0 [size=8]

   I/O ports at 03f4 [size=1]

   I/O ports at 0170 [size=8]

   I/O ports at 0374 [size=1]

   I/O ports at ff00 [size=16]

   Capabilities: [70] MSI: Enable- Count=1/1 Maskable- 64bit-

   Kernel driver in use: pata_atiixp

   Kernel modules: ata_generic, pata_acpi, pata_atiixp

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)

   Subsystem: ASUSTeK Computer Inc. Device 841b

   Flags: bus master, slow devsel, latency 64, IRQ 16

   Memory at fe8f8000 (64-bit, non-prefetchable) [size=16K]

   Capabilities: [50] Power Management version 2

   Kernel driver in use: HDA Intel

   Kernel modules: snd-hda-intel

00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller (rev 40)

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 0

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (rev 40) (prog-if 01 [Subtractive decode])

   Flags: bus master, 66MHz, medium devsel, latency 64

   Bus: primary=00, secondary=03, subordinate=03, sec-latency=64

00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller (prog-if 10 [OHCI])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 18

   Memory at fe8fc000 (32-bit, non-prefetchable) [size=4K]

   Kernel driver in use: ohci_hcd

00:16.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller (prog-if 10 [OHCI])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 18

   Memory at fe8f7000 (32-bit, non-prefetchable) [size=4K]

   Kernel driver in use: ohci_hcd

00:16.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller (prog-if 20 [EHCI])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17

   Memory at fe8ff000 (32-bit, non-prefetchable) [size=256]

   Capabilities: [c0] Power Management version 2

   Capabilities: [e4] Debug port: BAR=1 offset=00e0

   Kernel driver in use: ehci_hcd

00:18.0 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration

   Flags: fast devsel

   Capabilities: [80] HyperTransport: Host or Secondary Interface

00:18.1 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map

   Flags: fast devsel

00:18.2 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller

   Flags: fast devsel

00:18.3 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control

   Flags: fast devsel

   Capabilities: [f0] Secure device <?>

   Kernel driver in use: k10temp

00:18.4 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control

   Flags: fast devsel

01:05.0 VGA compatible controller: ATI Technologies Inc Device 9715 (prog-if 00 [VGA controller])

   Subsystem: ASUSTeK Computer Inc. Device 843e

   Flags: bus master, fast devsel, latency 0, IRQ 18

   Memory at d0000000 (32-bit, prefetchable) [size=256M]

   I/O ports at d000 [size=256]

   Memory at feaf0000 (32-bit, non-prefetchable) [size=64K]

   Memory at fe900000 (32-bit, non-prefetchable) [size=1M]

   Expansion ROM at <unassigned> [disabled]

   Capabilities: [50] Power Management version 3

   Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+

01:05.1 Audio device: ATI Technologies Inc Device 970f

   Subsystem: ASUSTeK Computer Inc. Device 843e

   Flags: bus master, fast devsel, latency 0, IRQ 19

   Memory at feae8000 (32-bit, non-prefetchable) [size=16K]

   Capabilities: [50] Power Management version 3

   Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+

   Kernel driver in use: HDA Intel

   Kernel modules: snd-hda-intel

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

   Subsystem: ASUSTeK Computer Inc. Device 8432

   Flags: bus master, fast devsel, latency 0, IRQ 42

   I/O ports at e800 [size=256]

   Memory at fdfff000 (64-bit, prefetchable) [size=4K]

   Memory at fdff8000 (64-bit, prefetchable) [size=16K]

   Expansion ROM at febe0000 [disabled] [size=128K]

   Capabilities: [40] Power Management version 3

   Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+

   Capabilities: [70] Express Endpoint, MSI 01

   Capabilities: [b0] MSI-X: Enable- Count=4 Masked-

   Capabilities: [d0] Vital Product Data

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Virtual Channel <?>

   Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00

   Kernel driver in use: r8169

   Kernel modules: r8169

```

  cdrom is not listed above, which is presented as VIA_PATA device in kernel.

  udev: udev-151-r4

  kernel: 2.6.35.3, with bfs patch from ck.

  Any clues will be appreciated!Last edited by tubocurarine on Fri Oct 08, 2010 12:53 pm; edited 1 time in total

----------

## roarinelk

 *tubocurarine wrote:*   

> 
> 
>   cdrom is not listed above, which is presented as VIA_PATA device in kernel.
> 
> 

 

Is it an add-on card or something?  For ATI chipsets pata_amd is the correct

driver.

How do you disable the cdrom in the BIOS? The usual way to set

one of the IDE controller slots to "disabled" doesn't affect Linux, since it will

load the driver for the PCI IDE device and probe for attached devices.  The

BIOS settings usually only affect the BIOS, DOS or any other software which

uses BIOS calls to access block devices.

----------

## tubocurarine

 *roarinelk wrote:*   

> 
> 
> Is it an add-on card or something?  For ATI chipsets pata_amd is the correct driver.
> 
> 

 

It is IDE cdrom, connected to the ide slot of motherbord.

 *roarinelk wrote:*   

> 
> 
> How do you disable the cdrom in the BIOS? The usual way to set
> 
> one of the IDE controller slots to "disabled" doesn't affect Linux, since it will
> ...

 

Yes, I just disabled the corresponding controller. And I know the probing of pci devices, more or less.

But, what is the cause of this issue? I can not figure it out.

To clarify that issue:

If the on-board IDE controller was disabled from BIOS, OS can boot normally, and CDROM can not be used.

Else if the IDE controller was enabled, there may be two results: OS book stuck for processing udevevent, OR it may boot normally;

It is really strange.

----------

## roarinelk

do you have multiple cpus?  if so try booting linux with "maxcpus=1"

----------

## tubocurarine

 *roarinelk wrote:*   

> do you have multiple cpus?  if so try booting linux with "maxcpus=1"

 

yes, I do.

I'll have a try.

Thanks.

----------

## Anon-E-moose

what does "zgrep -E "IDE|DEPRECATED" /proc/config.gz" return

And make sure that boot order in the bios is "hd then cd"

----------

## tubocurarine

 *roarinelk wrote:*   

> 
> 
> Add maxcpus=1 does not work ...
> 
> 

 

 *Anon-E-moose wrote:*   

> what does "zgrep -E "IDE|DEPRECATED" /proc/config.gz" return
> 
> And make sure that boot order in the bios is "hd then cd"

 

I customized kernel on my own, and there is no "/proc/config.gz".

So I copied /usr/src/linux/.config to somewhere else, and created a gziped file.

Here is the result:

```

yyc@tubo ~ $ zgrep -E "IDE|DEPRECATED" config.gz

# CONFIG_SYSFS_DEPRECATED_V2 is not set

# CONFIG_ACPI_VIDEO is not set

# CONFIG_PARIDE is not set

CONFIG_HAVE_IDE=y

# CONFIG_IDE is not set

CONFIG_VIDEO_OUTPUT_CONTROL=y

# CONFIG_FB_TRIDENT is not set

# CONFIG_SND_RIPTIDE is not set

# CONFIG_SND_TRIDENT is not set

# CONFIG_IDE_PHISON is not set

CONFIG_THINKPAD_ACPI_VIDEO=y

# CONFIG_ENABLE_WARN_DEPRECATED is not set

# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set

```

As to the boot order, cdrom was remove from the boot sequence.

Any ideas?

Thanks.

----------

## Anon-E-moose

what does 

grep PATA_VIA on your config file return?

----------

## tubocurarine

 *Anon-E-moose wrote:*   

> what does 
> 
> grep PATA_VIA on your config file return?

 

Compiled as a module:

```

yyc@tubo ~ $ zgrep -E "PATA_VIA" config.gz 

CONFIG_PATA_VIA=m

```

----------

## Anon-E-moose

 *tubocurarine wrote:*   

> 
> 
> ```
> 
> 00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller (rev 40) (prog-if 8a [Master SecP PriP])
> ...

 

I would say turn on the ide interface in the bios, turn off the cdrom (unplug the power from it) boot up and run lspci and see what drivers get applied to it.

----------

## tubocurarine

 *Anon-E-moose wrote:*   

>  *tubocurarine wrote:*   
> 
> ```
> 
> 00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller (rev 40) (prog-if 8a [Master SecP PriP])
> ...

 

I used to excute lspci in a livecd, and the result showed there are two IDEs, one is ATI controller, and the other is VIA controller.

But the result I posted here was derived with IDE controller disabled, so the VIA controller is not present.

Any way, I will try to deselect VIA_PATA and recompile the kernel.

Thanks.

----------

## Anon-E-moose

What motherboard are you running?

----------

## tubocurarine

 *Anon-E-moose wrote:*   

> What motherboard are you running?

 

ASUS,  M4A88TD-M

----------

## Anon-E-moose

Well, I have to rescind what I said earlier, you will need the pata_via for the IDE drive.

What device do you have attached to it (cd/dvd), which model

----------

## Anon-E-moose

what options do have in the bios that concern the ide other than turning it on or off. 

You said you booted up from a live cd, were there any problems with the system hanging?

What drivers got loaded?

----------

## tubocurarine

 *Anon-E-moose wrote:*   

> what options do have in the bios that concern the ide other than turning it on or off. 

 

There is only one ide related setting in that bios:  "OnBoard IDE Controller", with two possible options: enabled, or disabled.

 *Quote:*   

> 
> 
> You said you booted up from a live cd, were there any problems with the system hanging?
> 
> What drivers got loaded?

 

I used a Fedora 14 livecd, no problems occurred.

And I recompiled the kernel with PATA_VIA disabled, and then renable ide controller in the bios.

Then OS start up normally, but the cdrom can not be used. The /dev/cdrom dost not appear ether.

Now here is the result of lspci, related to IDE:

```

00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller (rev 40) (prog-if 8a [Master SecP PriP])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17

   I/O ports at 01f0 [size=8]

   I/O ports at 03f4 [size=1]

   I/O ports at 0170 [size=8]

   I/O ports at 0374 [size=1]

   I/O ports at ff00 [size=16]

   Capabilities: [70] MSI: Enable- Count=1/1 Maskable- 64bit-

   Kernel driver in use: pata_atiixp

   Kernel modules: ata_generic, pata_acpi, pata_atiixp

02:00.0 IDE interface: VIA Technologies, Inc. PATA IDE Host Controller (prog-if 85 [Master SecO PriO])

   Subsystem: ASUSTeK Computer Inc. Device 838f

   Flags: fast devsel, IRQ 17

   I/O ports at dc00 [size=8]

   I/O ports at d880 [size=4]

   I/O ports at d800 [size=8]

   I/O ports at d480 [size=4]

   I/O ports at d400 [size=16]

   Expansion ROM at feaf0000 [disabled] [size=64K]

   Capabilities: [50] Power Management version 3

   Capabilities: [70] MSI: Enable- Count=1/1 Maskable+ 64bit+

   Capabilities: [90] Express Legacy Endpoint, MSI 00

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [130] Device Serial Number 00-40-63-ff-ff-63-40-00

   Kernel modules: ata_generic, pata_acpi

```

----------

## Anon-E-moose

can you boot with the live cd, and run lspci and lsmod to see what is loaded, and uname -a

----------

## tubocurarine

 *Anon-E-moose wrote:*   

> can you boot with the live cd, and run lspci and lsmod to see what is loaded, and uname -a

 

OK, thanks.

----------

## tubocurarine

 *tubocurarine wrote:*   

>  *Anon-E-moose wrote:*   can you boot with the live cd, and run lspci and lsmod to see what is loaded, and uname -a 
> 
> OK, thanks.

 

The image of live cd was deleted by mistake. So I'll download a new one. That may task some time.

----------

## tubocurarine

This time, Fedora 14 live cd failed to boot too.

I recompiled linux-2.6.35.5, with PATA_VIA enabled , and added "CONFIG_DEBUG_SECTION_MISMATCH=y".

Then the it reported some "Section mismatch" in via_pci_probe(). So I followed this url:

http://kerneltrap.org/mailarchive/linux-kernel/2010/6/17/4584150, and used that patch.

(But it seems to be a patch for via graphic card drver ... )

Then recompiled, and reboot. I've test three times with this patched kernel, two of them succeeded to boot, one failed.

I'm trying the newer version,  2.6.35.7, to see whether it will work well or not.

----------

## Anon-E-moose

It does sound like the problem is related to the via chipset and driver interaction.

Not surprising as via doesn't release docs for their chips, as far as I know. 

So it's trial and error.

----------

## tubocurarine

Still the same result for linux-2.6.35.7.

It's too late, I need to goto bed.

May be I need to  read kernel code of pata_via.c tomorrow to find what's going on ... 

Thanks, roarinelk and Anon-E-moose.

If anyone has new idea, please let me know, if possible.

Thanks!

----------

## tubocurarine

 *Anon-E-moose wrote:*   

> It does sound like the problem is related to the via chipset and driver interaction.
> 
> Not surprising as via doesn't release docs for their chips, as far as I know. 
> 
> So it's trial and error.

 

Thanks for  your attention again.

----------

## chiefbag

Try this. It may be due to a conflict between the MBR on your hard drive a the fact that the bios is reporting your drive with a diff address after your cd rom config change. 

Enable the cd rom in bios then boot with livecd. 

Chroot to hard disk and also delete the 70-persistent* from rules.d under udev. 

Then re install grub boot loader.

----------

## tubocurarine

 *chiefbag wrote:*   

> Try this. It may be due to a conflict between the MBR on your hard drive a the fact that the bios is reporting your drive with a diff address after your cd rom config change. 
> 
> Enable the cd rom in bios then boot with livecd. 
> 
> Chroot to hard disk and also delete the 70-persistent* from rules.d under udev. 
> ...

 

Thanks , chiefbag.

I 'll have a try.

----------

## tubocurarine

 *chiefbag wrote:*   

> Try this. It may be due to a conflict between the MBR on your hard drive a the fact that the bios is reporting your drive with a diff address after your cd rom config change. 
> 
> Enable the cd rom in bios then boot with livecd. 
> 
> Chroot to hard disk and also delete the 70-persistent* from rules.d under udev. 
> ...

 

Thanks, but it doest work ...   :Sad: 

----------

## Anon-E-moose

What type of cdrom/dvd do you have? 

How do you have it jumpered, slave/master/none?

----------

## tubocurarine

 *Anon-E-moose wrote:*   

> What type of cdrom/dvd do you have? 
> 
> How do you have it jumpered, slave/master/none?

 

It's Pioneer DVR-118CHV， cable-select.

----------

## tubocurarine

I found the motherboard is using a VIA VT6415 PATA Controller.

----------

## Anon-E-moose

 *tubocurarine wrote:*   

>  *Anon-E-moose wrote:*   What type of cdrom/dvd do you have? 
> 
> How do you have it jumpered, slave/master/none? 
> 
> It's Pioneer DVR-118CHV， cable-select.

 

If it's the only device, you might set it for master and see if that makes a difference.

----------

## krinn

Do that:

echo "blacklist pata_acpi" >> /etc/modprobe.d/blacklist.conf

echo "blacklist ata_generic" >> /etc/modprobe.d/blacklist.conf

now you'll get sure udev won't use those drivers that are legacy ones and that shouldn't be use

the fact your first ati controller use the good one (pata_atiixp) is in no case a proof another controller won't pickup ata_generic or pata_acpi

Enable the cdrom in your bios, enable both controller in bios, and try booting

if it fail, you could try :

echo "blacklist pata_via" >> /etc/modprobe.d/blacklist.conf

now reboot, you will still don't have your cdrom but you should be able to boot.

once you're at the login screen, well, log-in and modprobe pata_via -v

----------

## tubocurarine

I've tried that, not working.

I just disabled the new pata driver from kernel, and used   driver form ATA/ATAPI/MFM/RLL subsystem.

Then, some message appears: 

```

Uniform Multi-Platform E-IDE driver

atiixp 0000:00:14.1: IDE controller (0x1002:0x439c rev 0x40)

ATIIXP_IDE 0000:00:14.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17

atiixp 0000:00:14.1: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xff00-0xff07

    ide1: BM-DMA at 0xff08-0xff0f

Probing IDE interface ide0...

BUG: unable to handle kernel NULL pointer dereference at 0000000000000048

IP: [<ffffffffa0196712>] via_init_one+0xf0/0x260 [via82cxxx]

PGD 6c5ea067 PUD 6c5f9067 PMD 0 

Oops: 0000 [#1] SMP 

last sysfs file: /sys/devices/pci0000:00/0000:00:0a.0/0000:03:00.0/device

CPU 0 

Modules linked in: via82cxxx(+) shpchp(+) snd_hda_codec_atihdmi atiixp(+) ide_core pci_hotplug snd_hda_codec_realtek ppdev parport_pc snd_hda_intel snd_hda_codec r8169 mii wmi parport asus_atk0110 serio_raw snd_hwdep snd_pcm snd_timer snd soundcore snd_page_alloc i2c_piix4

```

It seems to be a null pointer in via_init_one() function.

PS: not in via_init_one(), but  in init_chipset_via82cxxx(struct pci_dev *dev)

----------

## tubocurarine

 *krinn wrote:*   

> Do that:
> 
> echo "blacklist pata_acpi" >> /etc/modprobe.d/blacklist.conf
> 
> echo "blacklist ata_generic" >> /etc/modprobe.d/blacklist.conf
> ...

 

Hi, krinn,

Thanks for your advice. 

With pata_via putted into blacklist, the system can be started normally.

But again, when I tried to call modprobe or insmod, the system goes abnormal immediately. Keyboard and mouse do not respond, the screen will go to black, et.al.  In one sentence, the system is out of control.

I guess, the driver needs to be improved, maybe.

----------

## krinn

sad for you, nothing i can really do to help you more so.

i suppose you already know you could upgrade your kernel to get newer pata_via driver version.

did you look in kernel documentation for that driver? sometimes hidden options are there (not so hidden so, but hidden until you read the doc) and one could cover your chip or issue

----------

## tubocurarine

 *krinn wrote:*   

> sad for you, nothing i can really do to help you more so.
> 
> i suppose you already know you could upgrade your kernel to get newer pata_via driver version.
> 
> did you look in kernel documentation for that driver? sometimes hidden options are there (not so hidden so, but hidden until you read the doc) and one could cover your chip or issue

 

Thanks anyway.

I've tested the latest version 2.6.36, and that makes no difference.

I'll have a look at the documents.

Thanks!

----------

## Anon-E-moose

 *tubocurarine wrote:*   

> I've tried that, not working.
> 
> I just disabled the new pata driver from kernel, and used   driver form ATA/ATAPI/MFM/RLL subsystem.
> 
> 

 

Has the old ATA stuff been enabled all along, or did you just enable it for this test?

Post your .config file to http://pastebin.com/

----------

## tubocurarine

 *Anon-E-moose wrote:*   

>  *tubocurarine wrote:*   I've tried that, not working.
> 
> I just disabled the new pata driver from kernel, and used   driver form ATA/ATAPI/MFM/RLL subsystem.
> 
>  
> ...

 

No, I disabled the old ide drivers. 

My configuration file is posted at the following url:

http://pastebin.com/gmq9zmsA

----------

## Anon-E-moose

The only thing I see (possibly) wrong is you have PIIX turned on in a few areas, 

and (unless I missed something) you shouldn't have it turned on at all. 

Personal opinion

If I were trying to diagnose this on my system I would turn off all things that 

weren't absolutely necessary for the system to run, making it a stable state.

Then I would start adding back the options, till it broke. 

Which to me means I would start with just the sata drives and maybe the pata_via 

and boot up in singleuser mode so I wouldn't have to worry about networking and other stuff.

Anyway, good luck, and if nothing else, PCI ide adapters are pretty cheap.

----------

## krinn

And this is what is shocking me  :Smile: 

 *tubocurarine wrote:*   

> 
> 
> Probing IDE interface ide0...
> 
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
> ...

 

as we're now sure the newer driver for via is named via_pata, the via82cxxx could be the old one (or maybe some sound chip)

for ide_core it's simple, that's the old driver for ide

As now, you're just showing us that mixing newer libata ide driver with old ide interface isn't a good idea.

It means, despite Anon-E-moose suggestion, you still use that old driver, and at least udev will not appreciate that.

Are you sure you have build and INSTALL the proper new kernel ? You know mistake while copying it with a bad name, forgot to mount /boot...

You should rebuild one and getting ride of all the poor old options that are deprecated.

This also disturb me:

```
00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller (rev 40) (prog-if 8a [Master SecP PriP])

   Subsystem: ASUSTeK Computer Inc. Device 8443

   Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17 

...

02:00.0 IDE interface: VIA Technologies, Inc. PATA IDE Host Controller (prog-if 85 [Master SecO PriO])

   Subsystem: ASUSTeK Computer Inc. Device 838f

   Flags: fast devsel, IRQ 17 
```

Your 2 ide controllers are sharing IRQ17

IRQ sharing is generally not a good idea and should be avoid when possible, you can trick bios to let it move irq by disabling some device to free some, moving card (when possible) on slot, or enable/disable pnp os option...

But this also tell us another strange thing:

They are sharing the same irq, but on a real low irq, 17

check your cat /proc/interrupts for bios/kernel misconfiguration leaving you with too few irq (on my current system, i have upto 54 irq maybe more, but highest use is 54)

and it would be nice if you output "lsmod" output then the "modprobe via_pata -v" output where it hangs

----------

## tubocurarine

 *Anon-E-moose wrote:*   

> The only thing I see (possibly) wrong is you have PIIX turned on in a few areas, 
> 
> and (unless I missed something) you shouldn't have it turned on at all. 
> 
> Personal opinion
> ...

 

I turned off PIIX and recompile and reboot.

But when "modprobe pata_via -v" was called, the system went dead.

Thanks anyway.

May be I'll buy a PCI to IDE adapter.

Thanks.

----------

## tubocurarine

 *krinn wrote:*   

> And this is what is shocking me 
> 
>  *tubocurarine wrote:*   
> 
> Probing IDE interface ide0...
> ...

 

When this message was post, I'd turned off pata dirver, and turned on old ide driver only.  It was just a test to see whether the old ones would work or not. .

 *krinn wrote:*   

> 
> 
> This also disturb me:
> 
> ```
> ...

 

```

tubo ~ # cat /proc/interrupts

           CPU0       CPU1

  0:        704     344660   IO-APIC-edge      timer

  1:          0          2   IO-APIC-edge      i8042

  4:          0          1   IO-APIC-edge

  7:          0          0   IO-APIC-edge      parport0

  8:          2         49   IO-APIC-edge      rtc0

  9:          0          0   IO-APIC-fasteoi   acpi

 12:          1          3   IO-APIC-edge      i8042

 14:          0          0   IO-APIC-edge      pata_atiixp

 15:          0          0   IO-APIC-edge      pata_atiixp

 16:          1        490   IO-APIC-fasteoi   hda_intel

 17:          0          4   IO-APIC-fasteoi   ehci_hcd:usb1, ehci_hcd:usb2, ehci_hcd:usb3

 18:         83      29388   IO-APIC-fasteoi   ohci_hcd:usb4, ohci_hcd:usb5, ohci_hcd:usb6, ohci_hcd:usb7, radeon@pci:0000:01:05.0

 19:         43       9026   IO-APIC-fasteoi   ahci, hda_intel

 42:         39       9434   PCI-MSI-edge      eth0

NMI:          0          0   Non-maskable interrupts

LOC:     226058      39803   Local timer interrupts

SPU:          0          0   Spurious interrupts

PMI:          0          0   Performance monitoring interrupts

PND:          0          0   Performance pending work

RES:     429632     406354   Rescheduling interrupts

CAL:         35         25   Function call interrupts

TLB:       1490       1404   TLB shootdowns

THR:          0          0   Threshold APIC interrupts

MCE:          0          0   Machine check exceptions

MCP:          5          5   Machine check polls

ERR:          0

MIS:          0

```

```

tubo ~ # lsmod

Module                  Size  Used by

radeon                694696  2

ttm                    52063  1 radeon

drm_kms_helper         24860  1 radeon

drm                   169718  5 radeon,ttm,drm_kms_helper

agpgart                30325  2 ttm,drm

i2c_algo_bit            4853  1 radeon

snd_seq_oss            25222  0

snd_seq_midi_event      5787  1 snd_seq_oss

snd_seq                46383  4 snd_seq_oss,snd_seq_midi_event

snd_seq_device          5519  2 snd_seq_oss,snd_seq

snd_pcm_oss            31056  0

snd_mixer_oss          13024  1 snd_pcm_oss

snd_hda_codec_atihdmi     2487  1

snd_hda_codec_realtek   277584  1

snd_hda_intel          21542  0

snd_hda_codec          69664  3 snd_hda_codec_atihdmi,snd_hda_codec_realtek,

                                snd_hda_intel

snd_hwdep               5782  1 snd_hda_codec

snd_pcm                63952  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec

snd_timer              18177  2 snd_seq,snd_pcm

r8169                  35462  0

snd                    53892  11 snd_seq_oss,snd_seq,snd_seq_device,

                                 snd_pcm_oss,snd_mixer_oss,snd_hda_codec_realtek,

                                 snd_hda_intel,snd_hda_codec,snd_hwdep,

                                 snd_pcm,snd_timer

soundcore               5997  1 snd

ppdev                   8136  0

pata_atiixp             3989  0

shpchp                 28913  0

parport_pc             20647  0

wmi                     7714  0

pci_hotplug            23702  1 shpchp

snd_page_alloc          7179  2 snd_hda_intel,snd_pcm

mii                     4134  1 r8169

parport                30000  2 ppdev,parport_pc

serio_raw               4182  0

asus_atk0110           14852  0

```

Thank you very much.

Applied line wrapping to the lsmod output, to reduce side scrolling. -- desultory

----------

## Ant P.

Have you tried running your system with the IDE emulation mode on your SATA controller turned off?

----------

## tubocurarine

 *Ant_P wrote:*   

> Have you tried running your system with the IDE emulation mode on your SATA controller turned off?

 

Yes. But that makes no difference after I turned off IDE emulation, and changed it to AHCI mode.

----------

## tubocurarine

I just found a patch for legacy ide driver in this website: http://www.spinics.net/lists/linux-ide/msg38406.html.

   Basically, it was caused by a wrong PCI_DEVICE_ID of vt6415. After fixed this issue, devices connected to vt6415 can

be used normally. And for the newer pata_via module, a person named  Ben Livengood had reported a bug at:

https://bugzilla.kernel.org/show_bug.cgi?id=16414. This may be fixed in the new version of kernel.

----------

## Anon-E-moose

Sweet...glad it got fixed.

----------

## tubocurarine

 *Anon-E-moose wrote:*   

> Sweet...glad it got fixed.

 

lol, thanks a lot!

----------

