nForcersHQ
 
nForcersHQForumDistributed ComputingFAQLog inRegisterSearch
 
nForcersHQ

80 cable problem with nForce4
Post new topic Reply to topic    nForcersHQ.com Forum Index » nForce Linux
Login to view full posting options
Author Message
Google
AdSense

Back to top  
thefighter
nFHQ Member
nFHQ Member

Joined: 12 May 2006
Posts: 14

PostPosted: Mon Jul 24, 2006 2:36 pm    Post subject: 80 cable problem with nForce4

I'm trying to understand a problem behind a driver for nForce4 SATA. It tells me "I don't have the 80-cable conductor installed".

On the sata_nv driver for linux, the following is mentioned in a log when driver is loaded.

Quote:
NFORCE-CK804-SATA: BIOS didn't set cable bits correctly. Enabling workaround.


I need to know what this workaround is, what the code is and any other details about it. I cannot seem to find it anywhere after googling, just some posts that are not related and are from 2002

(If anybody could send me the sata_nv driver or post a link to an upload of it so I can look at the code, that would be great Very Happy)

Any help at all, would be greatly appriciated. Thank you all in advance Wink

TheFighter
Back to top
TedTS
Friendly machine
Ultra nForced
Ultra nForced

Joined: 22 Jul 2004
Posts: 2607
Location: a big cloud

PostPosted: Mon Jul 24, 2006 3:37 pm    Post subject:

80 cable on sata?!!!
i knew there are only 7
do you have any drives that use the ide controller?
Back to top
thefighter
nFHQ Member
nFHQ Member

Joined: 12 May 2006
Posts: 14

PostPosted: Tue Jul 25, 2006 10:37 am    Post subject:

80bit cable or something. Linux uses a workaround, and I need to know what it is. I cannot find it in the sata_nv.c code I've been looking at, can somebody please help.
Back to top
thefighter
nFHQ Member
nFHQ Member

Joined: 12 May 2006
Posts: 14

PostPosted: Tue Jul 25, 2006 9:59 pm    Post subject:

Bump
Back to top
thefighter
nFHQ Member
nFHQ Member

Joined: 12 May 2006
Posts: 14

PostPosted: Thu Jul 27, 2006 11:10 am    Post subject:

C'mon! Somebody must know how it works, please!
Back to top
pzgren
Linux Moderator
Moderator
Moderator

Joined: 18 Jun 2003
Posts: 1081
Location: The old Europe, Germany

PostPosted: Fri Jul 28, 2006 5:15 pm    Post subject:

thefighter wrote:
C'mon! Somebody must know how it works, please!

It seems you're using the ide driver amd74xx (AMD 755/756/766/8111 and nVidia nForce/2/2s/3/3s/CK804/MCP04) driver. Try if you can use the better and faster libata scsi driver...

From the source in linux-2.6.17.6/drivers/ide/pci/amd74xx.c

Code:

/*                                                                                                                                                                                           
 * Check 80-wire cable presence.                                                                                                                                                             
 */                                                                                                                                                                                           
                                                                                                                                                                                             
        switch (amd_config->flags & AMD_UDMA) {                                                                                                                                               
                                                                                                                                                                                             
                case AMD_UDMA_133:                                                                                                                                                           
                case AMD_UDMA_100:                                                                                                                                                           
                        pci_read_config_byte(dev, AMD_CABLE_DETECT, &t);                                                                                                                     
                        pci_read_config_dword(dev, AMD_UDMA_TIMING, &u);                                                                                                                     
                        amd_80w = ((t & 0x3) ? 1 : 0) | ((t & 0xc) ? 2 : 0);                                                                                                                 
                        for (i = 24; i >= 0; i -= 8)                                                                                                                                         
                                if (((u >> i) & 4) && !(amd_80w & (1 << (1 - (i >> 4))))) {                                                                                                   
                                        printk(KERN_WARNING "%s: BIOS didn't set cable bits correctly. Enabling workaround.\n",                                                               
                                                amd_chipset->name);                                                                                                                           
                                        amd_80w |= (1 << (1 - (i >> 4)));                                                                                                                     
                                }                                                                                                                                                             
                        break;                                                                                                                                                               
                                                                                                                                                                                             
                case AMD_UDMA_66:                                                                                                                                                             
                        /* no host side cable detection */                                                                                                                                   
                        amd_80w = 0x03;                                                                                                                                                       
                        break;                                                                                                                                                               
        }



Marcus[/code]
Back to top
thefighter
nFHQ Member
nFHQ Member

Joined: 12 May 2006
Posts: 14

PostPosted: Sun Jul 30, 2006 10:16 am    Post subject:

I dont get it, I'm confused which bit is the actual workaround.

if (((u >> i) & 4) && !(amd_80w & (1 << (1 - (i >> 4))))) { This is the bit that decides whether the 80-wire cable is present.

It then echos the message and then performs the workaround:

amd_80w |= (1 << (1 - (i >> 4)));

But I do not understand what this is actually doing, I'm trying to convert this into the following:

Code:
        if (ultraModeNumber > 2)
        {
            if ( f80PinCablePresent == false )
            {
                ERROR_LOG("%s: 80-conductor cable not detected on channel %u\n",
                    getName(), fChannelNumber);
                ultraModeNumber = 2;
            }
        }

        fBusTimings[unit].ultraEnabled = true;
        fBusTimings[unit].ultraModeNumber = ultraModeNumber;
        DEBUG_LOG("  selected Ultra mode %d\n", ultraModeNumber);
        publishDriveProperty(unit, kSelectedUltraDMAModeKey, ultraModeNumber);
    }


I'm trying to make it so that when it =false it will run the workaround. I cannot figure it out, can anybody explain to me what the workaround is doing. And thanks for that code pzgren Wink

TheFighter
Back to top
pzgren
Linux Moderator
Moderator
Moderator

Joined: 18 Jun 2003
Posts: 1081
Location: The old Europe, Germany

PostPosted: Sun Jul 30, 2006 1:15 pm    Post subject:

thefighter wrote:
I'm trying to make it so that when it =false it will run the workaround. I cannot figure it out, can anybody explain to me what the workaround is doing. And thanks for that code pzgren Wink

This is a problem with many bad BIOS! http://lkml.org/lkml/2005/8/1/59

Greetings,
Marcus
Back to top
Google
AdSense
Google
Back to top  
Display posts from previous:   
Post new topic   Reply to topic    nForcersHQ.com Forum Index » nForce Linux
All times are GMT Page 1 of 1


ToS | Privacy | Forum Rules | Contact | Advertise on this site
NVIDIA, the NVIDIA logo, NVIDIA nForce and all of the NVIDIA nForce product logos are trademarks of NVIDIA Corporation
nPowered by phpBB © 2007 phpBB Group  All rights reserved © 2001-2008 Michael Day nFHQ nForcersHQ.com | Fluffy-Gear.com
nForcersHQ supporters: Impar, wardog, MiniMax, envoid, jasonh, Krips, VAIOMAN, Zetro, sensai, me&er, RElliott, ScottRempel, JHogarth, IcemanIX, Etraman, KA, Tabajara, Xiomberg, ruddywarrior, hookahmike, MMoore, RHodgson, RGilson, powerarmour, Sepal, RRavat, DigitalRuin, HammerheadTech, Bane, DHunt, Fat Jez, baikal, Jumpin' Jon, MGadzikowski, JBishop, RDeBok, JDavies, HDHyland, TMorris