Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964819AbWJJRSy (ORCPT ); Tue, 10 Oct 2006 13:18:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964866AbWJJRRs (ORCPT ); Tue, 10 Oct 2006 13:17:48 -0400 Received: from mail.kroah.org ([69.55.234.183]:34443 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S964876AbWJJRRZ (ORCPT ); Tue, 10 Oct 2006 13:17:25 -0400 Date: Tue, 10 Oct 2006 10:15:52 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk, htejun@gmail.com, Jeff Garzik , Daniel Drake , Greg Kroah-Hartman Subject: [patch 18/19] ahci: do not fail softreset if PHY reports no device Message-ID: <20061010171552.GS6339@kroah.com> References: <20061010165621.394703368@quad.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="ahci-do-not-fail-softreset-if-phy-reports-no-device.patch" In-Reply-To: <20061010171350.GA6339@kroah.com> User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1296 Lines: 42 -stable review patch. If anyone has any objections, please let us know. ------------------ From: Tejun Heo All softreset methods are responsible for detecting device presence and succeed softreset in such cases. AHCI didn't use to check for device presence before proceeding with softreset and this caused unnecessary reset retrials during probing. This patch adds presence detection to AHCI softreset. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik Cc: Daniel Drake Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/ahci.c | 6 ++++++ 1 file changed, 6 insertions(+) --- linux-2.6.17.13.orig/drivers/scsi/ahci.c +++ linux-2.6.17.13/drivers/scsi/ahci.c @@ -548,6 +548,12 @@ static int ahci_softreset(struct ata_por DPRINTK("ENTER\n"); + if (!sata_dev_present(ap)) { + DPRINTK("PHY reports no device\n"); + *class = ATA_DEV_NONE; + return 0; + } + /* prepare for SRST (AHCI-1.1 10.4.1) */ rc = ahci_stop_engine(ap); if (rc) { -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/