Distribution: Ubuntu Gutsy WDC WD1200JB(pata) connected with sata->ide adapter to sata_sil. With kernel 2.6.22 it get error "failed to set xfermode" and with 2.6.24-rc3(ubuntu package): [ 37.665881] ata2.00: failed to IDENTIFY (I/O error, err_mask=0x40) [ 37.665884] ata2.00: revalidation failed (errno=-5)
Created attachment 13866 [details] 2.6.24-rc3-dmesg
Created attachment 13867 [details] 2.6.22-dmesg
Firs this bug was reported to ubuntu backtrack, see: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/153096
Created attachment 13868 [details] debug.patch
Created attachment 13869 [details] debug.patch
Created attachment 13870 [details] 2.6.24-rc3-dmesg
Created attachment 13879 [details] Log file with debug patch enabled. This is a log file of booting the 2.6.24-1 kernel on my PC with the debug patch mentioned above in kernel. I am now using 2.6.20(-16, Ubuntu feisty) and the harddrives both work great. Only one works in newer kernels. SATA controller is Sil 3112 SATA Controller onboard on a Abit NF7-S v2.0 motherboard. Chipset is NVIDIA nForce2 SPP.
Created attachment 13881 [details] sata_sil-irq-fix.patch Please test whether the attached patch fixes the problem.
Created attachment 13888 [details] dmesg output of problem from 2.6.22 kernel This is the dmesg from 2.6.22 bootup using a generic SIL3112 card and a HD attached with a SATA->PATA bridge, a SD-ADSAIDE-S1, with a sil3611ct80 chip on board.
The patch works for me. - kernel 2.6.24-rc4 - Abit NF7-S mobo with onboard sil3112, hard drive attached with a Abit Serillel pata-to-sata bridge (I think it uses the sil3611 chip). Now I can finally upgrade the kernel... I've been stuck with 2.6.21 for ages :)
Created attachment 13890 [details] Reject from trying to apply sata_sil-irq-fix patch to 2.6.22 source
Created attachment 13891 [details] Reject from trying to apply sata_sil-irq-fix patch to 2.6.22 source
The patch didn't apply cleanly, and when I tried to apply the patch by hand and compile, I get the following error: drivers/ata/libata-core.c: In function 'ata_std_postreset': drivers/ata/libata-core.c:3583: error: 'link' undeclared (first use in this function) drivers/ata/libata-core.c:3583: error: (Each undeclared identifier is reported only once drivers/ata/libata-core.c:3583: error: for each function it appears in.)
@Mark This patch is against 2.6.24-rc4
Alexey, can you confirm the fix too?
Alexey filed it here on our behalf as the bug originally was in Ubuntu's launchpad. He doesn't have this problem himself. I tried to build and install a kernel, but I got trouble when installing it (not related to your code). I will try to build it again in some hours.
Here is my kernel i use on my system for debug purpose, there is no sound and should be no network for you. sata_sil is enabled and patched, at leas this should work. http://rapidshare.com/files/74878489/linux-image-2.6.24-rc4-patched_2.6.24-rc4-patched-10.00.Custom_i386.deb check if it complete: md5sum linux-image-2.6.24-rc4-patched_2.6.24-rc4-patched-10.00.Custom_i386.deb should be: 8c6198b90c2cf050023d9e4529aab838 to install use: sudo dpkg -i linux-image-2.6.24-rc4-patched_2.6.24-rc4-patched-10.00.Custom_i386.deb to remove: sudo dpkg -r linux-image-2.6.24-rc4-patched
Patch works! :) Thanks a lot Tejun for the fix and Alexey for all the help debugging and making it work!
Created attachment 13903 [details] sata_sil-irq-fix patch from my 2.6.22 build environment. This is the sata_sil-irq-fix patch file, but name and location adjusted for the 2.6.22 kernel. It works fine there after changing the name in libaba-core.c. My 2.6.22 kernel is now booting correctly.
Yeah, this one is for -stable too. I'll forward the patch upstream and -stable. Resolving as CODE_FIX. Thanks.