Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753298AbcCNRhA (ORCPT ); Mon, 14 Mar 2016 13:37:00 -0400 Received: from mail-bl2on0068.outbound.protection.outlook.com ([65.55.169.68]:1059 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751216AbcCNRg4 convert rfc822-to-8bit (ORCPT ); Mon, 14 Mar 2016 13:36:56 -0400 From: "Swain, Peter" To: Jan Glauber , Wolfram Sang CC: "linux-kernel@vger.kernel.org" , "linux-i2c@vger.kernel.org" , "Daney, David" , Peter Swain Subject: Re: [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable Thread-Topic: [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable Thread-Index: AQHReIObojsKnUAcnE6QAi9kAliXR59V+5MAgALyEICAABMydg== Date: Mon, 14 Mar 2016 17:21:47 +0000 Message-ID: References: <00a182c50af211e409f128630ba6ba5359da6198.1457362545.git.jglauber@cavium.com> <20160312154611.GH1661@katana>,<20160314124505.GA5771@hardcore> In-Reply-To: <20160314124505.GA5771@hardcore> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=caviumnetworks.com; x-originating-ip: [64.2.3.194] x-ms-office365-filtering-correlation-id: 0499af13-7e68-4d8b-c3d5-08d34c2d1f5a x-microsoft-exchange-diagnostics: 1;BLUPR0701MB753;5:CA1f5M3NS8vcrejqh6ggBTIlYQVNuBKf/dTdmpKtHxDGb5yWOEkYpofUKHRobYbs0xYsLRFMzd+SP+G2XFLItuqV0lzj16ths0A9pX8eN7ufAM+FfwWgafemQuBqvhsmWeOpW3/F1UCGzXqgnmNNuQ==;24:wmPxo4E6ODn83G0lpCXngUcP1nbMBuDSpHHbxCTvTV17xvbmVaeJsYfGkuTHLHAS/2Nk+VYdxHfOQexmiunTKtm1qGDnDIEv/1gPIaL7TGM= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB753; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001);SRVR:BLUPR0701MB753;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB753; x-forefront-prvs: 0881A7A935 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(24454002)(377454003)(586003)(19580395003)(5002640100001)(189998001)(4326007)(86362001)(92566002)(99286002)(87936001)(3846002)(551934003)(33656002)(19580405001)(6116002)(11100500001)(10400500002)(77096005)(3660700001)(74316001)(102836003)(66066001)(76576001)(122556002)(50986999)(5001770100001)(5004730100002)(54356999)(76176999)(1220700001)(2906002)(2900100001)(5008740100001)(5003600100002)(2950100001)(3280700002)(81166005)(1096002)(93886004)(3900700001)(106116001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR0701MB753;H:BLUPR0701MB2067.namprd07.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2016 17:21:47.1090 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB753 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2001 Lines: 35 Agreed, this timeout modparam can go, it serves no purpose which can't be achieved with existing ioctl. It was introduced during debug to reduce spurious error count while hunting an issue finally resolved by the 80uS IFLG re-poll. But the same effect is achieved by (for example) the at24 driver's retry at 25mS timeout. The issue there is not timeout _within_ command, but failure to respect a 25mS post-write recovery time before next access to the at24, and the existing at24-level retry works well (though delaying the presentation of the next at24 transaction _within_ the at24 driver would have lead to less bus-level churn). Leaving this adapter tuning out affects nothing but the (normally invisible) adapter-level retry count, which is better addressed within the target device's code, like at24 does. Default is ioctl-tweakable, so users wanting fine tuning have a mechanism. -pete ________________________________________ From: Jan Glauber Sent: Monday, March 14, 2016 5:45 AM To: Wolfram Sang Cc: linux-kernel@vger.kernel.org; linux-i2c@vger.kernel.org; Daney, David; Peter Swain Subject: Re: [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable On Sat, Mar 12, 2016 at 04:46:12PM +0100, Wolfram Sang wrote: > On Mon, Mar 07, 2016 at 04:10:48PM +0100, Jan Glauber wrote: > > From: Peter Swain > > > > Make the i2c adapter timeout a module parameter to allow upper-level > > target device drivers to retry with their own logic before their own > > timeouts abort operations. > > > > For example, at24 eeprom driver retries for 25ms when -EAGAIN > > indicates that an eeprom has gone unresponsive while committing > > a newly written page (5ms on typical devices). > > > > Signed-off-by: Peter Swain > > Signed-off-by: Jan Glauber > > i2c-dev has IOCTLs for timeout and retries. Can't you use those? > Yes, with these IOCTLs we don't need to add a module parameter so I'll drop that.