From patchwork Wed Nov 25 17:03:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 39393 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 E14BE100995 for ; Thu, 26 Nov 2009 04:28:39 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759108AbZKYREm (ORCPT ); Wed, 25 Nov 2009 12:04:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759008AbZKYREk (ORCPT ); Wed, 25 Nov 2009 12:04:40 -0500 Received: from mail-fx0-f213.google.com ([209.85.220.213]:53682 "EHLO mail-fx0-f213.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759018AbZKYREj (ORCPT ); Wed, 25 Nov 2009 12:04:39 -0500 Received: by mail-fx0-f213.google.com with SMTP id 5so7204645fxm.28 for ; Wed, 25 Nov 2009 09:04:45 -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=bOzpHaq5YGFIff9J9SiXO0w2pjVNFgBjdz2zuUg1IyM=; b=YSEgOtGtbNilfvyAi1HjDIXAeM870rBcwqa3SZjamrNVIrFjp9bjixH9wzYWAW+SuN eDtKf5LSvKRU4qI3msjgDKg8RZLXFn2Ncn19tRxgxNAuDaX6DAmoLEmDvnCDEnYyU40F zwCLLrSkCtpVTe8WRu9Ku4F7oxzCiyF3iUZec= 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=jPwzBpUlDq6nuKhChG1UIdgI2VEKKvAAY0TRVgqvgoVD75J3KuAE8EO/nbvpnNtlOo oQJgcEEZx5wH74fmobWhP1PmlYps62NQhaxPCuJxBav1t+TryQtelMEdkhbpWyGfGLUS 5ZUGjavpJtf/mWaLdec6zSPrrOWZiruNnieUo= Received: by 10.216.93.12 with SMTP id k12mr2425680wef.195.1259168684722; Wed, 25 Nov 2009 09:04:44 -0800 (PST) Received: from ?127.0.0.1? (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id x6sm14631625gvf.7.2009.11.25.09.04.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 09:04:44 -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:03:58 +0100 Message-Id: <20091125170358.5446.6976.sendpatchset@localhost> In-Reply-To: <20091125170218.5446.13513.sendpatchset@localhost> References: <20091125170218.5446.13513.sendpatchset@localhost> Subject: [PATCH 14/86] pata_efar: fix wrong PIO timings being programmed 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_efar: fix wrong PIO timings being programmed * do not clear PIO timings for master when programming slave * do not clear PIO timings for device on the other port when programming slave device Both changes should be safe as this is how we have been doing things in IDE slc90e66 host driver for years. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ata/pata_efar.c | 5 +++-- 1 file changed, 3 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_efar.c =================================================================== --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c @@ -2,6 +2,7 @@ * pata_efar.c - EFAR PIIX clone controller driver * * (C) 2005 Red Hat + * (C) 2009 Bartlomiej Zolnierkiewicz * * Some parts based on ata_piix.c by Jeff Garzik and others. * @@ -118,12 +119,12 @@ static void efar_set_piomode (struct ata int shift = 4 * ap->port_no; u8 slave_data; - idetm_data &= 0xCC0F; + idetm_data &= 0xFF0F; idetm_data |= (control << 4); /* Slave timing in separate register */ pci_read_config_byte(dev, 0x44, &slave_data); - slave_data &= 0x0F << shift; + slave_data &= ap->port_no ? 0x0F : 0xF0; slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << shift; pci_write_config_byte(dev, 0x44, slave_data); }