Bug 56505

Summary: via82cxxx.c driver prohibited from ata66 and ata100
Product: [Retired] Red Hat Linux Reporter: Jim Wright <jwright>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: ppokorny
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: 2002-10-26 05:38:31 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:

Description Jim Wright 2001-11-20 07:34:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.8-xfs i686)

Description of problem:
redhat kernels apply linux-2.4.2-viadma66.patch, up to and including the
2.4.9-13 kernel.  this patch adds a single line of code.  as best I can
tell, the only effect of this patch is to force the driver into never
thinking it has an 80 conductor cable attached, and hence never allowing
the driver to get beyond udma2 speeds.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. install on mobo with supported chipset (e.g. vt8233)
2. use appropriate cable
3. use appropriate hard drive
	

Actual Results:  limited to udma2 speeds.  printk message is

Nov 19 21:29:26 eng243 kernel: ide0: Speed warnings UDMA 3/4/5 is not
functional.


Expected Results:  blazing fast speeds!

Additional info:

lots of details omitted, but:



unsigned int __init pci_init_via82cxxx(struct pci_dev *dev, const char
*name)
{

/*
 * Check 80-wire cable presence and setup Clk66.
 */

    switch (via_config->flags & VIA_UDMA) {
        case VIA_UDMA_100:
            via_80w |= (1 << (1 - (i >> 4)));
            break;
        case VIA_UDMA_66:
            via_80w |= (1 << (1 - (i >> 4)));
            break;
    }
    via_80w = 0;


This last line simply overrides whatever we determined above in the case
statement.  I believe this was either meant to fix an uninitialized
variable or was done to "blacklist" all via chipsets.  If the former, then
it is wrong and needs to be fixed.  If the latter, then a more
straightforward method could be found.

Comment 1 Arjan van de Ven 2001-11-20 09:10:43 UTC
It is intended to blacklist all via chipsets for AUTODETECTION of the 80 ribbon
cable. We have several reports where the chipset got it wrong, and as a result
corrupted the filesystem. If you know you have an 80 ribbon cable, specifying
"ide0=ata66" on the kernel commandline will override this (disabled)
autodetection. (quite a few other chipsets lack autodetection at all and this is
needed for those too)

Comment 2 Jim Wright 2001-11-29 17:25:34 UTC
Could you enhance the patch so it is not so mysterious in it's workings?
For example, instead of just

    via_80w = 0;

how about

    via_80w = 0;
    printk("All VIA chipsets untrusted for 80W detection; see via82cxxx.c.\n");
    /* It is intended to blacklist all via chipsets for AUTODETECTION of the 80
wire
      * cable. We have several reports where the chipset got it wrong, and as a
result
      * corrupted the filesystem. If you know you have an 80 wire cable,
specifying
      * "ide0=ata66" on the kernel commandline will override this (disabled)
      * autodetection.
      */

Comment 3 Jim Wright 2001-11-29 17:39:24 UTC
actually make that

"ideX=ata66" (where X is the specifies the interface in question) on the kernel
commandline

Comment 4 David Balažic 2001-12-13 17:00:08 UTC
And I also recommend to change the name of the option.
ideX=80wire

less confusing


Comment 5 Jim Wright 2002-10-26 05:38:24 UTC
2.4.18-17.7.x is much changed.  above comments no longer apply.  I can't say if
the code is working any better for my particular box, since I moved all the
drives to a PCI IDE interface.  this can be closed.