Bug 3511 - kernel panic when secondary channel in use (sis5513)
Summary: kernel panic when secondary channel in use (sis5513)
Status: REJECTED INSUFFICIENT_DATA
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: IDE (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Bartlomiej Zolnierkiewicz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-04 10:26 UTC by Lukasz Stelmach
Modified: 2008-02-16 11:20 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.4.26
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
The ksymoops. (1.50 KB, text/plain)
2004-10-04 13:32 UTC, Lukasz Stelmach
Details
2.6.9-rc3 dmesg (4.63 KB, text/plain)
2004-10-09 08:01 UTC, Lukasz Stelmach
Details
2.6.9-rc3 config (21.89 KB, text/plain)
2004-10-09 08:02 UTC, Lukasz Stelmach
Details

Description Lukasz Stelmach 2004-10-04 10:26:39 UTC
Distribution:Slackware 10.0
Hardware Environment:SIS5511/12/13 chipset
Software Environment:
Problem Description:When I connect a hard disk or a cd-rom to the secondary channel the kernel panics just after detecting the device. It says: unable to handle NULL pointer (...) and "bad eip value [00000000]". Do I need to supply the full oops message?

Steps to reproduce:Take the 2.4.26 kernel from slackware 10.0 (2.4.22 and 2.4.27 don't work neither). Connect anything to the secondary channel and boot. It does not happen when I use an ancient 2.2.20 kernel.
Comment 1 Lukasz Stelmach 2004-10-04 13:32:06 UTC
Created attachment 3761 [details]
The ksymoops.

It *seems* like the ide_dma_host_off is NULL at ide-iops.c:924 (2.4.27). I am
now compiling kernel without BLK_DEV_IDEDMA. Let's see what happens.
Comment 2 Bartlomiej Zolnierkiewicz 2004-10-04 13:58:50 UTC
this is fixed in 2.6.x kernels (hwif->ide_dma_check is added)
Comment 3 Bartlomiej Zolnierkiewicz 2004-10-04 14:00:05 UTC
s/hwif->ide_dma_check/hwif->ide_dma_check check/
Comment 4 Lukasz Stelmach 2004-10-04 15:26:28 UTC
Did you mean ":924 s/ide_dma_host_off/ide_dma_check/"? It doesn't work at all. Maybe I havn't made my self clear enoug in the description. I've got one drive attached as a primary master (thats my hda) and kernel panics when i connect anything to the secondary port. It doesn't blow up if both drives are primary or if both are secondary and the primary port is disabled in the BIOS setup utility. 
Comment 5 Bartlomiej Zolnierkiewicz 2004-10-04 16:33:24 UTC
Your description is fine but it doesn't give full picture.
dmesg output is needed.

I suppose that this is the same problem that was fixed in 2.6.x long
time ago - you need to check hwif->ide_dma_check presence before calling
hwif->ide_dma_host_[on,off].

If you want to know more about this issue please search changelogs and/or
linux-kernel mailing list archives.  2.4.x is deprecated (BTW you are not
using the most recent version) and bugfixes are not backported any longer.
I will not dig further unless this bug can be reproduced with 2.6.x.
Comment 6 Lukasz Stelmach 2004-10-09 06:44:05 UTC
Well 2.6.9-rc3 doesn't crash but this is the only advantage :( The default settings are somewhat completly insane. The hdd runs incredibly slow, hdparm -t shows something about 2-2.4 mb/s which is half the value i get on the 2.4.27. And probably (i've checked 2.6.7 few minutes ago) allows hdparm to set using_dma to 1 which makes the whole system hang.
Comment 7 Bartlomiej Zolnierkiewicz 2004-10-09 07:06:16 UTC
dmesg command output and kernel config would be useful

Comment 8 Lukasz Stelmach 2004-10-09 08:01:30 UTC
Created attachment 3791 [details]
2.6.9-rc3 dmesg

I can't see anything intresting here.
Comment 9 Lukasz Stelmach 2004-10-09 08:02:58 UTC
Created attachment 3792 [details]
2.6.9-rc3 config
Comment 10 Bartlomiej Zolnierkiewicz 2004-10-09 08:41:00 UTC
> SIS5513: simplex device: DMA disabled
> ide1: SIS5513 Bus-Master DMA disabled (BIOS)

This is interesting.

Controller requires (currently unfinished) simplex support.

> # CONFIG_IDEDMA_PCI_AUTO is not set

Enabling this option should enable DMA for hda.
Comment 11 Lukasz Stelmach 2004-10-09 13:53:55 UTC
Enabled. No eff.... Whoa 8-) hdparm says "76 MB in  3.06 seconds=24.85 MB/sec"
and "/dev/hda: using_dma=1 (on)" though shows no changes. Well it seems like
it's all right now, it really seems faster than befor, however, filesystem
operations may still be slow because of lousy cpu ;-) I must have missed
this option when doing oldconfig from 2.4.27 to 2.6.9-rc3 (strange but
possible).

Thanks a lot for help.

I'am looking forward to see 2.4 working like that. I'am looking forward 
to see 2.4 working like that. I ve got really crappy machine and even 
few hundred bytes smaller kernel means much to me.
Comment 12 Marijn Schouten 2006-08-08 02:05:55 UTC
On my laptop when I boot without ide=nodma, the kernel will fail to mount my
root partition, and panic.

Kernel version: 2.6.16.26
distro: Gentoo
lspci:
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 650/M650 Host (rev 01)
00:01.0 PCI bridge: Silicon Integrated Systems [SiS] Virtual PCI-to-PCI bridge (AGP)
00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS961 [MuTIOL Media IO]
00:02.1 SMBus: Silicon Integrated Systems [SiS] SiS961/2 SMBus Controller
00:02.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)
00:02.3 USB Controller: Silicon Integrated Systems [SiS] USB 1.0 Controller (rev 07)
00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0)
00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] AC'97
Sound Controller (rev a0)
00:06.0 Communication controller: Agere Systems LT WinModem
00:08.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
00:0c.0 CardBus bridge: O2 Micro, Inc. OZ601/6912/711E0 CardBus/SmartCardBus
Controller
00:0d.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 04)
01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 65x/M650/740
PCI/AGP VGA Display Adapter
02:00.0 Network controller: RaLink RT2500 802.11g Cardbus/mini-PCI (rev 01)

the last is a wireless network card which is not yet well-supported, but it also
happened without it. I'm sure its not the problem.

I think the cdrom drive is connected to the secondary ide channel as seems to be
important. A BIOS info screen says that my harddrive is (PM) and my cdrom is
(SM) which I think means Primary and Secondary Master.

My kernel config does include
CONFIG_IDEDMA_PCI_AUTO=y

dmesg output is currently very bloated as I compiled some debug options in
(kobject), but I can compile any kernel version without it if that is needful.
Comment 13 Marijn Schouten 2006-08-08 03:12:05 UTC
A possible fix (add a pci_id) is at

http://kerneltrap.org/node/4925

Please advise.
Comment 14 Marijn Schouten 2006-08-11 03:19:13 UTC
I tried the aforementioned patch

        { "SiS733",     PCI_DEVICE_ID_SI_733,   ATA_100  },
        { "SiS635",     PCI_DEVICE_ID_SI_635,   ATA_100  },
        { "SiS633",     PCI_DEVICE_ID_SI_633,   ATA_100  },
+{ "SiS5513", PCI_DEVICE_ID_SI_5513, ATA_133 },

        { "SiS730",     PCI_DEVICE_ID_SI_730,   ATA_100a },
        { "SiS550",     PCI_DEVICE_ID_SI_550,   ATA_100a },

and it doesn't work. It certainly does make a difference though. Lots of failed 
commands and the driver trying to disable dma. Then in the end still it fails 
VFS cannot mount root partition.

I guess I had better open a new bug.
Comment 15 Natalie Protasevich 2007-10-16 06:34:49 UTC
How does the current kernel (2.6.23+) work for everyone?
Thanks. 
Comment 16 Bartlomiej Zolnierkiewicz 2008-02-16 11:20:56 UTC
I'm closing this bug - please re-open if the problem still happens with recent kernels.

Note You need to log in before you can comment on or make changes to this bug.