From patchwork Wed Nov 25 17:06:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 39388 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id A2CB9B7067 for ; Thu, 26 Nov 2009 04:22:37 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759203AbZKYRWH (ORCPT ); Wed, 25 Nov 2009 12:22:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757410AbZKYRWG (ORCPT ); Wed, 25 Nov 2009 12:22:06 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:57397 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932116AbZKYRH3 (ORCPT ); Wed, 25 Nov 2009 12:07:29 -0500 Received: by mail-ew0-f219.google.com with SMTP id 19so596512ewy.21 for ; Wed, 25 Nov 2009 09:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=QvSotQHfT8MPs2UuxgmVS4v3nu3Q6TmlOJ5hmF3YCgU=; b=Tss6i9kkF6wF0vswztoSvwZaD1hNRiX9tS5ejZBWmWwrElKkzIYN0BA1UD6qKQ/yed 9VDZMnomBquaMY4bXyLNUUYAkvWdXrXCmxI9WIxM7O6Gv3vHdysVPRir+ol7RT8SCXGx Y506c03zk1hjIb7q9foYZNqI8umHDI3fV/J7U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=W1F1P/hrpOH0nZijOwzogvTlChWmqVbz/LbgvBVJaXnHzuJNGQgIfUozW7Cyp4Le+2 Fk+vNSsRpF9VGs2jPpDbvRngAiLjeC7lnWJUjIXo1ih5BT6cf0zgMaei03saFBIrE19o 33mAfoY+UA0IBMdlzaWQNbQVgvYXf2Jqatp/Q= Received: by 10.216.87.144 with SMTP id y16mr2740253wee.95.1259168854772; Wed, 25 Nov 2009 09:07:34 -0800 (PST) Received: from ?127.0.0.1? (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id g11sm14628988gve.3.2009.11.25.09.07.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 09:07:34 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: linux-ide@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz , linux-kernel@vger.kernel.org Date: Wed, 25 Nov 2009 18:06:50 +0100 Message-Id: <20091125170650.5446.8246.sendpatchset@localhost> In-Reply-To: <20091125170218.5446.13513.sendpatchset@localhost> References: <20091125170218.5446.13513.sendpatchset@localhost> Subject: [PATCH 38/86] pata_it8213: fix PIO2 underclocking Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Bartlomiej Zolnierkiewicz Subject: [PATCH] pata_it8213: fix PIO2 underclocking [ port of Sergei's fixes for pata_efar from commit 5f33b3b ] Fix the PIO mode 2 using mode 0 timings -- this driver should enable the fast timing bank starting with PIO2, just like the PIIX/ICH drivers do. Also, fix/rephrase some comments while at it. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ata/pata_it8213.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: b/drivers/ata/pata_it8213.c =================================================================== --- a/drivers/ata/pata_it8213.c +++ b/drivers/ata/pata_it8213.c @@ -92,18 +92,17 @@ static void it8213_set_piomode (struct a { 2, 1 }, { 2, 3 }, }; - if (pio > 2) - control |= 1; /* TIME1 enable */ + if (pio > 1) + control |= 1; /* TIME */ if (ata_pio_need_iordy(adev)) /* PIO 3/4 require IORDY */ - control |= 2; /* IORDY enable */ + control |= 2; /* IE */ /* Bit 2 is set for ATAPI on the IT8213 - reverse of ICH/PIIX */ if (adev->class != ATA_DEV_ATA) - control |= 4; + control |= 4; /* PPE */ pci_read_config_word(dev, idetm_port, &idetm_data); - /* Enable PPE, IE and TIME as appropriate */ - + /* Set PPE, IE, and TIME as appropriate */ if (adev->devno == 0) { idetm_data &= 0xCCF0; idetm_data |= control; @@ -122,7 +121,7 @@ static void it8213_set_piomode (struct a pci_write_config_byte(dev, 0x44, slave_data); } - idetm_data |= 0x4000; /* Ensure SITRE is enabled */ + idetm_data |= 0x4000; /* Ensure SITRE is set */ pci_write_config_word(dev, idetm_port, idetm_data); }