From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933099AbcHVQt2 (ORCPT ); Mon, 22 Aug 2016 12:49:28 -0400 Received: from www.osadl.org ([62.245.132.105]:37315 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933033AbcHVQt0 (ORCPT ); Mon, 22 Aug 2016 12:49:26 -0400 From: Nicholas Mc Guire To: Jon Mason Cc: Dave Jiang , Allen Hubbe , Logan Gunthorpe , Arnd Bergmann , Sudip Mukherjee , linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH 1/2] ntb_transport: make DMA_OUT_RESOURCE_TO HZ independent Date: Mon, 22 Aug 2016 18:51:35 +0200 Message-Id: <1471884696-25558-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org schedule_timeout_* takes a timeout in jiffies but the code currently is passing in a constant which makes this timeout HZ dependent, so pass it through msecs_to_jiffies() to fix this up. Signed-off-by: Nicholas Mc Guire --- Problem found by coccinelle script The below patch sets the timeout to 50ms - not clear what HZ setting was assumed during design/testing, so this needs an ack by someone who knows the driver and can confirm that 50ms is reasonable to wait on retries. Patch was compile tested with: x86_64_defconfig + CONFIG_NTB=m, CONFIG_NTB_TRANSPORT=m Patch is against 4.8.0-rc2 (localversion-next is -next-20160822) drivers/ntb/ntb_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c index 8601c10..4eb8adb 100644 --- a/drivers/ntb/ntb_transport.c +++ b/drivers/ntb/ntb_transport.c @@ -257,7 +257,7 @@ enum { #define NTB_QP_DEF_NUM_ENTRIES 100 #define NTB_LINK_DOWN_TIMEOUT 10 #define DMA_RETRIES 20 -#define DMA_OUT_RESOURCE_TO 50 +#define DMA_OUT_RESOURCE_TO msecs_to_jiffies(50) static void ntb_transport_rxc_db(unsigned long data); static const struct ntb_ctx_ops ntb_transport_ops; -- 2.1.4