Bug 344231

Summary: Problem with ITE IT8212 Controller and Fedora 7
Product: [Fedora] Fedora Reporter: Vince Radice <vhradice>
Component: kernelAssignee: Alan Cox <alan>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 7CC: cebbert, davej
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-01 11:38:38 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:
Attachments:
Description Flags
dmesg from latest boot none

Description Vince Radice 2007-10-21 06:15:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8

Description of problem:
I am having a problem with Fedora 7 recognizing the slave drive on an ITE IT8212 PCI controller card. When I boot, the ITE setup shows both drives. If I boot WIN ME, it shows both drives. If I boot the Fedora 7 DVD as if I were installing Fedora, it only shows the master drive - not the slave - when it gets to the configuration screen asking where I want to install Fedora. I wanted to put it on the slave drive. I was able to do that by replugging both drives and reversing the designation - the slave became the master and vice versa. Just for grins, I downloaded a Fedora v6 install DVD and booted it. It recognized both drives. That is, when the install process got to the point of asking where I wanted to install Fedore, both drives were listed. I think that this is a problem with v7.

Version-Release number of selected component (if applicable):
kernel 2.6.21-1.3194.fc7

How reproducible:
Always


Steps to Reproduce:
1.Requires 2 hard drives on an ITE IT8212 PCI controller
2.Boot the installation DVD
3.

Actual Results:
The configuration screen only shows 1 drive

Expected Results:
The configuration should show 2 drives

Additional info:

Comment 1 Chuck Ebbert 2007-10-22 15:30:19 UTC
Try the F7 respin. There were bugs in the original kernel...

http://spins.fedoraunity.org/spins


Comment 2 Vince Radice 2007-10-22 18:56:21 UTC
I am running the download now, but i have a question.  I have installed Fedora
by plugging the hardware to allow the controller to access the hdd I want to
use.  After the install, Fedora ran its update facility and installed 700+
fixes.  The current level is 2.6.22.9-91.fc7.  Does this have the fixes
installed?  If so, this is also not recognizing the slave hdd.  Thank you.

Comment 3 Chuck Ebbert 2007-10-22 20:33:28 UTC
(In reply to comment #2)
> I am running the download now, but i have a question.  I have installed Fedora
> by plugging the hardware to allow the controller to access the hdd I want to
> use.  After the install, Fedora ran its update facility and installed 700+
> fixes.  The current level is 2.6.22.9-91.fc7.  Does this have the fixes
> installed?  If so, this is also not recognizing the slave hdd.  Thank you.

Yes, it's basically the same kernel.

Can you post the contents of /var/log/dmesg after booting with the latest kernel?

Also 2.6.23.1 is in the updates-testing repository, can you try that?



Comment 4 Vince Radice 2007-10-22 20:50:01 UTC
Created attachment 234451 [details]
dmesg from latest boot

I have attached the log file as requested.

p.s. I like this method of reporting problems as opposed to the MS method.

Comment 5 Chuck Ebbert 2007-10-22 21:41:03 UTC
(In reply to comment #4)
> Created an attachment (id=234451) [edit]
> dmesg from latest boot
> 
> I have attached the log file as requested.
> 

Were both disks attached when the system was booted? If not, try again with both
disks attached and attach that.


Comment 6 Vince Radice 2007-10-23 02:47:29 UTC
Both disks were attached during that boot.

Fedora 6 sees both disks.  Can you determine what has changed during the boot
process between FC6 and FC7?

Also, FC8 will be coming out soon.  At this point, is it worthwhile to pursue
FC7 or wait until FC8 and try that version?  It doesn't look like many are
having this same problem - I appear to be the first.  I am willing to wait till
FC8 as this machine is for testing purposes.  Thanks.

Comment 7 Chuck Ebbert 2007-10-23 17:21:20 UTC
it821x: can't process command 0x27
ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (390721968)
ata1.00: ATA-7: MAXTOR STM3200820A, 3.AAE, max UDMA/100
ata1.00: 390721968 sectors, multi 0: LBA48 
ata1.00: Drive reports diagnostics failure. This may indicate a drive
ata1.00: fault or invalid emulation. Contact drive vendor for information.

0x27 is 'read native max address extended'

The second drive should show up as ata1.01, but there is no trace of it.

There seem to be lots of free ports on these controllers, can you try putting
the second drive as master on the second channel?


Comment 8 Alan Cox 2007-10-23 18:49:19 UTC
The 0x27 is expected - the IT821x firmware doesn't support 0x27 in RAID mode.
Ditto the diagnostics failure is what seems to be a bug in some firmware versions.

So both of those messages are expected.

What is odd is that it seems to be behaving as if the slave device doesn't exist
at all.

Looks like the reset sequence is deciding there is no slave present and not
seeing a signature. Could well be due to the RAID firmware but would need
specific debugging.



Comment 9 Vince Radice 2007-10-23 20:26:51 UTC
To Chuck, I cannot put the other hdd there.  Due to the way the BIOS handles
this device, I had to disable the onboard IDE controller #1 in order to use the
new controller.  If I move the hdd, I would have to disable the onboard
secondary controller.  It has my cd and dvd drives.  I could do it to test but I
cannot run that way.

To Alan, I am using the controller in IDE mode - not in any RAID configuration.

To both, If I boot the FC6 installation DVD, both drives show up.  What has
changed in the initialization process between these releases?

Thank you.

Comment 10 Alan Cox 2007-10-23 21:46:00 UTC
Your hardware is in RAID mode - its using the RAID firmware but you don't have
any RAID volumes defined so it presents the underlying disks.

As to FC6 - FC7, it would be easier to list what hasn't changed. Its basically a
rewrite of the entire initialisation and detection logic to support hotplug,
SATA and other new stuff.


Comment 11 Vince Radice 2007-10-23 22:34:21 UTC
Alan, I agree that the hardware is RAID capable, but I have it configured as
IDE.  Other options are RAID0-5 and JBOD.  How can I help figure out what is
wrong?  Thanks.


Comment 12 Alan Cox 2007-10-24 13:07:34 UTC
You have it configured for RAID mode the fact you don't have any RAID or JBOD
devices set up doesn't change this. To explain a bit further

The IT8212 has an IT8211 controller on it and a small microcontroller with
firmware which does RAID handling. If you  have the device in ATA/ATAPI mode it
uses the IT8211 and not the micrcontroller and can support CD-ROM and DVD
devices but not RAID. That mode normally works best.

If it is loaded with firmware by the BIOS then the microcontroller is used and
provides an interface to the PC which doesn't quite behave as real ATA and
supports only a subset of commands. Some boards have a jumper for this, some
actually require you flash new firmware to change it.

Both modes are *supposed* to work.

It need to set up a similar configuration here and see if I can duplicate it -
would be useful to know what firmware/BIOS revision the BIOS for the IT8212 you
have is reporting and I can try and find a card here with similar revision.

If the ability to pass options to boot modules was fixed after FC7 (Chuck - was
this sorted ?) then the boot option pata_it821x.noraid=1 will force the card
into ATA/ATAPI mode which I suspect will work around the problem.

Debugging it further will need a test environment and some debug kernels. I'll
try and duplicate the problem here as its much much easier to debug locally if I
can.


Comment 13 Chuck Ebbert 2007-10-24 15:18:09 UTC
(In reply to comment #12)
> If the ability to pass options to boot modules was fixed after FC7 (Chuck - was
> this sorted ?) then the boot option pata_it821x.noraid=1 will force the card
> into ATA/ATAPI mode which I suspect will work around the problem.
> 

Yes, but only after Fedora8 Test3, and only in live CD and installer images.

To get this option into the Fedora7 initrd, edit /etc/modprobe.conf and add this
line:

options pata_it821x noraid=1

Then rebuild the initrd with this command (assuming you are running the kernel
version that needs this fix):

mkinitrd $(uname -r)




Comment 14 Vince Radice 2007-10-24 15:36:15 UTC
Alan, the bios level reported by the card is 1.7.1.94.  I looked at the vendors
web site and the latest download available is up to 1.7.1.56.  It looks like
mine is more current.

Also, I downloaded the latest Beta for FC8 and tried it.  It acts the same as
FC7 - only the master is detected.  I tried to add the option to the boot
command in grub, but it was not valid.

Also, I noticed the update from Chuck.  Is that something I can do?

Comment 15 Alan Cox 2007-10-24 16:12:53 UTC
Ok I think I have a duplicate environment (roughly) that is showing the same
bug. I'll do some digging on that and try and work out where the slave drive has
gone


Comment 16 Vince Radice 2007-10-24 17:10:28 UTC
Alan and Chuck, I figured out how to run the mkinitrd command.  I updated the
modprobe.conf file and ran mkinitrd creating an initd img (I did not write over
the original) and booted with that.  My slave drive now shows up in the hardware
list.  Where do we go from here?  Thanks.

Comment 17 Alan Cox 2007-10-25 02:39:18 UTC
Right - I have a fix. Its not going to be ready for FC8 realistically as it
needs some upstream merging and also to make sure I don't "unfix' anything else
in the process.


Comment 18 Vince Radice 2007-10-26 13:32:47 UTC
I feel I need to add something.  Grub is acting the same.  It is not recognizing
the slave drive.  I have Windows installed there and need to be able to boot it.
 I have tried in grub to boot from it but all commands that reference (hd1) come
back device not found.  Do I need to report this problem to the folks supporting
grub or do/can you do that?  I would like to help if possible.  I also want to
thank you for the time spent working on this problem.

Comment 19 Alan Cox 2007-10-26 17:20:04 UTC
Grub uses the BIOS device mappings, that means if grub says there is no hd(1,0)
then you have a BIOS problem involved I think.

The fix for the problem your reported on the Linux side is in 2.6.24-mm devel
tree now so should hopefully make 2.6.25. Thanks for providing all the detail
needed to fix it.


Comment 20 Chuck Ebbert 2007-10-26 17:27:13 UTC
It's possible that JBOD mode might fix the problem, but I would be very cautious
about enabling that as it might cause loss of all data currently on the disks.

Comment 21 Vince Radice 2007-10-29 03:06:33 UTC
Chuck, I looked at JBOD and it says it will erase all data - not acceptable.

Alan, thanks for all your work.

Both, I think that I need to replace the IDE card with a better behaved one.  Is
there a brand/model that you could recommend?  Thanks.

Comment 22 Alan Cox 2007-10-29 10:17:35 UTC
The RAID mode is a bit quirky but when you specify pata_it821x noraid=1 you get
the direct access mode without firmware in the way and that side of the card is
very good, so I wouldn't replace it merely keep it in noraid mode

Alan


Comment 23 Vince Radice 2007-11-05 14:54:06 UTC
I have opened a problem with grub about this, but have had no response in a
week.  I think I may have to fix my problem and create a copy of grub for my
environment.  Is there any way I can find out the code changes that were made to
fix this problem and I can try to find the place in grub to do the same?  Thanks.

Comment 24 Alan Cox 2007-11-05 15:38:00 UTC
There are no equivalent changes. Grub just uses the BIOS EDD interfaces so if
grub sees only the master then the it821x bios is only advertising the master


Comment 25 Vince Radice 2007-11-07 21:28:19 UTC
Alan,

What does Fedora do with 
options pata_it821x noraid=1

I assume that it means to send the controller some sort of commands.  Is there a
list someplace of what commands the controller will accept and what they do?

Can I find out exactly what coding changes were made to fix my problem?

Thanks,
Vince Radice

Comment 26 Alan Cox 2007-11-07 21:50:48 UTC
noraid causes Linux to reset the controller back out of firmware mode 

That is done by setting config byte 0x5E to 1, 0x50 to 0,  and restoring a
sensible value to PCI_COMMAND. Then set 0x40 to A0F3 0x4C to 0x02040204 and 0x42
to 36, finally restore the latency timer to 0x20

Then changes in the detection code are subtle and buried deep in the libata core.

Alan