Bug 234684

Summary: [pata_amd IRQ?] Kernel on F7 LiveCD fails to set dma mode ->NO BOOT
Product: [Fedora] Fedora Reporter: drago01
Component: kernelAssignee: Alan Cox <alan>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: urgent Docs Contact:
Priority: medium    
Version: rawhideCC: cebbert, davej, jgarzik, zytemp2g
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-08 09:44:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 184121, 224205    
Attachments:
Description Flags
dmesg output
none
lspci -vvvv output none

Description drago01 2007-03-31 08:04:55 UTC
Description of problem:

I tryed to boot F7-T3-x86_64 live DVD but it failed because pata_amd was unable
to set xfer mode for my Plextor 755A drive (where the dvd was). After tyring 3
times it gave up with an error "could not mount root filesystem" and dropped me
to a shell. I mounted one of my local disks and captured the dmesg output
(attached).
The DVD boots fine on my ahci/ata_piix laptop, so it seems to be a problem with
sata_nv/pata_amd or with the Plextor driver itself (should run @ UDMA/66).
The drive works fine in FC6 (all kernels).

Steps to Reproduce:
1. Boot x86_64 LiveDVD
2. notice the errors

  
Actual results:

Cannot set xfer mode and mount root fs.

Expected results:

Should set xfer mode and mount root fs.

Comment 1 drago01 2007-03-31 08:04:55 UTC
Created attachment 151344 [details]
dmesg output

Comment 2 Dan Beard 2007-04-17 13:39:22 UTC
Similar failure in F7 LiveCD i386 tested on two HP laptops, ze5170 and ze4427.

"could not mount root filesystem" and then dropped to a shell.

No HDDs or DVD drives accessible.   No boot possible.



Comment 3 Dan Beard 2007-04-17 13:40:00 UTC
Similar failure in F7 LiveCD i386 tested on two HP laptops, ze5170 and ze4427.

"could not mount root filesystem" and then dropped to a shell.

No HDDs or DVD drives accessible.   No boot possible.

Comment 4 drago01 2007-04-21 18:46:17 UTC
Alan any idea what the problem might be? Do you need info?
test4 will be out soon and not booting on pata_amd (which are many boxes) isn't
nice ...

Comment 5 Alan Cox 2007-04-21 22:01:56 UTC
Everyone elses Nvidia and AMD boxes appear to work solidly and reliably with the
code and upstream code so I'm not to worried. If lots of people file test4
problems I'll panic 8)


Comment 6 drago01 2007-04-21 22:55:34 UTC
ok, so that means it has something to do with my setup? with kind of info is
needed to debug this?

Comment 7 Will Woods 2007-04-23 19:08:45 UTC
Test3 is known to have problems with pata_amd, nearly all of which will be fixed
in Test4. Have you tried one of the more recent LiveCD images?

You can find them at: http://torrent.fedoraproject.org/

Comment 8 drago01 2007-04-23 19:38:03 UTC
I was downloading it ... was to slow (14kb/s over my 6Mbit line) so I gave up...
I am currently downloading it again @24kb/s .... when I have it I will test.

Comment 9 drago01 2007-04-27 14:28:49 UTC
tested with test4 exactly the same problem.... well so much for having "blocker"
bugs....:(

Comment 10 drago01 2007-04-27 14:34:28 UTC
Created attachment 153624 [details]
lspci -vvvv output

here is the lscpi output (generated using FC6)

Comment 11 Will Woods 2007-04-27 15:12:30 UTC
What kind of a machine/motherboard is this? Could you give us a vendor / model
number or something similar? You mentioned the DVD drive and the motherboard
chipset but perhaps that particular motherboard has some kind of odd quirk..

Have you checked for a BIOS update for your system?

Comment 12 drago01 2007-04-27 15:47:29 UTC
The board is a DFI NFORCE4 SLI DR EXPERT, cpu: opteron 170, 2GB of RAM...
yes but it seems that I am already running the lastest BIOS.
conntected IDE/SATA devices:

IDE:
Plextor PX755A
Lite-on LTR-52246S
Seagate ST340823A 40GB hdd

SATA:
Hitachi HDS722525VLSA80 250GB hdd
Hitachi HDT722525DLA380 250GB hdd

any more info needed?

Comment 13 drago01 2007-04-28 11:30:24 UTC
ok I did some more testing using diskboot.img from todays rawhide booted from a
ubs flash device.
I seems that the problem is not the plextor drive but the lite-on.
what happens:
when I booted booted the the usbflash device it loaded fw-ohci,sata_nv and was
handing while loading pata_amd .... so I went to the shell to see what happens.
after trying to set UDMA66 some times it gives up and disabled the device, then
it detected the plextor as sr0 and continued to boot. so it seems that the
problem is:
Plextor drive supports UDMA66, the lite-on one doesn't (max UDMA33).
(they are attached to the same cable, plextor: master, lite-on: slave). so it
seems that pata_amd tryes to set the udmamode 66 for the lite-on drive (which
does not work; and fail because the drive does _not_ support this mode).
could it be that pata_amd only detects the udma mode "per cable" instead of "per
device" ? or is this some kind of "leak" ?
Alan any idea what might be wrong? does pata_amd has any known problem with this
 kind of config?
I hope this helps debugging and fixing this problem. Should I try with the
lite-on unplugged? (I can't do this today anymore because I won't be at home;
but I can do it tomorrow if you want)

Comment 14 drago01 2007-04-28 16:13:27 UTC
after reading the code it seems that the part that does this is in libata_core.c
not in pata_amd.c (correct me if I am wrong) 

Comment 15 drago01 2007-04-28 16:27:48 UTC
no I seems that was wrong its timing_setup in pata_amd.c which does the "real" work.

Comment 16 drago01 2007-04-29 12:06:37 UTC
ok I now tested with the lite-on drive unplugged and it seems that I was right,
It boots fine without any problems.
so it seems that there is some kind of conflict between this two devices on the
same cable...
Alan any ideas?

Comment 17 Alan Cox 2007-04-30 09:21:50 UTC
If we are seting UDMA66 for the Lite-On drive then the drive is reporting it
supports UDMA66 mode. We are still seeing lots of problems with a small range of
lite-on drives (ask google for "lite-on linux xfermode"). Your attached dmesg
however shows us trying to set UDMA33 and the drive repeatedly not doing so.


Comment 18 drago01 2007-04-30 09:31:05 UTC
(In reply to comment #17)
> If we are seting UDMA66 for the Lite-On drive then the drive is reporting it
> supports UDMA66 mode. We are still seeing lots of problems with a small range of
> lite-on drives (ask google for "lite-on linux xfermode"). Your attached dmesg
> however shows us trying to set UDMA33 and the drive repeatedly not doing so.
> 
seems you are correct I misread the dmesg output from test4 ... it trys to set
the correct mode but fails.... 
so whats the solution now? ditch it and buy a new (sata ;) ? based)  non lite-on
one? (only 30€ so its not that much of a problem)


Comment 19 Alan Cox 2007-04-30 15:21:04 UTC
Work is afoot upstream to try and fix this, just don't know when it'll get sorted


Comment 20 drago01 2007-05-02 12:07:21 UTC
(In reply to comment #19)
> Work is afoot upstream to try and fix this, just don't know when it'll get sorted
> 
ok, just for the record I tested on a nf3 board (also using pata_amd) which has
another lite-on drive (dvd) which also was the boot device and it worked fine;
so not all lite-on drives have this problem.


Comment 21 drago01 2007-05-28 06:53:28 UTC
should this patch fix it?
http://marc.info/?l=linux-ide&m=118027849331970&w=2
any chance to get it into fedora before its upstream (2.6.22) ?

Comment 22 Alan Cox 2007-06-06 14:21:11 UTC
The version in 2.6.22-rc is a bit different and a couple more bugs need knocking
out but it should be there by 2.6.22 final


Comment 23 Dave Jones 2007-08-27 14:27:31 UTC
Hows this looking with the current builds?


Comment 24 drago01 2007-09-08 07:52:53 UTC
I tested it with todays diskboot.img (2007/09/08) and pata_amd detected the
drive and the dma mode was set correctly. So I can confirm that this one is fixed.