From: "Randy.Dunlap" Subject: Re: [PATCH] Re: ATIIXP and libata Date: Mon, 12 Jun 2006 15:32:31 -0700 Message-ID: <20060612153231.a7e60b4a.rdunlap@xenotime.net> References: <20051105152756.86796.qmail@web86805.mail.ukl.yahoo.com> <447E11F9.1030804@seanodes.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from xenotime.net ([66.160.160.81]:6823 "HELO xenotime.net") by vger.kernel.org with SMTP id S932442AbWFLW3o convert rfc822-to-8bit (ORCPT ); Mon, 12 Jun 2006 18:29:44 -0400 Received: from midway.site ([71.245.102.105]) by xenotime.net for ; Mon, 12 Jun 2006 15:29:43 -0700 In-Reply-To: <447E11F9.1030804@seanodes.com> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Velu Erwan Cc: bzolnier@gmail.com, bruno_harbulot@yahoo.co.uk, linux-ide@vger.kernel.org On Thu, 01 Jun 2006 00:00:25 +0200 Velu Erwan wrote: > Bruno Harbulot a =E9crit : >=20 > >I had a closer look at the problem, and I've written the patch for > >ide-iops.c attached to this message. I wasn't sure about using > >hw_config or ata_id_is_sata to read word 93. > >Should other checks be performed? I'm not sure whether there should = be > >a test similar to "(ap->cbl =3D=3D ATA_CBL_SATA)" mentionned in the = patch > >posted on this list in "[PATCH] libata ATA vs SATA detection and > >workaround." on 30/09/04. > > =20 > > > Bartlomiej, I've tried the latest 2.6.17-rc5 and the atiixp still=20 > doesn't works out of the shelf. > Bruno's patch sounds to integrate the remarks you made about my crapp= y=20 > initial patch but it is not integrated. > I've applied it, and uncommenting its ata_id_is_sata() call. > On my ATIIXP (pundit-R), my performances are good ~55MB/sec. Without=20 > this patch I'm sticked at 14MB/sec. Where's Bart lately ?? > It is possible to apply that patch upstream to fix this issue ? > This patch applies to 2.6.17-rc5. >=20 > --- linux-2.6.17-rc5.20mdk/drivers/ide/ide-iops.c.old 2006-03-20=20 > 06:53:29.000000000 +0100 > +++ linux-2.6.17-rc5.20mdk/drivers/ide/ide-iops.c 2006-05-31=20 > 23:51:53.000000000 +0200 > @@ -1,6 +1,10 @@ > /* > + * linux/drivers/ide/ide-iops.c Version 0.38 Nov 05, 2005 > * linux/drivers/ide/ide-iops.c Version 0.37 Mar 05, 2003 > * > + * Version 0.38 80pin cable detection for SATA drive > + * (bruno_harbulot@yahoo.co.uk) > + *=20 > * Copyright (C) 2000-2002 Andre Hedrick > * Copyright (C) 2003 Red Hat > * > @@ -24,6 +28,7 @@ > #include > #include > #include > +#include > =20 > #include > #include > @@ -595,6 +600,12 @@ > */ > u8 eighty_ninty_three (ide_drive_t *drive) > { > + /* On SATA drives, word 93 (i.e. hw_config) should be 0. > + * This can be tested with the hw_config or this: */ > + if (ata_id_is_sata((u16*)(drive->id))) > + return 1; > + if (drive->id->hw_config =3D=3D 0) > + return 1; You don't need both of the if-tests above. In the previous patch revision (from Bruno), the first one was inside the comment block. > if(HWIF(drive)->udma_four =3D=3D 0) > return 0; > if (!(drive->id->hw_config & 0x6000)) --- ~Randy