linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [2.6.10-rc2+] ide1=ata66 -- OBSOLETE OPTION, WILL BE REMOVED SOON!
Date: Tue, 14 Dec 2004 17:15:22 +0100	[thread overview]
Message-ID: <41BF119A.4070002@keyaccess.nl> (raw)
In-Reply-To: <58cb370e04121313473057143b@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

Bartlomiej Zolnierkiewicz wrote:

>>I do need a way to force an 80c cable on this AMD756 (ATA66 max) board,
>>since the BIOS doesn't seem to be setting the cable bits correctly.
> 
> 
> Ugh, I checked AMD datasheets and AMD756 doesn't support host
> side cable detection.  Well, we can try doing disk side only for it.
> [ ATi and ITE (in -ac kernels) drivers are also doing this. ]
> 
> --- amd74xx.c.orig	2004-11-02 14:17:14.000000000 +0100
> +++ amd74xx.c	2004-12-13 22:41:50.406229168 +0100
> @@ -344,10 +344,8 @@
>  			break;
>  
>  		case AMD_UDMA_66:
> -			pci_read_config_dword(dev, AMD_UDMA_TIMING, &u);
> -			for (i = 24; i >= 0; i -= 8)
> -				if ((u >> i) & 4)
> -					amd_80w |= (1 << (1 - (i >> 4)));
> +			/* no host side cable detection */
> +			amd_80w = 0x03;
>  			break;
>  	}
> 

Well, yes, works for me I guess. Was playing around to see if I could 
find something a bit more subtle but it seems nothing's available. My 
BIOS does show hdc (a DVD-ROM by the way) to be udma4 in its summary 
screen but it does not enable udma for it. I saw AMD_DRIVE_TIMINGS is 
not used for udma (and programmed by my BIOS to the highest PIO mode the 
device offers for all devices present) so also of no use...

Attached patch combines this and deleting a "use ide0=ata66" advice from 
the driver.

One slight cosmetic problem, with amd_80w set unconditionally the 
/proc/ide/amd74xx file's "cable type" line will now always show "80w" 
and seems likely to confuse people that have 40w cables installed. I 
believe the proc file may be on its way out anyway? If not, one option 
could be to print "n/a" for amd_config->flags & AMD_UDMA == AMD_UDMA_66 
(<= ?).

Rene.

[-- Attachment #2: linux-2.6.10-rc3_ata66.diff --]
[-- Type: text/x-patch, Size: 787 bytes --]

--- linux-2.6.10-rc3/drivers/ide/pci/amd74xx.c.orig	2004-12-14 11:33:21.000000000 +0100
+++ linux-2.6.10-rc3/drivers/ide/pci/amd74xx.c	2004-12-14 16:31:22.000000000 +0100
@@ -344,10 +344,8 @@
 			break;
 
 		case AMD_UDMA_66:
-			pci_read_config_dword(dev, AMD_UDMA_TIMING, &u);
-			for (i = 24; i >= 0; i -= 8)
-				if ((u >> i) & 4)
-					amd_80w |= (1 << (1 - (i >> 4)));
+			/* no host side cable detection */
+			amd_80w = 0x03;
 			break;
 	}
 
@@ -383,8 +381,6 @@
 	if (amd_clock < 20000 || amd_clock > 50000) {
 		printk(KERN_WARNING "%s: User given PCI clock speed impossible (%d), using 33 MHz instead.\n",
 			amd_chipset->name, amd_clock);
-		printk(KERN_WARNING "%s: Use ide0=ata66 if you want to assume 80-wire cable\n",
-			amd_chipset->name);
 		amd_clock = 33333;
 	}
 

  parent reply	other threads:[~2004-12-14 16:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-05 19:23 [2.6.10-rc2+] ide1=ata66 -- OBSOLETE OPTION, WILL BE REMOVED SOON! Rene Herman
2004-12-13 21:47 ` Bartlomiej Zolnierkiewicz
2004-12-14  6:51   ` Andre Hedrick
2004-12-14 16:15   ` Rene Herman [this message]
2004-12-15 23:52   ` Alan Cox
2004-12-16 14:29     ` Bartlomiej Zolnierkiewicz
2004-12-16 14:32       ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41BF119A.4070002@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=bzolnier@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).