Most recent kernel where this bug did *NOT* occur: 2.6.18.x Distribution: Gentoo Hardware Environment: Samsung P35 1600 III Software Environment: Problem Description: Got an ICH4 chipset. On 2.6.19 i tried to use the new ATA layer. Removed all from the old layer and only checked PATA Support for PIIX old und MPIIX. It does not find the controller - i have to check the PIIX SATA Support too - i think this should be a dependeny automatically set or build, because PATA does not work without the SATA driver for PIIX. The thing which wont work - my DVD drive is gone - the HDD works fine with the new layer, dmesg output: ata_piix 0000:00:1f.1: version 2.00ac6 ata1: PATA max UDMA/100 cmd 0x1F0 ctl 0x3F6 bmdma 0x1860 irq 14 ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x1868 irq 15 scsi0 : ata_piix ata1.00: ATA-7, max UDMA/100, 156368016 sectors: LBA48 ata1.00: ata1: dev 0 multi count 16 ata1.00: configured for UDMA/100 scsi1 : ata_piix ata2.00: ATAPI, max UDMA/33 ata2.00: configured for UDMA/33 scsi 0:0:0:0: Direct-Access ATA SAMSUNG MP0804H UE10 PQ: 0 ANSI: 5 ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata2.00: (BMDMA stat 0x4) ata2.00: tag 0 cmd 0xa0 Emask 0x4 stat 0x40 err 0x0 (timeout) ata2: soft resetting port ata2.00: configured for UDMA/33 ata2: EH complete ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata2.00: (BMDMA stat 0x4) ata2.00: tag 0 cmd 0xa0 Emask 0x4 stat 0x40 err 0x0 (timeout) ata2: soft resetting port ata2.00: configured for UDMA/33 ata2: EH complete ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata2.00: (BMDMA stat 0x4) ata2.00: tag 0 cmd 0xa0 Emask 0x4 stat 0x40 err 0x0 (timeout) ata2: soft resetting port ata2.00: configured for UDMA/33 ata2: EH complete ata2.00: limiting speed to UDMA/25 ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata2.00: (BMDMA stat 0x4) ata2.00: tag 0 cmd 0xa0 Emask 0x4 stat 0x40 err 0x0 (timeout) ata2: soft resetting port ata2.00: configured for UDMA/25 ata2: EH complete ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata1.00: (BMDMA stat 0x4) ata1.00: tag 0 cmd 0xca Emask 0x2 stat 0x58 err 0x0 (HSM violation) ata1: soft resetting port ata1.00: configured for UDMA/100 ata1: EH complete ata1: EH complete 2.6.18.1 output: Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx ICH4: IDE controller at PCI slot 0000:00:1f.1 ICH4: chipset revision 3 ICH4: not 100% native mode: will probe irqs later ide0: BM-DMA at 0x1860-0x1867, BIOS settings: hda:pio, hdb:pio ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:pio, hdd:pio Probing IDE interface ide0... hda: SAMSUNG MP0804H, ATA DISK drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 Probing IDE interface ide1... hdc: DV-W24ES, ATAPI CD/DVD-ROM drive ide1 at 0x170-0x177,0x376 on irq 15 hda: max request size: 512KiB hda: 156368016 sectors (80060 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100) hda: cache flushes supported hda: hda1 hda2 hda3 hda4 hdc: ATAPI 24X DVD-ROM DVD-R-RAM CD-R/RW drive, 2193kB Cache, UDMA(33) Steps to reproduce: Compile kernel without old ATA support, only include ATA, PIIX SATA, MPIIX PATA and PATA PIIX old PATA driver. Boot and watch. Any help welcome. thx, Torsten
Comment to first post: ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata1.00: (BMDMA stat 0x4) ata1.00: tag 0 cmd 0xca Emask 0x2 stat 0x58 err 0x0 (HSM violation) ata1: soft resetting port ata1.00: configured for UDMA/100 ata1: EH complete ata1: EH complete These lines from the output above was produced, trying to set different parameters to the ide hdd drive with hdparm - i have to do so to set -S0 to get rid of the annoying 5 seconds spin down/up cycles. However, does not work.
Yes its another of the billion examples of the broken new EH behaviour. libata PATA work is essentially halted barring some chip specific debug until this one gets sorted. Back out the new eh/probe code and everything works fine. Probably all these bugs should get merged into a single bug entry. [removing cc]
Created attachment 9730 [details] debug patch Please apply the attached patch on 2.6.19 and report boot dmesg.
Applied the patch, this was the output: libata version 2.00 loaded. ata_piix 0000:00:1f.1: version 2.00ac6 ata1: PATA max UDMA/100 cmd 0x1F0 ctl 0x3F6 bmdma 0x1860 irq 14 ata2: PATA max UDMA/100 cmd 0x170 ctl 0x376 bmdma 0x1868 irq 15 scsi0 : ata_piix ata1.00: ATA-7, max UDMA/100, 156368016 sectors: LBA48 ata1.00: ata1: dev 0 multi count 16 ata1.00: configured for UDMA/100 scsi1 : ata_piix ata2.00: ATAPI, max UDMA/33 ata2.00: configured for UDMA/33 ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata2.00: (BMDMA stat 0x4) ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in (scsi_eh_1) ata2: soft resetting port ata2.00: configured for UDMA/33 ata2: EH complete ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata2.00: (BMDMA stat 0x4) ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in (scsi_eh_1) ata2: soft resetting port ata2.00: configured for UDMA/33 ata2: EH complete ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata2.00: (BMDMA stat 0x4) ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in (scsi_eh_1) ata2: soft resetting port ata2.00: configured for UDMA/33 ata2: EH complete ata2.00: limiting speed to UDMA/25 ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen ata2.00: (BMDMA stat 0x4) ata2.00: cmd a0/01:00:00:00:00/00:00:00:00:00/a0 tag 0 cdb 0x12 data 36 in (scsi_eh_1) ata2: soft resetting port ata2.00: configured for UDMA/25 ata2: EH complete
Please test the attached patch.
Created attachment 9749 [details] common-pio-mode
Patch does not apply - i'll try my best to comply, but your are not using 2.6.19 vanilla, do you?
Created attachment 9752 [details] common-pio-mode-patch-against-2.6.19 Argh... You're right. I thought there was no xfermode related change in devel tree. Sorry about that. Here's regenerated patch against 2.6.19.
Created attachment 9756 [details] dmesg after patching Applied the changes myself - like the second patch ;-). Result are bad - drive still not there, same EH messages - but additionally, udev crashs ( kernel bug ) and the sound semaphore got some errors ( near end of dmesg ) - look at the complete dmesg dump. This only happens with the last patch, without - all is fine.
Comment to last one: All is fine except the bug discussed - thought of the udev crash and semaphore things ;-).
Created attachment 9954 [details] test patch
Please test the attached patch. It's against 2.6.19. Thanks and happy new year.
Created attachment 9956 [details] dmesg with applied test patch Applied the patch. No udev crash or oops anymore - but still no success with the dvd drive. The other patches are still applied, if i have to apply some of your patches against a clean tree plz tell. Best wishes for you too. Torsten
That's enough. Hmm... Can you give a shot at 2.6.20-rc2? Thanks.
Created attachment 9997 [details] libata patch cocktail Please test 2.6.20-rc3 with the patch applied, thanks.
Created attachment 10016 [details] dmesg with 2.6.20-rc3 + patch DVD is found now. Looks good - although if you look at the end of the dmesg report, sometimes there are some HSM Violations on the port with my harddisk drive - don't know if this is related to this bug, don't think so - should i create a new one or is this a known problem, or should we discuss here too?
Is there a chance to get this fix commited befor the 2.6.20 release? This bug makes kernels > 2.8.16 unusable for me (e.g. some recent distros like opensuse 10.2 and ubuntu feisty won't even install). Do you need any additional information? Regards Sero
Sorry, I didn't have time to work on this last week. The cocktail patch is cocktail of candidate fixes. I still need to narrow down which exact change fixes the problem. I'll post a patch to do that today or tomorrow. Thanks for your patience.
Thanks for your new patch cocktail Tejun Heo. It works fine against kernel-2.6.20-rc5, my DVD drive is found and all error messages are gone. I have to go to university now and will report back everything you requested in your mail this evening.
As I already wrote you via E-Mail the problem is gone for me in 2.6.20-rc5 (no need for you patches). So it seems my problem was a little different from the one in this bugreport.
With 2.6.20-rc5 the problem is gone for me too, my dvd drive is found and programmed without any problems. Should i still test your cocktail patch and reports things?
No, that's enough. Thanks. Closing this bug.