Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6939584imu; Thu, 31 Jan 2019 02:10:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN7AOHra0fxtPCQODtvM1cUlKz2LHq5MudBa3MASZPMJmTH95w9eJGJ8bFDq8r4921TDSiei X-Received: by 2002:a62:e044:: with SMTP id f65mr33899101pfh.208.1548929413038; Thu, 31 Jan 2019 02:10:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548929413; cv=none; d=google.com; s=arc-20160816; b=uY8kUjd/FlV/SwKfJFaWKBUHw42blllfz/oDJBO3gNutNyQ19RIHix0LqS09+W+KSf By3ekjrxRb3BojHgEiMYFz6SrGE2VRLHKRUYBqXAj+swiugg5WTAhI8hwOGH+RU20MVc NrmW0tgm/AfbQ5/reoH9c5mwDQ0UxGy8vo6koOg5NIuuUWnDrncmkLqABg/3KtfTpsDz yUnfr1m2Vim+tYW7I7Z3P4ySjCVOIuLcdrxzgsy5eCfZx0WoW2qKQiKnhkJcpERRnb9D sDdpmnc9T7iHZknag2Mo/6Uchn2k+wYAfTnt9WG5zZqLTmGW6W/4xFGF8UWP6Wk4YdUi 3ZTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=whcIrtpf1u2eLoEXelIOOL7D42rL5WheiHiqPGAdgSc=; b=dfciZj7/XG5uMwp8yL15uXU1OMDn8YZlJbwzRBzQouDiwo6HTabYV9EHsgu7bJavLb c5p5Ejx5uetFQclApmZtuLq103DdUlXFdLS+R8rRS+LqYwC2PmTfLSO8HZARvSmbtfYL vsAtNBDUDgjimUN4Htd1Olx6QHZtjwSxO8VxcUtv10XLYpx4yRfvaOebNpEbXWPv7dL4 5lLmrdHxEjhD1CD9WOxTrUwmHVv+oTj532snUybkLt4SKVUO55OdVonoaKdMVf+kkNSO 4SWdNXi5izy07b35g3XVORUvfReNHFVMqhnxQLK38mwKodULHLj84q7PHGB5ydfxRJiO LRJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=PJ6uJsN8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id az5si4061413plb.166.2019.01.31.02.09.57; Thu, 31 Jan 2019 02:10:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=PJ6uJsN8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732231AbfAaKJZ (ORCPT + 99 others); Thu, 31 Jan 2019 05:09:25 -0500 Received: from mail-eopbgr50045.outbound.protection.outlook.com ([40.107.5.45]:16598 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732048AbfAaKJU (ORCPT ); Thu, 31 Jan 2019 05:09:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=whcIrtpf1u2eLoEXelIOOL7D42rL5WheiHiqPGAdgSc=; b=PJ6uJsN8ni3LXmJuhX9BxyrEO51VbpCy29FlF0TKXLSIB23mHIrlkf7sGf9u92JjBlXnSrtGloB1Z6fZScqvhHNJdn4Au2JsRnYoD0S5rHUYPZGSgBuGQf/ZkOq4CD4KQMVFOANjbWhcUi2+xss73Jh7j/53tyy77s8by6tgsBg= Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (52.134.126.21) by AM0PR04MB5460.eurprd04.prod.outlook.com (20.178.115.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1558.21; Thu, 31 Jan 2019 10:09:15 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::bd44:e001:ab8d:1c51]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::bd44:e001:ab8d:1c51%2]) with mapi id 15.20.1580.019; Thu, 31 Jan 2019 10:09:15 +0000 From: Aisheng Dong To: Joakim Zhang , "mkl@pengutronix.de" , "linux-can@vger.kernel.org" CC: "wg@grandegger.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Subject: RE: [PATCH] can: flexcan: fix timeout when set small bitrate Thread-Topic: [PATCH] can: flexcan: fix timeout when set small bitrate Thread-Index: AQHUuUiQ4yWIPYpxOkiOxPx7F+znnqXJJ0sw Date: Thu, 31 Jan 2019 10:09:15 +0000 Message-ID: References: <20190131093509.12613-1-qiangqing.zhang@nxp.com> In-Reply-To: <20190131093509.12613-1-qiangqing.zhang@nxp.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisheng.dong@nxp.com; x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR04MB5460;6:VnQRBJT4PIxgDLGRhl8DyEy0DsZ2Vr9tiPY2rOgzzYxxtsvm/W3FxsF2dY9RsdMuRRMB5dHmW74tdt6lp9P/8mA3xBGZUHNo+QDKnIY7lzjXZId0qvpcQEXPqSXZHhewWI+OnR9yze9gCBDiCqq989YN4s0eeNPvfot9yj+D0xlUS21oTSS6n5TOaBtbL9RKshSylwOwoik28QaUloBXuMstaMkL6gxHja+dL4LlLAZqWmcLjywXp1sTJiykr4xILtYykPR5CUliZQ9J7jYYqwXrJVuR/AIAUgylR2ANLB0nLe0TqXhuwkDq8/+S4ncsRP3PXbdpY0j+z02M12Ry4+P4dxWVG9Mvb+frRJ/f6zCVGzrjZS5LemkOdpe8Mwv0449H94hHPKOE+uEMh1cjA6Udxvv+/cQ4drHpdHRKc/4F0ULraMrkvlgl9v+TNt3a0iOforC3YYdPCQSomX4P4Q==;5:o4cR1mat7HoTFsdBr2m6GkIwTVs65+kqTqV2TGh5N479agodjDF9KlzROzDBH8PQeIq/wTunIk/uwg+3pODYrgybdaTXj6pKKjkTTzuAWVBaTDRifBpoH626k1aZotkn7vWILpDyCyCrBzwSfFQlI+jPQ2zyj4jq7+ck13TG0Wh/GBl+7TsdMJNsSO1aUY2HsDO38ZN9r2Drno06Sa0kaQ==;7:+2QUUiVgKeJp+DZCo0IrN7D8OGbxntWsZwGPYJV3HkApv4uUvMgRYXJ5R4vN/IOryCRMXwu7y6BjedY4ZGucoJCP/nNE+eZfuU2WPSl70oLTj97cNtR3U3E3umQXGMtLeR4v19WrFukEORyUjWcjmw== x-ms-office365-filtering-correlation-id: 87633cb3-681d-4b6f-3224-08d687642829 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB5460; x-ms-traffictypediagnostic: AM0PR04MB5460: x-microsoft-antispam-prvs: x-forefront-prvs: 09347618C4 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(396003)(39860400002)(366004)(136003)(376002)(346002)(189003)(199004)(45904002)(13464003)(66066001)(76176011)(97736004)(6506007)(14444005)(8676002)(110136005)(68736007)(316002)(71190400001)(54906003)(44832011)(81166006)(25786009)(74316002)(9686003)(4326008)(81156014)(8936002)(53936002)(6246003)(55016002)(2201001)(305945005)(33656002)(256004)(71200400001)(99286004)(2501003)(14454004)(3846002)(105586002)(229853002)(53546011)(2906002)(6436002)(6116002)(476003)(26005)(486006)(7696005)(446003)(11346002)(186003)(86362001)(106356001)(478600001)(102836004)(7736002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5460;H:AM0PR04MB4211.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 3hrdTkPx2Tl+0L5QyQIM+A52U/bbKzK5QabRmdVAfcpcpHf/pfbnIn4V8DIAUSvzGw/Kjd2Wu0JwYmxIV2pUbllUyHWw/Z7QqsYnpAR5K65hFSv8+SjriS3rHkkLpEvcvzKvEm14O/XXGxp5+FP0F2OEfixh7j6wrFFl9EZVzuLNB77vN1de8ABIW+1lmyiNx2P/4cTGoRSLZcpQ8+BlNLPK5v2/6Q1v1S6kCcg2UMolwoBmcTPF37ijyycC/PPRo8nQ83bjK7ggBhKSZeqHEAQaX/lGA/h/wnbKKN1RCguv/iA0P+AhUYB3g8F2uEDKKaq0H0DcoATjzenT196J2y/gdd/oLtHDYYy+dNupaEaUhQvS5TnVWTq5tfAE4PNz4tuOSLDz2kRI1KG4wanXnj7stomyFqngh7ljF6Xp9ds= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87633cb3-681d-4b6f-3224-08d687642829 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jan 2019 10:09:15.8770 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5460 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Joakim Zhang > Sent: Thursday, January 31, 2019 5:37 PM > To: mkl@pengutronix.de; linux-can@vger.kernel.org > Cc: wg@grandegger.com; netdev@vger.kernel.org; > linux-kernel@vger.kernel.org; dl-linux-imx ; Joakim > Zhang > Subject: [PATCH] can: flexcan: fix timeout when set small bitrate >=20 > Current we can meet timeout issue when setting a small bitrate like 10000= as > follows on i.MX6UL EVK board (ipg clock =3D 66MHZ, per clock =3D 30MHZ): > root@imx6ul7d:~# ip link set can0 up type can bitrate 10000 A link change > request failed with some changes committed already. > Interface can0 may have been left with an inconsistent configuration, ple= ase > check. > RTNETLINK answers: Connection timed out >=20 > It is caused by calling of flexcan_chip_unfreeze() timeout. >=20 > Originally the code is using usleep_range(10, 20) for unfreeze operation,= but > the patch (8badd65 can: flexcan: avoid calling usleep_range from interrup= t > context) changed it into udelay(10) which is only a half delay of before, > there're also some other delay changes. >=20 > After double to FLEXCAN_TIMEOUT_US to 100 can fix the issue. >=20 > Signed-off-by: Joakim Zhang Reviewed-by: Dong Aisheng Regards Dong Aisheng