Bug 9157 - 2.6.2* libata fails for sis 5513 PATA
Summary: 2.6.2* libata fails for sis 5513 PATA
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: Serial ATA (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Alan
Depends on:
Reported: 2007-10-13 03:12 UTC by Patrizio Bassi
Modified: 2008-09-09 09:50 UTC (History)
3 users (show)

See Also:
Kernel Version:
Tree: Mainline
Regression: ---

irq-storm-during-init-workaround.patch (2.11 KB, patch)
2007-10-18 02:01 UTC, Tejun Heo
Details | Diff
various captures on willy's machine under 2.6.25.x (14.29 KB, application/octet-stream)
2008-08-03 12:23 UTC, Willy Tarreau

Description Patrizio Bassi 2007-10-13 03:12:22 UTC
Most recent kernel where this bug did not occur: none
Distribution: Gentoo
Hardware Environment: sis 630 chipset
Software Environment: x86
Problem Description:
i cannot boot a system with libata only (not old ide driver)

i enabled pata_sis and pata_generic support.
tried with irqroute and pci=noacpi options, no way.

when i try to suspend my notebook i have problems with ide controller.
the copy lasts a lot and i get oops with 2.6.17 kernel.

Stopping tasks: ==========================================|
Shrinking memory... done (22776 pages freed)
pnp: Device 00:08 disabled.
swsusp: Need to copy 30898 pages
ACPI: PCI Interrupt 0000:00:00.1[A]: no GSI - using IRQ 14
eth0: Media Link Off
ACPI: PCI Interrupt 0000:00: 01.2[D] -> Link [LNKD] -> GSI 5 (level,
low) -> IRQ 5
ACPI: PCI Interrupt 0000:00:01.3[D] -> Link [LNKD] -> GSI 5 (level,
low) -> IRQ 5
ACPI: PCI Interrupt 0000:00:01.4[B] -> Link [LNKB] -> GSI 5 (level,
low) -> IRQ 5
ACPI: PCI Interrupt 0000:00:01.6[B] -> Link [LNKB] -> GSI 5 (level,
low) -> IRQ 5
PCI: Setting latency timer of device 0000:00:02.0 to 64
PM: Writing back config space on device 0000:00:0a.0 at offset 1 (was
82100003, writing 82100007)
ACPI: PCI Interrupt 0000:00:0a.0[A] -> Link [LNKA] -> GSI 11 (level,
low) -> IRQ 11
PM: Writing back config space on device 0000:00:0a.1 at offset 1 (was
2100003, writing 82100007)
ACPI: PCI Interrupt 0000:00: 0a.1[B] -> Link [LNKC] -> GSI 5 (level,
low) -> IRQ 5
pnp: Device 00:08 activated.
pnp: Failed to activate device 00:0c.
pnp: Failed to activate device 00:0d.
irq 14: nobody cared (try booting with the "irqpoll" option)
 <c012c987> __report_bad_irq+0x2b/0x69  <c012cb3d> note_interrupt+0x178/0x1a7
 <c012c53d> handle_IRQ_event+0x22/0x4e  <c012c5ce> __do_IRQ+0x65/0x8f
 <c0104b2d> do_IRQ+0x19/0x24  <c01033da> common_interrupt+0x1a/0x20
 <c0118f4b> __do_softirq+0x2c/0x7f  <c0118fc0> do_softirq+0x22/0x26
 <c0104b32> do_IRQ+0x1e/0x24  <c01033da> common_interrupt+0x1a/0x20
 <c0214224> acpi_processor_idle+0x157/0x323  <c0101da2> cpu_idle+0x3a/0x4f
 <c03b0635> start_kernel+0x29c/0x29e
[<c0230301>] (ide_intr+0x0/0x16c)
Disabling IRQ #14
Restarting tasks... done
hda: dma_timer_expiry: dma status == 0x24
hda: DMA interrupt recovery
hda: lost interrupt

tried 2.6.18-rc4-mm3 (as suggested by Rafael J. Wysocki)

as soon as i ask for suspending i get a black screen.
waiting for lots of time...something like 1 min i see:

Disabling Interrupt #14
and after, even waiting some mins...nothing more. i have to power off manually.

tried 2.6.18-rc5

i immediatly have a 
Disabling Interrupt #14 message (instead of waiting like mm3)

but i get a panic too (i'll try to attach a photo of that)

seems related to synapsis driver....maybe input team should be CC.

 0:     431861          XT-PIC  timer
 1:        638          XT-PIC  i8042
 2:          0          XT-PIC  cascade
 5:          0          XT-PIC  yenta, ohci_hcd:usb1, ohci_hcd:usb2,
Trident Audio, SiS630, eth0
 7:          0          XT-PIC  parport0
 8:          2          XT-PIC  rtc
 9:          1          XT-PIC  acpi
 11:          0          XT-PIC  yenta
 12:      10982          XT-PIC  i8042
 14:     200771          XT-PIC  ide0
 15:         26          XT-PIC  ide1
NMI:          0
LOC:          0
ERR:          0
MIS:          0
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 630 Host (rev 11)
00:00.1 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev d0)
00:01.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge)
00:01.1 Ethernet controller: Silicon Integrated Systems [SiS] SiS900
PCI Fast Ethernet (rev 80)
00:01.2 USB Controller: Silicon Integrated Systems [SiS] USB  1.0
Controller (rev 07)
00:01.3 USB Controller: Silicon Integrated Systems [SiS] USB 1.0
Controller (rev 07)
00:01.4 Multimedia audio controller: Silicon Integrated Systems [SiS]
SiS PCI Audio Accelerator (rev 01)
 00:01.6 Modem: Silicon Integrated Systems [SiS] AC'97 Modem
Controller (rev a0)
00:02.0 PCI bridge: Silicon Integrated Systems [SiS] Virtual
PCI-to-PCI bridge (AGP)
00:0a.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 80)
00:0a.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 80)
01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS]
630/730 PCI/AGP VGA Display Adapter (rev 11)
Comment 1 Patrizio Bassi 2007-10-13 03:14:41 UTC
sorry discard the first oops description, wrong copy and paste!
Comment 2 Alan 2007-10-13 04:54:42 UTC
If using libata fails can you attach the boot info for libata failing, all we have here is old IDE info which isn't that useful for debug
Comment 3 Patrizio Bassi 2007-10-13 06:32:02 UTC
you're right Alan
here is the output:

hope it's useful

i tried with irqpoll option as well, no luck.
Comment 4 Patrizio Bassi 2007-10-13 06:33:38 UTC
config for 2.6.22 (but it's the same for 2.6.23) is 
Comment 5 Alan 2007-10-13 07:02:33 UTC
Can you turn off whatever gentoo has done to hide all the important messages ?
Comment 6 Patrizio Bassi 2007-10-13 12:14:36 UTC
this is not gentoo kernel

maybe it's "quiet" cmd line parameter?
Comment 7 Patrizio Bassi 2007-10-13 17:54:33 UTC
i saw lots of updates so i tried 2.6.23-git3

could not boot again, but i have some logs...

Comment 8 Patrizio Bassi 2007-10-13 17:56:45 UTC
i tried to use the pata generic instead of pata_sis driver bt i cannot boot at all, seems not finding the boot device at all.
Comment 9 Alan 2007-10-14 05:05:00 UTC
pata_generic will skip over controllers other than a few it knows it is required for. You can change that if its compiled into the kernel with "ata_generic.all_generic_ide=1'

or in a module using all_generic_ide=1
Comment 10 Patrizio Bassi 2007-10-14 05:16:21 UTC
with that the harddisk is found

but i still have the irq14 issue. seems a generic bug as it's similar to the one i have with the old IDE driver on suspend.

i can see a difference: with pata_sis there may be a cable detection issue as it goes to udma 33 while with generic i get udma66

but however i cannot boot.
Comment 11 Patrizio Bassi 2007-10-15 12:23:22 UTC
Alan if/when you'll have a patch i'll be glad to test it, but i think you already know this.
Comment 12 Tejun Heo 2007-10-18 02:01:38 UTC
Created attachment 13196 [details]

Can you please test the attached patch on top of 2.6.23 and see whether the problem goes away?
Comment 13 Patrizio Bassi 2007-10-18 02:05:21 UTC
sure i will test this night as soon i come back home.

do you want me to test against pata_sis or pata_generic or both?
in last tests i was compiling a single driver only and not both.

my intent would be go to pata_sis only, as i see the error is common to the core driver (and actually your patch is for the core driver not the single product)

do you agree?
Comment 14 Patrizio Bassi 2007-10-18 10:31:29 UTC
patch doesn't apply

patching file drivers/ata/libata-eh.c
Hunk #1 FAILED at 1782.
Hunk #2 FAILED at 1928.
2 out of 2 hunks FAILED -- saving rejects to file drivers/ata/libata-eh.c.rej
patching file include/linux/libata.h
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file include/linux/libata.h.rej
patching file drivers/ata/libata-core.c
Hunk #1 succeeded at 6017 (offset 292 lines).
Hunk #2 succeeded at 6686 (offset 378 lines).
Comment 15 Patrizio Bassi 2007-10-18 11:02:32 UTC
actually i verified...i already have this patch in 2.6.23 vanilla.....that's why it fails...
Comment 16 Patrizio Bassi 2007-11-06 13:31:09 UTC
guys, (Alan?) any news here?

can we have this in 2.6.24 fixed?
Comment 17 Alan 2007-11-06 13:41:01 UTC
At the moment I have no idea why your box fails.
Comment 18 Patrizio Bassi 2007-11-07 10:36:27 UTC
So sad, as linux user i will not give up and conitnue trying kernels, but without explicit patch i doubt it will be fixed as it never worked.

as said, any debug i can give, any patch i can try, just ping me
Comment 19 Patrizio Bassi 2008-07-27 11:42:33 UTC
Alan i tried 2.6.26 enabling pata generic and sis driver but same issue...no way to get kernel boot...
Comment 20 Willy Tarreau 2008-08-03 12:23:06 UTC
Created attachment 17069 [details]
various captures on willy's machine under 2.6.25.x

captures of dmesg, interrupts, ioports, lspci, partitions on willy's sis machine under 2.6.25.x
Comment 21 Willy Tarreau 2008-08-03 12:28:00 UTC
I've tried to boot this config (slightly adapted) on a somewhat similar mobo on
2.6.25.x (+minor patches). I have attached dmesg, lspci, interrupts, ioports and
partitions. It has worked quite well. The changes I brought to the config are not
relevant : removed FB, netfilter and crypto, then added support for squashfs and
increased initrd size to 16MB in order to boot my image from network.

Also, I first had a build error because a DSDT was referenced in the config. I had
to remove it in order to build. I don't know if that can cause boot problems, but
I would bet it could.

Patrizio, you may want to retry with the config I included in the tgz file since
it works here.
Comment 22 Patrizio Bassi 2008-08-03 12:44:50 UTC
tried to rebuild from scratch, deleted some old lilo config, it works!!!

i think we can close this, do you agree?

unfortunatly the suspend issue is still there, i'll track in another bug.

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