From patchwork Fri Aug 7 22:26:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 30989 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 68B1CB7B60 for ; Sat, 8 Aug 2009 08:27:55 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750810AbZHGW1v (ORCPT ); Fri, 7 Aug 2009 18:27:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751144AbZHGW1v (ORCPT ); Fri, 7 Aug 2009 18:27:51 -0400 Received: from smtp-out.google.com ([216.239.45.13]:27992 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbZHGW1v (ORCPT ); Fri, 7 Aug 2009 18:27:51 -0400 Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id n77MQvxK004761; Fri, 7 Aug 2009 15:26:57 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1249684017; bh=cwVPPkPTwAnlbOaGwHCpTgxsjdA=; h=DomainKey-Signature:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References; b=YlY/N9koIV8BW8SPyQopigBLCXWJnaxC6rXoPmyl vkPA/mfNtupzH0RJ3WS03wrCqalLsV1Rfz4QqmufA+8Oww== 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=n//ZQj3LxWAB88gul0nTheJk7l0gOvGh88tuF34AVJ4NgT6c9Ix9df/xxiedbNQXr 6nmbcJHWTjYQ7ABErXx4w== Received: from localhost (hippo2.mtv.corp.google.com [172.18.118.87]) by wpaz5.hot.corp.google.com with ESMTP id n77MQr84001063; Fri, 7 Aug 2009 15:26:54 -0700 Received: by localhost (Postfix, from userid 60833) id 904465A670; Fri, 7 Aug 2009 15:26:53 -0700 (PDT) From: Gwendal Grignou To: tj@kernel.org Cc: jgarzik@pobox.com, 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: Fri, 7 Aug 2009 15:26:53 -0700 Message-Id: <1249684013-24307-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 --- drivers/ata/libata-eh.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Acked-by: Tejun Heo diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 79711b6..202da9c 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1183,14 +1183,14 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc) * should be retried. To be used from EH. * * SCSI midlayer limits the number of retries to scmd->allowed. - * scmd->retries is decremented for commands which get retried + * scmd->allowed is incremented for commands which get retried * due to unrelated failures (qc->err_mask is zero). */ void ata_eh_qc_retry(struct ata_queued_cmd *qc) { struct scsi_cmnd *scmd = qc->scsicmd; - if (!qc->err_mask && scmd->retries) - scmd->retries--; + if (!qc->err_mask) + scmd->allowed++; __ata_eh_qc_complete(qc); }