Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033055AbbKFJMG (ORCPT ); Fri, 6 Nov 2015 04:12:06 -0500 Received: from mail-bl2on0099.outbound.protection.outlook.com ([65.55.169.99]:12320 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030698AbbKFJLw convert rfc822-to-8bit (ORCPT ); Fri, 6 Nov 2015 04:11:52 -0500 X-Greylist: delayed 2269 seconds by postgrey-1.27 at vger.kernel.org; Fri, 06 Nov 2015 04:11:51 EST Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; linux.intel.com; dkim=none (message not signed) header.d=none;linux.intel.com; dmarc=permerror action=none header.from=amd.com; X-WSS-ID: 0NXDYVK-08-39B-02 X-M-MSG: From: "Yu, Xiangliang" To: Jarkko Nikula , Mika Westerberg CC: "andriy.shevchenko@linux.intel.com" , "wsa@the-dreams.de" , "linux-i2c@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Xue, Ken" , "Wan, Vincent" , "Huang, Ray" , "Wang, Annie" , "Li, Tony" Subject: RE: [PATCH 1/1] I2C: designware: fix IO timeout issue for AMD controller Thread-Topic: [PATCH 1/1] I2C: designware: fix IO timeout issue for AMD controller Thread-Index: AQHRF5yV0mHRMR8KnUO8SEzCTsabDp6M7QYAgAFP1bD///C6gIAAhxcw Date: Fri, 6 Nov 2015 09:11:35 +0000 Message-ID: <1C99EED8F51BBC41A8F1E645B51245F41AE8AAF2@scybexdag03.amd.com> References: <1446726884-30558-1-git-send-email-Xiangliang.Yu@amd.com> <20151105135216.GN1509@lahna.fi.intel.com> <1C99EED8F51BBC41A8F1E645B51245F41AE8AA50@scybexdag03.amd.com> <563C6BF7.3080406@linux.intel.com> In-Reply-To: <563C6BF7.3080406@linux.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.237.170.105] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(428002)(13464003)(199003)(377454003)(24454002)(189002)(19580395003)(86362001)(50986999)(105586002)(55846006)(106466001)(93886004)(46406003)(97756001)(19580405001)(106116001)(101416001)(53416004)(5007970100001)(23726002)(87936001)(5004730100002)(76176999)(54356999)(47776003)(92566002)(11100500001)(2920100001)(189998001)(33656002)(97736004)(2900100001)(5003600100002)(77096005)(5001770100001)(50466002)(5001920100001)(102836002)(2950100001)(5008740100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN4PR12MB0850;H:atltwp02.amd.com;FPR:;SPF:None;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN4PR12MB0850;2:fPJAqPFboahHramOc2UC03RC2PjKatzzJkWS1hmy3rchlcXCFos31ueAyMA/loF8OAiYU45BARX8SKRi9Gv5/REr7U3s+WAmQrJiDP8eVt00Pgedf6GBhQDltZoy6muqc4R+Ad5dqTAukrPfxDG3VAfvUf+QW0X1RVzWbcxl37w=;3:V1ROVfyaV6o/DhGXqTMH7I32ud94NcvaJIhKE1FxPKwipFAyWJ4fKoLaWkR4Hjbi+oGp4u0ga6jpLHHGN7Si8tHyl/TlpBm4WfJzsouLkT+gLR09ucRa8yl87OA6Kz6mvvomlLpFr9MCMzUIeCiDjQjc2Z8e+SFLpke4cwtsKIVroT/uRYmHKRPiHB4FrOM48vnXYVLof/wvgMC7hQy/QiJqBmX7ZOnIRH7B6C+5EJyB5rQbVSBvddTKS341pivT;25:v+4F3skn0OAx3Vz9ZKjvjPf736zHWay2claqqAZ6IHD7Gpnu9cRDn0WCzKYGm3NgzLYY8nJ5xkYBDdpBsFXX0rdQPUEzGUAPdr85W1hlPtt/86NlCOH0PnFlEENShhok3D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3tPvJumjHXMhLh7/9wigJth8Bb8qXIF3SPmohVd5u9mHe1EMWnlOdejIUjYG72rGKGV27MG+rmwvduk X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046);SRVR:BN4PR12MB0850;BCL:0;PCL:0;RULEID:;SRVR:BN4PR12MB0850; X-Forefront-PRVS: 07521929C1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN4PR12MB0850;23:Pt6k5RmITLe7LJwjDTEENcWRHdOAQdASHrFZ+mRr8?= =?us-ascii?Q?+ym6SMRL2JFO7qdzsOfDBuNKh37EPHHFppSA45bIA7qL7UmONczA7NLFOhPD?= =?us-ascii?Q?F6jarY0G9YNiZULEpknwPOR42UyuJ0I67V81zhrUrdw/HTX3vJznPnCglKjV?= =?us-ascii?Q?GrsUo9MffiOsXYIFTe+Agu6TpFP8ySdQgRNLFDJvl8XbKiregwsE1Xabs9jV?= =?us-ascii?Q?LDCc578iQqD84y+UoCONIGzwrhXEreNDFinIfbdOMfTbuqCQklYa0l5JX79M?= =?us-ascii?Q?yvkl4Vb7XHQXGQwOGFj+sOmicXqm4pirb88bjukw63RIRW0dCkE/2iKP7Pah?= =?us-ascii?Q?JooqJNTOe6dB8MWfUJkCGI32Zy5Ejz+ilVMrECAsin8/F3KxoZB5/N08Byrd?= =?us-ascii?Q?hDaDQjrbFW11IRigjXaEnhoa+7YjTUXoH0sAQ8e8Jf2LTw0hN5P+TuI1n5ur?= =?us-ascii?Q?9qEhmWZuVMFNShC3KbvjkPb19BmYdvEHW6E1dNL9pW6JC/kuhyBYRkM41APE?= =?us-ascii?Q?aDfRUWMUR9lHM5ThXYiTL+QGan9DnMvV2x4Dnn5Ha2tANU9lJRslvGfLkMME?= =?us-ascii?Q?ckgjTtVm9pvUqEGdrBL82U70Tsglnu3ok4kdprNOnRvw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v07rqPe79u9tsCQq5zqF01MqLCcHnCERRQkQ9LwF3uS9i+BXb3jQWJC3ks0/e7XVwrDT1Fw6P9QBLNIBhrxkOPaM4OrtupUPvOUZVhfx3XLsCGmVkx4o2kOqiZscJOiWg8W8A+bixkcyMNh1vQPdZYZyuY5EdeO8G5hinsCUCKEJQBDg67Hk/WvtNPQ SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2015 09:11:49.3375 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.222];Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN4PR12MB0850 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2105 Lines: 50 > -----Original Message----- > From: Jarkko Nikula [mailto:jarkko.nikula@linux.intel.com] > Sent: Friday, November 06, 2015 5:00 PM > To: Yu, Xiangliang; Mika Westerberg > Cc: andriy.shevchenko@linux.intel.com; wsa@the-dreams.de; linux- > i2c@vger.kernel.org; linux-kernel@vger.kernel.org; Xue, Ken; Wan, Vincent; > Huang, Ray; Wang, Annie; Li, Tony > Subject: Re: [PATCH 1/1] I2C: designware: fix IO timeout issue for AMD > controller > > On 06.11.2015 06:34, Yu, Xiangliang wrote: > >> -----Original Message----- > >> From: Mika Westerberg [mailto:mika.westerberg@linux.intel.com] > >>> --- a/drivers/i2c/busses/i2c-designware-core.c > >>> +++ b/drivers/i2c/busses/i2c-designware-core.c > >>> @@ -783,6 +783,9 @@ irqreturn_t i2c_dw_isr(int this_irq, void > >>> *dev_id) > >>> > >>> stat = i2c_dw_read_clear_intrbits(dev); > >> > >> What if the status changes right here, before you go and mask the > interrupt? > > Have no effect, because i2c controller can't trigger next interrupt. > > > Does it mean possible lost interrupt too? I guess it can be debugged by > placing a few ms long mdelay() between clearing and masking. > The interrupt will not be lost if status bits change before masking interrupt. > How frequent is this timeout? I guess lost interrupt is somehow nearly > related to clearing, masking and unmasking if that cycle helps. One thing that > comes to my mind is masking needed and could plain unmasking be also a > working workaround? Quite frequently. > > Have you tried to print DW_IC_INTR_STAT, DW_IC_INTR_MASK and > DW_IC_RAW_INTR_STAT when timeout occurs? E.g. just after printing the > timeout out error in i2c_dw_xfer(). Probably good in i2c_dw_isr() too if if > doesn't produce too much data and make debugging impossible. > Yes, I have tried to print these status. I have confirmed the issue with hardware engineer. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/