From patchwork Thu Mar 7 15:00:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 1052991 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=prevas.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=prevas.se header.i=@prevas.se header.b="KNvJnan6"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44FYjB2thTz9sNB for ; Fri, 8 Mar 2019 02:00:46 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726340AbfCGPAl (ORCPT ); Thu, 7 Mar 2019 10:00:41 -0500 Received: from mail-eopbgr10092.outbound.protection.outlook.com ([40.107.1.92]:25413 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726161AbfCGPAk (ORCPT ); Thu, 7 Mar 2019 10:00:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=prevas.se; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LncPgjgPhnOpPx15qcbtK0vpBjiS4fmDv6F2xae+nA4=; b=KNvJnan6nVKVPNAt9eVdsfuKcHNJnrHzHR74wg1MJ8eChZQME99IZPf2EJr3e+CaW+U3qYdbeQ5sI3HrDJYEBqIDbmI6jx3FEK97zBboaYnkPmekHPgr5A/nuRMHfMZj36q3PSXKJyFdBUvNg200LdDFHbiNc24k3YAUL4p3beY= Received: from VI1PR10MB2672.EURPRD10.PROD.OUTLOOK.COM (20.178.126.212) by VI1PR10MB0605.EURPRD10.PROD.OUTLOOK.COM (10.167.202.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1686.16; Thu, 7 Mar 2019 15:00:34 +0000 Received: from VI1PR10MB2672.EURPRD10.PROD.OUTLOOK.COM ([fe80::51c2:2f6a:3148:4a1f]) by VI1PR10MB2672.EURPRD10.PROD.OUTLOOK.COM ([fe80::51c2:2f6a:3148:4a1f%3]) with mapi id 15.20.1686.018; Thu, 7 Mar 2019 15:00:34 +0000 From: Rasmus Villemoes To: Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" CC: Thomas Winding , Fabio Estevam , Per Christensen , Rasmus Villemoes , "linux-can@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] can: flexcan: bump FLEXCAN_TIMEOUT_US to 250 Thread-Topic: [PATCH] can: flexcan: bump FLEXCAN_TIMEOUT_US to 250 Thread-Index: AQHU1PaDftXKRmjpAUe9LFJjLfS9rQ== Date: Thu, 7 Mar 2019 15:00:33 +0000 Message-ID: <20190307150024.23628-1-rasmus.villemoes@prevas.dk> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HE1PR0802CA0013.eurprd08.prod.outlook.com (2603:10a6:3:bd::23) To VI1PR10MB2672.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e3::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Rasmus.Villemoes@prevas.se; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [81.216.59.226] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: acb32c2f-12a9-4001-7d0f-08d6a30da616 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:VI1PR10MB0605; x-ms-traffictypediagnostic: VI1PR10MB0605: x-microsoft-antispam-prvs: x-forefront-prvs: 096943F07A x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(366004)(396003)(39850400004)(346002)(136003)(189003)(199004)(4326008)(25786009)(74482002)(97736004)(36756003)(4744005)(3846002)(6486002)(6436002)(8976002)(26005)(53936002)(71190400001)(110136005)(44832011)(54906003)(6116002)(2906002)(50226002)(71200400001)(186003)(42882007)(476003)(2616005)(1076003)(99286004)(256004)(14444005)(102836004)(6506007)(106356001)(52116002)(486006)(105586002)(6512007)(316002)(66066001)(8936002)(14454004)(305945005)(7736002)(68736007)(478600001)(72206003)(81166006)(8676002)(81156014)(386003)(5660300002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR10MB0605; H:VI1PR10MB2672.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: prevas.se does not designate permitted sender hosts) x-microsoft-exchange-diagnostics: =?iso-8859-1?q?1=3BVI1PR10MB0605=3B23?= =?iso-8859-1?q?=3AJDfweim+MJBQ8pg3HV10J2awZNVrb+Mc0p8ue6sgQOETfTtz?= =?iso-8859-1?q?UGfdTS7JhLkqbFtUJ6freR6qjgGmX9SDPf9Kp6/pwLi3jeXNvor?= =?iso-8859-1?q?h3g4tdTV52/dj7nLZqWytkZ75h6tT1JkuDeQHlIwEzTyvcxGtAy?= =?iso-8859-1?q?DBCPxn9tke96PgXsFn8LOUvBUSi2/zDJOAtNyufZTgFeC0mU03J?= =?iso-8859-1?q?HH3gLRQG5PlQLk3TOZVZh6Ng1vULKKQiq010LY5UyNjeOUsk6Tj?= =?iso-8859-1?q?tvo3LcEqW7Ov4OPDPTD1vKCllPZQ08a9wRp9tJl3jGvF8LTOkBF?= =?iso-8859-1?q?J4wlOuhk2BNamq/h76zxdEvoCjWxpAWQgw0W+rzbx5/dCjADDzW?= =?iso-8859-1?q?Yt3DpP+QYJyurkLUMILRGbWP77Yx+mHtLUzYdTrVrvNkJI3qTN7?= =?iso-8859-1?q?fHeESTjARK9VE0LJ4IkUlTmiwn+su/TWeP8iqCk8WaGNxMWIfRN?= =?iso-8859-1?q?cD0JfTd9PDHL8AB3+p9Er993ohiCvJsgf7MHt5DdDqX5o8GhImn?= =?iso-8859-1?q?j/wRfvilgl/RV9/KfsWmiNMZdV9P03ZLW/4IIQIq1p9XwEluk2D?= =?iso-8859-1?q?MXo0mkpDhcQy8PjuzE/5GzvAYQrurKGTR1t/++t9VL8J1Lpsvm3?= =?iso-8859-1?q?7DET/01rfrRduvtrIoJYhhEmtmL3MvYoqcMHOghKNMtcNhD/SbJ?= =?iso-8859-1?q?6Op83Ti+hkpnqJEoMeIrPOtK93/oIzUADzw9NdFnIudEDitjHei?= =?iso-8859-1?q?IXd0OSJXMRKCt0udJPGSgOL8PPy4EUxJDK1RSGBE7VrahJw5qTl?= =?iso-8859-1?q?oecSOYciVZ2PjoxZVce61FGoi6XeIeRLUFHUEkNKP96/7AO4p3B?= =?iso-8859-1?q?MOPdAZUbyAfTVFJLI0sgBhrlTQ1LAfB616iWogaaM/1NRE5SqA8?= =?iso-8859-1?q?1zeZxGID72C2DmNMjnKhTuubm19cchPUcTDlXs1X3DeKK/baZKT?= =?iso-8859-1?q?aKBvFQmdn4WweFBgv5ms/lfsIa99XH03g1UmT65Le9iKTH0aPw+?= =?iso-8859-1?q?uVvKIUTENdr3L8XYPXHBKfk1Ffbb8LnO54AcjMy3zEEyNXegRRB?= =?iso-8859-1?q?yiCm3UagAHaxRjXe+MFKimBfPKWD44nXfW549z3zoc/9DvoriIa?= =?iso-8859-1?q?Sy+5yQel7S8k9uyrLrkW2mhp+QMy8Nge9tRX/CJUJd1L57UznPx?= =?iso-8859-1?q?VTK75Qcw6n7Nr4X8b9zRgm2xTwRJjE9GZ7TdKV0rLVGjTUcTO2V?= =?iso-8859-1?q?DqnXcDBe8aS2qwpUazZm5I47qMdlT/w4Hu0Usqw4v7uH+kZk91Y?= =?iso-8859-1?q?TxZ5IQopI+iRsXCLWFKuMZH2NKmYYYHrDgrJtJTdmUiJlhKjmTr?= =?iso-8859-1?q?qLOiNAob?= x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: gKy4ArwUapXZ0Hk7kjEI9wWSKe6Jw7O7TvEWOVY/3LIttfXCmWvyaYoIBD8i7D9SR0aPmpeb1Cf4HiQAtfdTK241n/b2zEwBGq00mlhsEua44qe/k/3/00agtp1JAu8LERzvddPxclWchqfxTX1FZNGLoq1qsq4ixAjtLslc/yKfiCLJ1+vfT41dxVHOdoNzkjwQNffrLkfan2fP/piPKc0YFFTAgcU7AE0/vUo37WPhzJe1FQteGbi2VcWizWF4MAfYmfP5uBlQek7tbLN7GWsCFbwnnrejywK8umxaUhG1Pe+qgg2B1YR3E9iq2WYKbU01EGbPJK0U7uIpagAxoGLjzub42wITqB7QMe5TT973vd8Gv513ply3lkd2aOU804PvFKgqmm+KGlKrFrjh5wAmk2HbBx95Mdpib+esabU= MIME-Version: 1.0 X-OriginatorOrg: prevas.dk X-MS-Exchange-CrossTenant-Network-Message-Id: acb32c2f-12a9-4001-7d0f-08d6a30da616 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2019 15:00:33.9180 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d350cf71-778d-4780-88f5-071a4cb1ed61 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB0605 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org While trying to add support for the Flexcan modules on the MPC8309, I'm hitting ETIMEDOUT in flexcan_chip_disable(). With this, probing succeeds. Checking the leftover value of timeout with a primitive pr_err("%s: timeout==%d\n", __func__, timeout); after the loop in chip_disable() typically shows values around 12-14, i.e. suggesting that it takes about 110-130 us for the LPM_ACK bit to appear. So a timeout value of about twice that seems reasonable. Signed-off-by: Rasmus Villemoes --- drivers/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 75ce11395ee8..5f32053f78de 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -165,7 +165,7 @@ #define FLEXCAN_MB_CNT_LENGTH(x) (((x) & 0xf) << 16) #define FLEXCAN_MB_CNT_TIMESTAMP(x) ((x) & 0xffff) -#define FLEXCAN_TIMEOUT_US (50) +#define FLEXCAN_TIMEOUT_US (250) /* FLEXCAN hardware feature flags *