From patchwork Thu Aug 6 17:25:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 30875 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 bilbo.ozlabs.org (Postfix) with ESMTP id 459E1B7087 for ; Fri, 7 Aug 2009 03:25:58 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753360AbZHFRZz (ORCPT ); Thu, 6 Aug 2009 13:25:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755006AbZHFRZz (ORCPT ); Thu, 6 Aug 2009 13:25:55 -0400 Received: from smtp-out.google.com ([216.239.45.13]:4633 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753360AbZHFRZy (ORCPT ); Thu, 6 Aug 2009 13:25:54 -0400 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id n76HPp26005960; Thu, 6 Aug 2009 10:25:51 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1249579552; bh=d0GvLUFatEl0X0SMyckNnjtYd6Y=; h=DomainKey-Signature:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References; b=wSI/T9U8ijKRVQj5oTrMtvjYkD+JvnH41FWQmGmN wPd9su7glG6SJkMwW3VSksXfZaDNbRcpx89UFRAP7y2usA== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=kCePzN7ciMmV1EXqxxDsoseJ25MJuRoLrQ5622TFLfIwx0V3cyFXIY7EfCeVxKiOO qzkn+7E4I8qh2YFOtLwJw== Received: from localhost (hippo2.mtv.corp.google.com [172.18.118.87]) by wpaz37.hot.corp.google.com with ESMTP id n76HPm5w013046; Thu, 6 Aug 2009 10:25:48 -0700 Received: by localhost (Postfix, from userid 60833) id DAEBA5A5C6; Thu, 6 Aug 2009 10:25:47 -0700 (PDT) From: Gwendal Grignou To: jgarzik@pobox.com Cc: linux-ide@vger.kernel.org, Gwendal Grignou Subject: [PATCH] When a disk needs to be waken up from sleep, ensure that the command is retried by SCSI EH. Date: Thu, 6 Aug 2009 10:25:47 -0700 Message-Id: <1249579547-21091-1-git-send-email-gwendal@google.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <> References: <> Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Signed-off-by: Gwendal Grignou --- drivers/ata/libata-core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 8ac98ff..5b7616d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5145,6 +5145,8 @@ void ata_qc_issue(struct ata_queued_cmd *qc) /* if device is sleeping, schedule reset and abort the link */ if (unlikely(qc->dev->flags & ATA_DFLAG_SLEEPING)) { link->eh_info.action |= ATA_EH_RESET; + if (qc->scsicmd) + qc->scsicmd->allowed++; ata_ehi_push_desc(&link->eh_info, "waking up from sleep"); ata_link_abort(link); return;