Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932230AbbHNPwZ (ORCPT ); Fri, 14 Aug 2015 11:52:25 -0400 Received: from mail-bn1bon0072.outbound.protection.outlook.com ([157.56.111.72]:51280 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755637AbbHNPwT (ORCPT ); Fri, 14 Aug 2015 11:52:19 -0400 Authentication-Results: spf=temperror (sender IP is 66.35.236.236) smtp.mailfrom=opensource.altera.com; infradead.org; dkim=none (message not signed) header.d=none; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=atull@opensource.altera.com; Date: Fri, 14 Aug 2015 10:46:58 -0500 From: atull X-X-Sender: atull@linuxheads99 To: Moritz Fischer CC: Greg KH , Jason Gunthorpe , , Michal Simek , Michal Simek , , , , Pantelis Antoniou , , Grant Likely , , , , , "Philip Balister" , , , , , Nicolas Pitre , , , David Brown , Rob Landley , , , , , Linus Walleij , , , , Kumar Gala , , Petr Cvek , Alan Tull , , Subject: Re: [PATCH v10 3/8] add fpga manager core In-Reply-To: Message-ID: References: <1439487452-23977-1-git-send-email-atull@opensource.altera.com> <1439487452-23977-5-git-send-email-atull@opensource.altera.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: DM2PR10CA0065.namprd10.prod.outlook.com (10.141.241.33) To CY1PR03MB1519.namprd03.prod.outlook.com (25.163.17.25) X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1519;2:VYZ/i29lZ64ut7eD5xrUqCrlV9bSMhvsxTmRgUWorqH9bPb3zgGc2PdZ0+8rXzHeke1nybuU9OjymZlO7StJXNpGTES4dPFTnM4i2a99zVup/SIjAK/3i8ojgCbodUUD4gsieyj5AOztE3tavycVLP8HJ08/FxR9c7s1Fb7t9IQ=;3:9aNnMAK6T1O3x+maqyheaf+tIIIdeha4c+xMy4M/EuBaYLBrMrX1Evzv5P4W/fgV3ZH9fLWlRwOKFU9iWdlDjt0jDl7RvR5XiDJ8gDQl0y7oaPjeWGPnddhXEdAhf3PxnASlrnqkFt88+oAW0wojdg==;25:kepZa79RfRDSXaaxKNhMnvxSBTtbIDKIXq276vm+KpI1RXEJFzyO5pwwX/ShorfCIILFTHty8/sSMkOnwAKARcq8T6UGRz0onM+h58pRhd94ZsqJgCgEM1nVGDX7dPFx4jrWs8NtXnm8OyHcDBwDJ56xoxXu6YJO5LM0QUMXAvdkhWwJQKxQkXkyrSf9Fc8HNFT2hfe9gpENPTqALeLwhV7eQGpUzepEITb8QmGZ+206q2iRFMnkH+mW1KGWPISWf3ebKO62kM1rezQMaXIfDg==;20:Jle6EpOzzPEG8Xalh1ASGj3uCYC461TtFGicReUewTKoTOd7oieB+ZUbO5uSTWuxmvKu3Ngaoq4jpK+8AUW+eN03RG0OTqhQkCg4uPnwNe/VuFSsDZIHwnQwEK3Xblu1jgNWcuQ33R8y5h0V64OS0YkqyuJYFE9YeMu2L46+2Zk= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1519;UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB034; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:CY1PR03MB1519;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1519;BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BLUPR03MB034;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB034; X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1519;4:k9SLQfMbxZtOsSStWsVGTzExg+jQGsMaGr/AX45GZucnp1jJbKb0gJ1UI8Q84iuuvN0wJ8IOusJ58sjnT+/C7ZBDC8+rE6RLr33XxGWNWaIYDP8PnaaDGo5IapYEj/UctplaFMqkiyOMnRYuNOYQrsc6ulnwWU469VMqwl4C2QGcCdUEmVSyaeYdxVvD3xEFWAoLnO5zrCpCne3hlnR5Lt1f3iMxhWf47fGFkEwSelvdrZugw7zAS2ZnKlVflCjJw8OcsZvyEiLMNmsqllfbX2YZ5XvSRtOuVYsaKH2vUdY= X-Forefront-PRVS: 066898046A X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(6009001)(199003)(24454002)(189002)(47776003)(87976001)(46102003)(53416004)(42186005)(46406003)(93886004)(40100003)(86152002)(122386002)(86362001)(62966003)(77156002)(15975445007)(83506001)(69596002)(77096005)(106356001)(5001920100001)(23726002)(33716001)(4001350100001)(66066001)(76176999)(5001960100002)(68736005)(189998001)(64706001)(110136002)(92566002)(50466002)(2950100001)(54356999)(5001860100001)(101416001)(105586002)(107886002)(50986999)(19580395003)(4001540100001)(97736004)(81156007)(5001830100001)(7059030)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR03MB1519;H:linuxheads99.altera.com;FPR:;SPF:None;PTR:InfoNoRecords;A:0;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1;CY1PR03MB1519;23:FwI3LD0KaMuK3TTDoOAz2N0YXcAlFzeHWUf2XQAX2?= =?us-ascii?Q?TaO/9iuGcy+zPLKM61bnTE/hpOUesymFtKCIAUFat2lGRhRzb1QRJSI+QQ+j?= =?us-ascii?Q?zrQkFyBSO+xCm4qJU52/NVq0SU/4cUGpl0Gp6LE5NSVuwmHCOMXzrwM4rmV/?= =?us-ascii?Q?jwuQricl59g1ImnHDMr/raEsaqPzy9D8MJgmJngUZBmZ0mv0kgxgxckO0QrE?= =?us-ascii?Q?S0zh8RO9hZsPaV8UmoWXiY+I2cdsC0E1zrnNlYlSzQCohd/kroQdOeey/oBr?= =?us-ascii?Q?Q1jd43cjUMgFLxzfwN/JR0oyac1aLfr5Ah7Gfnu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358EMPhN3IUjX7n1iC5PQGt4tZb5eVqYIFWrsgv?= =?us-ascii?Q?YhxLPXh18jH4uYXtYAvKMhCSsapn+Gas6ndtoEzWnu5Gw5LNTiE7B5+SBkto?= =?us-ascii?B?dz09?= X-Microsoft-Exchange-Diagnostics-untrusted: 1;CY1PR03MB1519;5:fexWvMdsfcOwBeOM/uIMUpkKbnQl6maoSWab53VZQp67v74Sz4b4jjGnQ3R7noESo7n9omo3UwsbI4zlw000uOGJ7FodUYPYGrBN6PH1yIwdrAbzHgS+CQufbX9FTOsPppEmpCSW9Tozr0x7hpknFw==;24:sAdyV05G0+VNgQxkkiwLputuMqxLI/GrAALuXkBN4/iDQDplBf6YepiVyDnsLSeGGO/WZ4sHcNdIVxSLIkktPWS6ogK9anH+U3BjTpBRrPo=;20:6hRs1rPEK/s8vv20JJoEqKbWpWLS6W/9nsZJFadiWkkirHDEOUPXLI5wVczMcQORHBHfCuuzcAhULBmKsZgRhjcHzUZJfxTMU//ypYchpVwBDs/FNUV9uvqhrmapvtTYfeqHX0/4ZksJdtEK6HZykm+izov/YgZOU7rw2AtaZls= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1519 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BL2FFO11FD015.protection.gbl X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD015;1:Nx7BSZhLp3Aa1J43VyjrTx8WI027kwz8y0u/TtXEqn6e/e8u4phDa4qLFLkOEitDxsJ225fWdEnqiHDymkZi050hKpryrcqfwUkezUDRofroIYyD7JNMBn9FGTTmVeD46hlpWE1oxjyDlD+YD+eoUq8H303/Yye0QAAmXb1sqQ7c6mCW/tevsugEp5OsRVUCBemTip6QaQFdSjAtFrurM5X9PRFTObORnWUvN1dohIZj3I6Ow52MBKgwhBY6NEidSnjeOXc6iAIWeNjMubhdwWQOyKYtFJxboBSuPmnCvypE3RJSXyzYd5+S6A+pWHpQFpCPBwWxJqq+Gw/HoI0XL630FpyLfp/xzylrFT38Ggk3dGcQZUy9CzOLliLZ42KYFtdbQ6o07uDxFuVZPhAhgw== X-Forefront-Antispam-Report: CIP:66.35.236.236;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2970300002)(3050300001)(189002)(199003)(24454002)(50986999)(54356999)(76176999)(21840400001)(86152002)(62966003)(46102003)(77156002)(40100003)(50466002)(87936001)(46406003)(5001960100002)(47776003)(106466001)(110136002)(107886002)(66066001)(64706001)(33716001)(19580395003)(16796002)(53416004)(83506001)(81156007)(4001540100001)(6806004)(4001350100001)(6070500001)(189998001)(97736004)(5001860100001)(5001830100001)(93886004)(23726002)(86362001)(2950100001)(122386002)(77096005)(15975445007)(68736005)(92566002)(7099028)(7059030)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB034;H:sj-itexedge04.altera.priv.altera.com;FPR:;SPF:TempError;PTR:InfoDomainNonexistent;MX:3;A:3;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB034;2:YuraaQABig9fK5sWabbAmsr7SB+ezs7u/fIuPXB++btb88nr2sU6vvTN8aCV27CUfHG7J2X3zgFnOtCvMq+PPORIxpm1L2arg9fl+xLSdRqIVwwo+/sWOzmYcBPFHf7Czc9d2Js2rwOWB9uKo/DCVMux7UCUHeUsNtj+5Hq4LIc=;3:fX4kFiG9Y1cSYMQ1BQoDHmhjRZKT7PVcTLAEl4mJCcYhCTN8mfsQgk1KXCTUvDKfoExN2zFSlpinXy52RfHVIDOXJb5/mLIYvx9yWA8QXWmzkbBzJVo2eijmTbdCg9yLCOrL9tgTBwlGN9fgT59rH5j9OSJ4bS1CuBo0AqT/E6M6n8B60HgtvgZR9098SlbRLTSBK+LWAZ9ruz9YcTvOBO5oFDPruHvc7jiWHlHIG4k=;25:LLlHSjbvXUlChF6i/qtbzZBNZzCimcz7+Ogc+hCsXXbmsmA5bV/za34FbAgBKknVU0Y0RGNleWoABFXmd6GOrrTQ7nE2HCB9ZHV64477/cRqbexY3+No5WGEarL5aIDP5uwwe4C6p6gLXwZCuKMtdqKwxBGcc2Ef0DWsq/4YELD1K1WB8Qbl4Jo5ueWaW+6Hjl5dxLsUtVIQZVAJg3b/TjdHRjAu5+BNKhfNWDIcWcJCv7kgslMJwx71q2QRE2OjwOp2mtNC7FWAFb4aEL/6ng==;20:aWd8tceYyzKePSvnHdljheYAOmhX6bqtSVNIrxvtw2VHnKEkwkyI5krnKGfMIIGJGiPSlPKtLdpe3oVm9dztUr57vKArh1yYoyaDwn7SXhEQRmCgGhC+XPEyN0DiTfrgkRa9fXk5NRj8D9+FbGtnoN3QhrMmFMn5zLDYW/r1JFY= X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB034;4:fgxEygGyy/D0gexrQkidTMjzTn4w7Ja0zOSB6mHmtiPWGVhAh1G81qXMwH82u7sBcQCc8Yiy3kUrbXlBcna36eE0gkqP5Drg9Gc4HryY7Matmyy2T+4WbTD2OMDEvEuq9k/e7lpojGw7XP/dBfYapG36eUzCsG8Lk/Jx1ChKRv+th/jMANPrK8BrPdQ08e6xT8rQCzNUANj4URvf84heX24o08kamgLID7xTjXfo0aG2p1Amzrxq+QEKjU9spM4uUgkD11CYPyxMKoXoF6qexdmgTUgiysMLVf34QH7gbQg= X-Forefront-PRVS: 066898046A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR03MB034;23:1M3OhYXL/2oShHjSQVNpKokK0pYwihQqco0JJg7Vle?= =?us-ascii?Q?IRM+JaLVIG2QaI6lv2iMoLpAc/d5CTT6ZMs4jJgXL8p0L8oVKTxqVWWT0ZeL?= =?us-ascii?Q?DwSqMAyJc4rKSlEfGWmFg+Fp5nxCqXIb+rxrioDYyCv4Rbnh1P1uRiJloEn5?= =?us-ascii?Q?rTfEoJ8kn1RNNUAHXaO5F68c6ja6rUgJ3H2abeaEoa58AAMrbq1DkqX62OZP?= =?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iVMVp9keWJrGYVQNjt9UV/?= =?us-ascii?Q?EU6h1grHptRSxDi7hZosKWecPv9bbjq8yCmclNBVtqBJaZO8LxD23hyrgLwH?= =?us-ascii?Q?nMM1xSVyCGx+ZDHmzGo/23Bn6hE+CR+TN4UHiXoijdvr/s2b7Qpz+KgcC2kK?= =?us-ascii?Q?sthoY+rJ870OixyI7WoUpZZtiBVnpDR9hfdo3IbS+glEivGjUIa6pNom16tA?= =?us-ascii?Q?FLYJ+h+mW+yfSkTJCAM6uNxaMeIpGHZextRHmyqjqV?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB034;5:QZoshnXsdlBSoxQKQ0R5AdN+NsJitUK+K9Ioiq6SyaIkv3P8tmcsfIVCI9fPMj4SrUGYKBDB1EYe7pKc66vmZ7Fm02OV+GpqZgW59SbhKFez2aSlxDSBWFk7MqVXT9UdWmCMoEgM44BlA93zznFxHA==;24:9XSHcbj0z+FD4nSEc3Xvruh2QOUk8C9prKN84GbvrQjvDuxv2j3el7nB8I+LEZ/aijIR+eEp7VuKROfvqDOmtF0CK4O7flozJCFB04jNq1k=;20:ChKMVlpwn+AfC8nV2JKf9MfOglr3by+NUkbGXTF8WKm4HgGIriU8yw/2Mr/4effCJVsjDeRCTaMfNIx5at9CHTvS77WUBr6fC31lZg6z5X/PON0k/ipv/t8j6ISVK9nxL8nqiCb6b5uFTOj8niSU7csgNhTlNu0bZlM5afIf+T0= X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2015 15:52:13.1680 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a;Ip=[66.35.236.236];Helo=[sj-itexedge04.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB034 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1459 Lines: 38 On Fri, 14 Aug 2015, atull wrote: > On Fri, 14 Aug 2015, Moritz Fischer wrote: > > > Hi Alan, > > > > I've updated my Zynq driver (it can be found in an older version > > against your v8 in the Xilinx tree, too) > > > > https://github.com/mfischer/linux/tree/alan-fpga-mgr-v10 > > Since we are both already using this and have been for a while now, I hope it > can go up into the mainstream instead of continuing to exist only in Altera > and Xilinx's git trees. > Hi Moritz, I fetched your git tree and took a look at your low level driver. I had a some feedback. write_complete() is a blocking call, waiting for the FPGA to go into operating state and timing out (ETIMEDOUT) if necessary. The fpga-mgr.c framework is assuming that when write_complete exits with status 0, that means that the FPGA is in operating state. That's why it's proper for us to add "mgr->state = FPGA_MGR_STATE_OPERATING" after write_complete returns success as you noted. My suggestion is that your write_complete() should check status in this way. Whatever error codes it returns will get propagated. Also, I'm wondering how the simple-fpga-bus stuff looks to you now that you've had it for a little while. Thank, Alan -- 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/