Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754717AbcDKQud (ORCPT ); Mon, 11 Apr 2016 12:50:33 -0400 Received: from mail-bl2on0069.outbound.protection.outlook.com ([65.55.169.69]:44928 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751426AbcDKQuc (ORCPT ); Mon, 11 Apr 2016 12:50:32 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nxp.com; From: Stuart Yoder To: , CC: , , , , , Horia Geanta , Stuart Yoder Subject: [PATCH 11/14] staging: fsl-mc: add quirk handling for dpseci objects < 4.0 Date: Mon, 11 Apr 2016 11:50:26 -0500 Message-ID: <1460393426-16118-1-git-send-email-stuart.yoder@nxp.com> X-Mailer: git-send-email 1.7.9.5 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131048670290630840;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(86362001)(48376002)(36756003)(2906002)(5001770100001)(81166005)(50226001)(189998001)(1220700001)(50986999)(1096002)(50466002)(87936001)(106466001)(33646002)(104016004)(92566002)(19580395003)(19580405001)(586003)(47776003)(6806005)(105606002)(11100500001)(4326007)(5008740100001)(77096005)(7059030)(4720700001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR0301MB0709;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD013;1:TpPzImSGizxisg9UxFFALt68f7hHvnH2EcZPyKpXDzrexMbj9PvZh2yyNA1RHKsRZ4wv5EAG1nlKK+8kaoPJACFwFHzdNfLUzpgrhlg6u+rgjXtQjk9OYPl4TDXbP/+Leac+Q5bVN5IeDq+y/voMSqOoI3n5eKJFS4t5ZzOqZCeGmovPjSlkPhuaZVTMhyn3tK5a+X4oNGZVVD78zIhjn81IDI3emgwq7+6OXILrpgTb5Xx7AJTBnie6nATDM1Rowy4/AJFkQKajW//vzDVyurMS0I9JwZxGpBj6NDd8Xl9txRr1zBZ0wQxC3bEJICVSL9LixsZdUtgqksRion/gMT3dG6Tc2Wb8WvKonirk+G+8TCcC+8D+FM0J5YHZKN4XX/B0v+NBNg+bAwcwhFW1HR+hCdiVFion2oRiLqGjKpb8KVvFqXCJN8UEloNp3eiBCV82IQYmX3vsvxSrofvb5XFEW6cb2bbfbuXp/QQNDZOZXwOmh+M1ByPUd0AimFh8R8qhw29mEFAY+T+OcrJybGC5Db+gX/lXTLWXfaRwq7r6OumQ6MwoWmZe18zjefIN4XgLy31OpbMvSscMvOQkaS99Ct/C/J3jvxO9IFL4Kk1zdVTB+CR1YcY0mg5e5ASpBMeRve3W775jjgAdA9CpvZ/THoKrg8fkrbHm/zfju/8W12ESwF+cjX36yVXs89hy MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 1a5d7cfe-cd30-4462-cdc0-08d362296359 X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0709;2:Nbd1YmJU6C7Hx1UxpjQkRWvloSLKac2Y4JDXRhHdSltSFYx7ZST4phTsGDdQ4vPi8U7ZiRYAZxt0eVVrHPudVQHVc1ads+s14FnliaDanpn0umnGgl/w7PCd8RzPnSQtG2JsMyBzMI5fT43Z3VDkduJLHn+cVTTHZi+qTpa7sfJtel3zaLiRJCHAqAYV6Wse;3:7G7m0Qeoq5WH8Fslmii3zqHxhe9oQNlDBbg5HGtXyfb5NcMnWi+J0yJ8v9eGITbs93xdRfLHoTunvtQ6Q1wBYOkibCa0Enntw2We9r46DTW20W0nlQfJj0byiYEAeyAGKWBF+hbSCNNTAFcTm4McB2rOj06MLL3fRsomicda6RGuAyF5hg5QJgOkgjh0oDNpwAjwMMqjySkMVAF1nhPJHIBDugWLqwGQMl3jScnojyk=;25:BJm774eeWU/FDU7PzDSTD7Ug1oV+QyOjnSRcUwSJViqr92fKhpQnJTQqZNTEStsLVtMTHsS+imA/b5GzVsSeuSx5Q9311DHjjGOPPNvL46jeB6bbHQdSPthdk/nWIVmfRi6E/8w1SvNxkEozaLer33WxEvPZlhTChOO7mG9Xfdx0PxSgEeGOZXFa5/sLG/12Jao0f+vIhg2NkU1vXfdEztwidh7Za7HbMuOnWgtNaQgyrof6BBBFkqDc6tzI1zsNbfCxhtk1HHV2vmcjer+sd+sq3V1Vn86Bw/z0WLZISY2SPzV2jEJ9DHSLzBkU6If7VwSWtH0Knc57R7zter35YA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0709; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(13018025)(13017025)(13015025)(13024025)(13023025)(8121501046)(10201501046)(3002001)(6055026);SRVR:BY2PR0301MB0709;BCL:0;PCL:0;RULEID:(400006);SRVR:BY2PR0301MB0709; X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0709;4:oYsatmTXCArc5zToOMpUEiuXdARJARuX5nzJw+3AfgGrPV8DsXZuWVBwkOAKRPkw3rKiyQ6v7TLrgTxz/f4yyLT39RqODRzhesqNhalg1jKFjbuSAALBISFURwhCmk46rPPdR0/SrNDXSRUDrAdvqmqlIuJF+wth2OqCUbexKw101lrtK15U8j08cHK7SLX/B/xfrm1N/fO1vv3BGuba83BI6Z7bODcEbhNV5sPBquhkui1E5Px6pbREmBmzjDFtP1GmRYh+4EPYW806L9cfBpH4s1M3t9iQHxF77iUYOC8CjIzCvDbI6s6viTjrZ8/g1aKKcG1L83oq2VHuvycLG9eeVG2pwXqVRPcVoe8GzPD2bQsHFQbzC4BgFWarKek00+RU2kL3/mxcvmL2FWxvfNfug2mKh0In2bQlHh2CbVXTSv3OJ7n/m16WVQqpunvDYrgx2VkaRPJ8GiGJCal+VXLNNixF90kNqPNx3UWfB5c= X-Forefront-PRVS: 09090B6B69 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR0301MB0709;23:jdHbIJnP359iP7mtP9r08sCxlE3mrt2TIldiINR?= =?us-ascii?Q?g01SRC4Ccr4ijfzPimI6Iy3b6Ar5D92ckt1JqzC+m/050pqT78tOvRe4Ljfl?= =?us-ascii?Q?kqYYSxBLvs4t7Tqfi+D/yMO1XkIfczet3am3L+JyMgtaTJuOffRmEeXdS1E4?= =?us-ascii?Q?ReWbwrGE9BRrZL+R85xBeNDXNgdE9ypCbh9usG3AL7Z8CYU7IbQP9vOmVMjs?= =?us-ascii?Q?xIhS4hvh5JJ5jMW6AWR1Z7JB9ubYELtcTsfbGlKmsVBlU3ynqSplms5cSi39?= =?us-ascii?Q?kKR6NfAuAr4ugM9keATkgTU655x6OPgs+3fKD3QrUFTYV+DS4WKAfuXUrPLU?= =?us-ascii?Q?kTkbRu6Mbzs9+oQiwCtTy6jmmHX8QAw8UMlOR24I5VOtwWrq/weYXuhlxR5Y?= =?us-ascii?Q?UpHOWfq3vRSAPcKMIxfx/Qqol8Kjam3qCwGsqsyWYUzQ8maayEK6ai6Mq5ev?= =?us-ascii?Q?79Y8LXa2T+ndQ1dmr8Z77N88yfwdMnB4mkTVn8ft+PdG9sN5ZCmSoPBuhHCX?= =?us-ascii?Q?1w75U5DcoM6RjyidPeZyMw1L5YoWqmhFvs0QibAf4PeckK4H/06Z5ZCTVKGG?= =?us-ascii?Q?apgIpM2hnYSF41zOSj6InrRgLNTQ7vt0ruVe9AfQMS7hQ2wOgH5gJXA9LOW+?= =?us-ascii?Q?dklPzsd0m9LZZeR0ukz6rEgrEA+CELG3Vo/26j0huxwokc6sEaObof34173t?= =?us-ascii?Q?fwCwtkoQaY8Pe80U5wXICAPaeNw8kb+w+k2kjNIgh3aqGWiN2oRyHDoR8KJ3?= =?us-ascii?Q?kOlg8+1nA+hUYDYjZXuGG4Z0KucGH14dhUV4GmmyS3410OEgPVl72nvdOjxD?= =?us-ascii?Q?kkD0tv63QJ0baqZ1/azsT4+CoF9+oLGWy3Jz5Ih8RNwxfmeJ5VBJ+B2Ytwi8?= =?us-ascii?Q?bEx0UT/ZGf2YDkStAcp/z8SlUoSkEIgWpo5BU+k306M+dZR582+GsE+15utd?= =?us-ascii?Q?MUOPf8QNeh/ZdhflyYBc3cjdFcQ+eKLpS7+tOCPsLmA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0709;5:NH2UwzpkLwRmTifgX3F+30Dhss9a8MDKx2c4dG/AXQxcn7FEjTl7h+KdSNs6k9/cwXelaPlVfUbChQDDgRG9qg7ip5vZEYqwj1wMXUMss/dP1iEpRxjEhFxGvxxs9y/hldKRumE13bIvT7NCjFMUZYiNFle79uIZdN8k+qemom8=;24:5meJAceWpJS2B2ayFbEykddnDW9ohUPF9YN0zRj8ZnDEtR9eVR4qjK0HxnS8jwMdn0oa5j54cKl5bVCKpV5U6L8MQYnfNHb1KVF2oIaZWrk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2016 16:50:28.7510 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0709 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1228 Lines: 36 From: Horia Geanta dpseci objects < 4.0 are not coherent-- in spite of the fact that the MC reports them to be coherent in certain versions. Add a special case to set the no shareability flag for dpseci objects < 4.0. Signed-off-by: Horia Geanta (Stuart: reworded commit message, updated comment in patch) Signed-off-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/dprc-driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c index 53c6e98..7fc4717 100644 --- a/drivers/staging/fsl-mc/bus/dprc-driver.c +++ b/drivers/staging/fsl-mc/bus/dprc-driver.c @@ -312,6 +312,15 @@ int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev, continue; } + /* + * add a quirk for all versions of dpsec < 4.0...none + * are coherent regardless of what the MC reports. + */ + if ((strcmp(obj_desc->type, "dpseci") == 0) && + (obj_desc->ver_major < 4)) + obj_desc->flags |= + DPRC_OBJ_FLAG_NO_MEM_SHAREABILITY; + irq_count += obj_desc->irq_count; dev_dbg(&mc_bus_dev->dev, "Discovered object: type %s, id %d\n", -- 1.7.9.5