From patchwork Tue Oct 6 22:27:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 35162 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 72D65B7BC2 for ; Wed, 7 Oct 2009 09:45:39 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933480AbZJFW2K (ORCPT ); Tue, 6 Oct 2009 18:28:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933471AbZJFW2J (ORCPT ); Tue, 6 Oct 2009 18:28:09 -0400 Received: from mail-fx0-f227.google.com ([209.85.220.227]:61350 "EHLO mail-fx0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933466AbZJFW2G (ORCPT ); Tue, 6 Oct 2009 18:28:06 -0400 Received: by mail-fx0-f227.google.com with SMTP id 27so4123475fxm.17 for ; Tue, 06 Oct 2009 15:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:mime-version:message-id:content-type :content-transfer-encoding; bh=L5h/GqX6jdGVeHZZ7A96WILKs62UvNik8Gg8Qgvmc1g=; b=YXisafIEO1tEu8PG8w46BuyPNKbH5XIOVr/Ij3PH/zGVW2l/1ldLHY/z2NTUHakema jy1SZU9o3kDgT8sHiYvufM9c5VGgFaYOh3ILbkjVsWg/qnT9u+F9//0ngmOaTgw/SqrN 1OuzczCUpIIS4BkaUtzXlHbpuisPAasJPJJxg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:message-id :content-type:content-transfer-encoding; b=i4Q5SNZs3zs/ySRmdT4dp6t3rZIneuKypRQF24TGA7g3m7dtUmzFf9EAVflN+H6Eyp ksM5x4m82l7GETlYiLJR9KgFxnTDV00yS95uovJ+1p+hi8J5EQEhKcbbtonGP8aa3Pk4 hA3qH57x6KlBcoEwTp6DCggXy1C4SC5nLYWkc= Received: by 10.103.126.36 with SMTP id d36mr941082mun.104.1254868074660; Tue, 06 Oct 2009 15:27:54 -0700 (PDT) Received: from szaki.localnet (chello089077034197.chello.pl [89.77.34.197]) by mx.google.com with ESMTPS id b9sm475330mug.3.2009.10.06.15.27.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 06 Oct 2009 15:27:53 -0700 (PDT) From: Bartlomiej Zolnierkiewicz To: Linus Torvalds Subject: [PATCH 2/2] Revert "Revert "ide: try to use PIO Mode 0 during probe if possible"" Date: Wed, 7 Oct 2009 00:27:45 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.31.1-56.fc12.x86_64; KDE/4.3.1; x86_64; ; ) Cc: "David S. Miller" , Joao Ramos , David Fries , d.stussy@yahoo.com, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-Id: <200910070027.45678.bzolnier@gmail.com> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Bartlomiej Zolnierkiewicz Subject: [PATCH] Revert "Revert "ide: try to use PIO Mode 0 during probe if possible"" This reverts commit 24df31acaff8465d797f0006437b45ad0f2a5cb1. The root cause of reported system hangs was (now fixed) sis5513 bug and not "ide: try to use PIO Mode 0 during probe if possible" change (commit 6029336426a2b43e4bc6f4a84be8789a047d139e) so the revert was incorrect (it simply replaced one regression with the other one). Signed-off-by: Bartlomiej Zolnierkiewicz Cc: David S. Miller Cc: Joao Ramos Cc: David Fries Cc: d.stussy@yahoo.com --- drivers/ide/ide-probe.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 4d76ba4..63c53d6 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -1046,6 +1046,15 @@ static void ide_port_init_devices(ide_hwif_t *hwif) if (port_ops && port_ops->init_dev) port_ops->init_dev(drive); } + + ide_port_for_each_dev(i, drive, hwif) { + /* + * default to PIO Mode 0 before we figure out + * the most suited mode for the attached device + */ + if (port_ops && port_ops->set_pio_mode) + port_ops->set_pio_mode(drive, 0); + } } static void ide_init_port(ide_hwif_t *hwif, unsigned int port,