From patchwork Wed Nov 25 17:06:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 39403 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 C29A9100B36 for ; Thu, 26 Nov 2009 04:28:46 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932238AbZKYRWi (ORCPT ); Wed, 25 Nov 2009 12:22:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932387AbZKYRHK (ORCPT ); Wed, 25 Nov 2009 12:07:10 -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 S932219AbZKYRHH (ORCPT ); Wed, 25 Nov 2009 12:07:07 -0500 Received: by mail-ew0-f219.google.com with SMTP id 19so596512ewy.21 for ; Wed, 25 Nov 2009 09:07:13 -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=Zt4gPrcMyYwIuBDYzbl9nvkR4NARH/0S7/aMsuBXChk=; b=COyXWhH0Xqfev4hZYIKP40LqmekrK7EYDyKkMxsZ9G3K7w8NvWmOAEnFXgBJKp8AIC rs/1WOyQj5TL+dOh7M02512WpNTewq1H9dl37RXV0K2iYx/TWVV3lcmPAvwd3hPRqksZ 9kdrR3ssucqSjDbNedWLwreZ10yw681pbG8Uk= 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=ih4RWUZTpi7p0PUxl6BM8kBzIhv7UAWJ+xTaGTDAWvsYhob9LKIQLPjjDip2d8jma7 iQdKUFL+DTLprXN44oNwL+80/kHNo9GbZtL7rTnqRbtfJ23Pp2tVv6QRVa0WOISIvEb5 DZjfRUztc7NUXXU7qxHzSuAIzzJilKYhTijQo= Received: by 10.216.87.75 with SMTP id x53mr2673055wee.13.1259168833768; Wed, 25 Nov 2009 09:07:13 -0800 (PST) Received: from ?127.0.0.1? (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id t2sm14679029gve.24.2009.11.25.09.07.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 09:07:13 -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:30 +0100 Message-Id: <20091125170630.5446.62655.sendpatchset@localhost> In-Reply-To: <20091125170218.5446.13513.sendpatchset@localhost> References: <20091125170218.5446.13513.sendpatchset@localhost> Subject: [PATCH 35/86] pata_it8213: fix UDMA handling 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 UDMA handling Driver should program the cycle timing not the mode number (doing the latter results in wrong timings being used). There shouldn't be any problems with it as IDE it8213 host driver has been doing it this way for years. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ata/pata_it8213.c | 4 ++-- 1 file changed, 2 insertions(+), 2 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 @@ -173,10 +173,10 @@ static void it8213_set_dmamode (struct a udma_enable |= (1 << devid); - /* Load the UDMA mode number */ + /* Load the UDMA cycle time */ pci_read_config_word(dev, 0x4A, &udma_timing); udma_timing &= ~(3 << (4 * devid)); - udma_timing |= (udma & 3) << (4 * devid); + udma_timing |= u_speed << (4 * devid); pci_write_config_word(dev, 0x4A, udma_timing); /* Load the clock selection */