Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1070132ybz; Wed, 22 Apr 2020 12:59:48 -0700 (PDT) X-Google-Smtp-Source: APiQypLaHWNlD9DakhZnEZV7NegZ/8hMEGQ4psSnfZxWxCmuQJMRfRlWWXutj/sMzNxgmzI3WwI5 X-Received: by 2002:a50:8d4a:: with SMTP id t10mr240229edt.63.1587585587878; Wed, 22 Apr 2020 12:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587585587; cv=none; d=google.com; s=arc-20160816; b=xxXOjgWhxvzF2Db/ylQgCbUQHDyP0OfOVsRSmHMKy32gadzESHnz6XAKW7PWATcqk0 2EKn5GL1YkXcPoUYll5rI32osPYa9UtxO4UJA6e/qMWeIhHi9hvCWCOcA/MnEgjrIr9t ZhefXVGZEaVu+nMwjPfM8kl5nTLVyv1NiJ6+aPZvzPWYLsBrqm0+rx6EhWVbUegMhFOn zwMxNo4lvMHO4mb44O/lftiCwYbGs6r2AV1U7sRZT7qYHG6J98p/NWb9DI2Jn3NS3B5y gXxbjV9Hn+lwwbcjK3O/0WifIvT3SnQ9FRODVjzCEc4JEicAPL3RyAUF+pxzp/CrLIxK U6yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=ukZDoEepAcQhAdalK7094ukeeotLLo/ER0/tucPrQw0=; b=Vs+KYHscDERl1vV9GQbjwcgxj4mBx4D72gmdnudXjUAONHgoNS6MXI00yLwXXcFVy5 S4oHb86W/hN6v740BU9FuhECqvnWsk3YXwViL83bdue/+a7jLEZVga5ibD24r80006wu mtkVYoFl9I8n5sSj3qai58TnrdA29/jRdN/6bPtxb7nna0PMDOyv4znWNujsuutnibsH pKqzbUbnIv+sprqaIb3BIk2R6PIEgOjj4FlV82/5LS2KaZL0kkB70BxAK92qED4X81DR hWVL648FmAUNg2uv6vkHLnAt3sSCc3jL5jGI8j4MM/sjmt8pQ0eyjAeaBHHMXxFW4TyM 2bHw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si96028edg.380.2020.04.22.12.59.24; Wed, 22 Apr 2020 12:59:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726271AbgDVT6Y (ORCPT + 99 others); Wed, 22 Apr 2020 15:58:24 -0400 Received: from mga18.intel.com ([134.134.136.126]:20218 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725779AbgDVT6X (ORCPT ); Wed, 22 Apr 2020 15:58:23 -0400 IronPort-SDR: EEwRg7byctDghsc1FPRi5gMLXTE8C4ANQqQeAhSY7L2Sz/u7s6+7dhDwUAADIvaKx/g+ILuVPA lD5zRTDhWNew== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 12:58:22 -0700 IronPort-SDR: aT2RPqHwr8m51PNAPbDq64LJkS+4JGwNNFc6WOCEF96cg94eEf4Hxm2hVi63X98J66ziHAv+vR NorCx654IAEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,304,1583222400"; d="scan'208";a="457263281" Received: from djiang5-mobl1.amr.corp.intel.com (HELO [10.134.45.139]) ([10.134.45.139]) by fmsmga006.fm.intel.com with ESMTP; 22 Apr 2020 12:58:21 -0700 Subject: Re: [PATCH v2 3/3] dmaengine: ioat: adding missed issue_pending to timeout handler To: leonid.ravich@dell.com, dmaengine@vger.kernel.org Cc: lravich@gmail.com, Vinod Koul , Dan Williams , Greg Kroah-Hartman , Thomas Gleixner , "Alexander.Barabash@dell.com" , linux-kernel@vger.kernel.org References: <20200416170628.16196-2-leonid.ravich@dell.com> <1587583557-4113-1-git-send-email-leonid.ravich@dell.com> <1587583557-4113-3-git-send-email-leonid.ravich@dell.com> From: Dave Jiang Message-ID: Date: Wed, 22 Apr 2020 12:58:21 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <1587583557-4113-3-git-send-email-leonid.ravich@dell.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/22/2020 12:25 PM, leonid.ravich@dell.com wrote: > From: Leonid Ravich > > completion timeout might trigger unnesesery DMA engine hw reboot > in case of missed issue_pending() . > > Acked-by: Dave Jiang > Signed-off-by: Leonid Ravich > --- > Changing in v2 > - add log in case of such scenario > drivers/dma/ioat/dma.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c > index 55a8cf1..a958aaf 100644 > --- a/drivers/dma/ioat/dma.c > +++ b/drivers/dma/ioat/dma.c > @@ -955,6 +955,14 @@ void ioat_timer_event(struct timer_list *t) > goto unlock_out; > } > > + /* handle missed issue pending case */ > + if (ioat_ring_pending(ioat_chan)) { > + dev_dbg(to_dev(ioat_chan), "Complition timeout while pending\n") Completion timeout with pending descriptors. Also, maybe dev_warn() you think? > + spin_lock_bh(&ioat_chan->prep_lock); > + __ioat_issue_pending(ioat_chan); > + spin_unlock_bh(&ioat_chan->prep_lock); > + } > + > set_bit(IOAT_COMPLETION_ACK, &ioat_chan->state); > mod_timer(&ioat_chan->timer, jiffies + COMPLETION_TIMEOUT); > unlock_out: >