Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653AbcD0Jhb (ORCPT ); Wed, 27 Apr 2016 05:37:31 -0400 Received: from mail-bl2on0056.outbound.protection.outlook.com ([65.55.169.56]:60064 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753071AbcD0Jh0 (ORCPT ); Wed, 27 Apr 2016 05:37:26 -0400 X-Greylist: delayed 99506 seconds by postgrey-1.27 at vger.kernel.org; Wed, 27 Apr 2016 05:37:26 EDT Authentication-Results: the-dreams.de; dkim=none (message not signed) header.d=none;the-dreams.de; dmarc=none action=none header.from=caviumnetworks.com; Date: Wed, 27 Apr 2016 11:37:07 +0200 From: Jan Glauber To: Wolfram Sang CC: , , David Daney , David Daney Subject: Re: [PATCH v7 09/15] i2c: octeon: Add workaround for broken irqs on CN3860 Message-ID: <20160427093707.GA2624@hardcore> References: <1461594824-7215-1-git-send-email-jglauber@cavium.com> <1461594824-7215-10-git-send-email-jglauber@cavium.com> <20160426211759.GD4587@katana> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160426211759.GD4587@katana> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [46.223.158.165] X-ClientProxiedBy: HE1PR06CA0038.eurprd06.prod.outlook.com (10.162.181.176) To BN3PR07MB2578.namprd07.prod.outlook.com (10.167.5.6) X-MS-Office365-Filtering-Correlation-Id: aa06c4bd-0f62-4404-0f96-08d36e7f892b X-Microsoft-Exchange-Diagnostics: 1;BN3PR07MB2578;2:HFtpr90d/onAHDqzMMDKRKc+TrJ+/l1dk9BsApGqWOc2afFYzGw2IyVMHThxf2LHksMhbUrVu99RYPX1aKV22Xj1fCMgmJxvA9f+8Qz6/4mIo7+FMn45svZBeMvEnUKTXL6Vhqox/9dSofd5mUJ4ZdVzhUH3SrWvQSeuj9y1D1sAFQzgdo+MDyLLHhdve4fk;3:FOwR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AcjUt2Ep5F67F/RltEjd7RULcEe0uk/5rj/Ak3C9uRbAI/x5JlUOZjcgBO7mlhdAIhDu0sTO1l7YwAqQzmD+hGnKEp0Ow= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(9101521072)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:BN3PR07MB2578;BCL:0;PCL:0;RULEID:;SRVR:BN3PR07MB2578; X-Microsoft-Exchange-Diagnostics: 1;BN3PR07MB2578;4:NGDbDaJ2QJ+wn3zFgEi7TK8rpVKiOgAsu6DtOop3Qs5oi63t+8xRgwIvkH7Awws7eQr53JMvKdjhXtdQxHVrLVMee/ZTw2sosdps70LglYOUKC0WTtt/HBP4+BPcFqMeeN80+9M5xVngcKpBu1UYWlQO1duYh5Dg+PDBy5Zp23XFhf+EmTHNmKvOu58r1zQ1QiQClSPJwn65Je9cHsWxoloI2pnE6lZC9cK8ZstD1+9YIn8olX20yqQ45Tc6D2IvpbfUM6n+kBJk0dbtvZE5IqozQnjcwkS/oRtCpLexfH9MuE7ZjRdJm0BoufmSKcsXEiO/Y0slefkGgOZxwEa7livjeAGP33eehEIN9DIcCDh+ypZzG21cO+hyYtrU7ZlveO3oLmYgY1/YxiXn+USndA== X-Forefront-PRVS: 0925081676 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(24454002)(92566002)(47776003)(66066001)(50466002)(42186005)(33716001)(33656002)(97756001)(110136002)(46406003)(19580395003)(19580405001)(107886002)(189998001)(4001350100001)(5004730100002)(2906002)(77096005)(54356999)(6116002)(2950100001)(1096002)(4326007)(4001430100002)(9686002)(3846002)(23726003)(5008740100001)(1076002)(50986999)(586003)(81166005)(76176999)(86362001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR07MB2578;H:hardcore;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-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5nn8NtnYpYATNaHVMI9HF2G6?= =?us-ascii?Q?nojTAyT2J4Ocb1NW3Egu0EHHXST5t7/YM+g2vQKVGw6ZT7riOYv6vhRtEbII?= =?us-ascii?Q?gLe1PWO2JT0n2jV6S02/x9DrHYm2aFmGRostFAwd3T+eoQfMdFZvkfe+pEJ0?= =?us-ascii?Q?W2sC26fPG0iqvLYqXhjt2u4?= X-Microsoft-Exchange-Diagnostics: 1;BN3PR07MB2578;5:J2bQyCSv/eaxQKIR1Qpr2x/uXp8/uvF7ejzmfhmDy71Fw8zXGWBeKx/6MSZm3On3jauUpmEUJ/a8wWPeq9DEwys8NIgeaTHTXnqDOGEVzENCjaGKiDa6yzKaHwoCvmElGq8UvtY22y4FVZQ7+pssvg==;24:YZAGvMkFVVJfebZQQiPt9KHt+ReJ7Ze8a3fUxgMe7GJOvrvuK/odxgUWX+TqFxRbNWl/Gx3hyYITr0oGOtJA4XmdNMQhaL/skRQeNjdaPaQ=;7:IHDooQze8/fEVusvAO5vVr7DTiQKcbMNA9qjmf3WegNkZ+DCwnYOVe79dLaFCgktNlG/SJHP/vz2ochKH4fl6XDThViyVruMu+r9fbKPNIJoFNnaXNB6P2bxtbajVMgoGL9DO9thBUg2FjhoFcY1+0ZBAG7Z5231CACV35Cv7FtryGSZQ/2lCpjM1wkv8LPC SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2016 09:37:21.8699 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2578 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1122 Lines: 33 On Tue, Apr 26, 2016 at 11:17:59PM +0200, Wolfram Sang wrote: > On Mon, Apr 25, 2016 at 04:33:38PM +0200, Jan Glauber wrote: > > From: David Daney > > > > CN3860 does not interrupt the CPU when the i2c status changes. If > > we get a timeout, and see the status has in fact changed, we know we > > have this problem, and drop back to polling. > > > > Signed-off-by: David Daney > > Signed-off-by: Jan Glauber > > My code checkers say something: > > CHECKPATCH > CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt > #37: FILE: drivers/i2c/busses/i2c-octeon.c:390: > + udelay(50); > > CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt > #70: FILE: drivers/i2c/busses/i2c-octeon.c:529: > + udelay(50); > > Dunno if you want to change that? Seems reasonable to me. Also: Yes, makes sense. > SMATCH > drivers/i2c/busses/i2c-octeon.c:544 octeon_i2c_hlc_wait() warn: inconsistent indenting > > This is true as well. > OK, I'll reply with an updated patch.