Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7750877ybi; Thu, 1 Aug 2019 13:18:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+STwp7zL4Xtvfr6aEGH+/AMvRAFsTYg8Qj32VJZuQE6qQEfBMvuHpJSx479cpo7QrkQZx X-Received: by 2002:aa7:9f1c:: with SMTP id g28mr54793017pfr.81.1564690729596; Thu, 01 Aug 2019 13:18:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1564690729; cv=pass; d=google.com; s=arc-20160816; b=PJlrJgC+igqr+J72u9IDEbghxDsnloDuD41v+ZLRYNfFOjy0h2mk6abPOLLF1/NP/h 52H1KfNew0UsI5XdNAq7CS4VrT0pZb9NgtFibDpBFqwhhOt7wCkMIE2OtKZ+J5swLddc h6cE9j81FyigRh5CrZ8I5isj6i1bSKVUoI1mDViXZ45Dm3lnMhwHEm2pSxfpEUF1/olr iC8toGTG+Tns6tWhM5QCzFdZY87aDYclsDa9yVJNbAompD25629HdnMsNHGnrlMo0lnN pXF/4rKesn/dCsPGGa017VW6hatVem1VONf4FS5duj64wD5IyA45Vr5ZaFjUHx9lLoKX 15Bg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:reply-to:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=aBWOZB9A9QLCsl/EiU2J6XfBNYpFfgi0BtBgM52Vh8M=; b=KvQwhJGsEAGOsegtUQ06Jyiw0qxgG57wDulDgmkyH59k2peTGim3cHGKbGlFs3/795 Dz0CYFqseMs14u3OMJqbF7eyDuaTF0KMvzhVrw7RHSJBWfCht3i5WoIrqb8XkN0+nbH6 dBWGawVkc6TXEsCA+Lw/aF59vvtQR+z4g/vD7PtzNcglneRsOTCgmLsVq2eMf7RoUvxn vJJ8DlWherlAPnDMWG1o/vmYx6YEXEWIjGl2emc0jbZyqSo+x1ymM0zMxb8P2glBeGoa PunzCeElxNOy6QV97FEVAde8qxGEC8gkPLnquQ3XcljdYi2RgJeYbv8x3M8T++J2gJ4I sPhQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=RLDyPFLk; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y14si20441937pfr.82.2019.08.01.13.18.33; Thu, 01 Aug 2019 13:18:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=RLDyPFLk; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388979AbfHAURZ (ORCPT + 99 others); Thu, 1 Aug 2019 16:17:25 -0400 Received: from mail-eopbgr60082.outbound.protection.outlook.com ([40.107.6.82]:11040 "EHLO EUR04-DB3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725846AbfHAURS (ORCPT ); Thu, 1 Aug 2019 16:17:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RffXdq5IMWd99E3ft2BFBBovy6Sgjz6qb8j66RD44BjpFdi5WtdzYJIF7XNnStcR8/goxwFNrufIpkcXl9WDk/5zPx5t8cAg+0P8zE+/JJwZh8CdpTaivcEWXVKYcldskd3oOycQYU0J5NJ16gUTIacnHV+yt6u89iEYJYOcA03yadqrVaryvy+sKZzPqsIJInKy56VFQOimqepwe23jEXihUP4DhLZzwsZTYj8d7hOfGX22LxmIP/ckuWafJZCY9/kfuooecLHh0PXzQFkhW8JQW8BxhVTbltQIQQiMXXMY0mDXSSywBJBOVzTrq5UMheYFNW6VAfsEedvtvkeL4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aBWOZB9A9QLCsl/EiU2J6XfBNYpFfgi0BtBgM52Vh8M=; b=K+GowrPsjIZwOnsf5QpTiFdyvWoBQd5Wq7G1OJ0p4iD3kUKxyG/z6Jh9TCGapOZ5XJWJ3cKKdC1vG3074JEAquJm0cnW8k1tYXJLrvmvBn26A5opjHVj+UIyvQkmbFtRWLMn1OIc47vJ1byj5w7RSH8ENL+rbpb4iOmYjlFhUB2JnKGeIzB/FOe75PsItnpvYqB3v51rH7brGM74fU+Audz4QJWiP/tQMCYBJU1pscXfYug6tIXur/hYyVuAWRjdPfMegokqdaj8lNCzAG+z+WiyR4TW8FezFbfJsOy/DrKKKJuNCyiLbpmS+2/DVrxlUnra5VpUIgNqAHhx75zsSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=nxp.com;dmarc=pass action=none header.from=nxp.com;dkim=pass header.d=nxp.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aBWOZB9A9QLCsl/EiU2J6XfBNYpFfgi0BtBgM52Vh8M=; b=RLDyPFLkOpzZrlwtSfnEQiAiuRKS9Ldpnp+iFr7fIXxeMvOkEt0MZ1xEl5Q6QEQVo1Xpajc/t3+9X0HPmpZDVO52emIrdb+jckzvPThfBy9EovSUYTWCusXpFuRanwrb+Ux0vejNQEm2UqU5v+1vQWayf1PyvI5OsxLzuBb3kQQ= Received: from VE1PR04MB6463.eurprd04.prod.outlook.com (20.179.233.20) by VE1PR04MB6656.eurprd04.prod.outlook.com (20.179.235.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.10; Thu, 1 Aug 2019 20:16:59 +0000 Received: from VE1PR04MB6463.eurprd04.prod.outlook.com ([fe80::8fc:e04c:fbb6:4f1f]) by VE1PR04MB6463.eurprd04.prod.outlook.com ([fe80::8fc:e04c:fbb6:4f1f%7]) with mapi id 15.20.2115.005; Thu, 1 Aug 2019 20:16:59 +0000 From: Roy Pledge To: "linuxppc-dev@lists.ozlabs.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Leo Li CC: Madalin-cristian Bucur , Laurentiu Tudor , Roy Pledge Subject: [PATCH v3 4/7] soc/fsl/qbman: Fix drain_mr_fqni() Thread-Topic: [PATCH v3 4/7] soc/fsl/qbman: Fix drain_mr_fqni() Thread-Index: AQHVSKYSvUv/rPwBlkeXxjwGukCmsA== Date: Thu, 1 Aug 2019 20:16:59 +0000 Message-ID: <1564690599-29713-5-git-send-email-roy.pledge@nxp.com> References: <1564690599-29713-1-git-send-email-roy.pledge@nxp.com> In-Reply-To: <1564690599-29713-1-git-send-email-roy.pledge@nxp.com> Reply-To: Roy Pledge Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: SN4PR0501CA0130.namprd05.prod.outlook.com (2603:10b6:803:42::47) To VE1PR04MB6463.eurprd04.prod.outlook.com (2603:10a6:803:11d::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=roy.pledge@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [72.142.119.78] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6049c9a1-f12f-452c-727d-08d716bd3535 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:VE1PR04MB6656; x-ms-traffictypediagnostic: VE1PR04MB6656: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:330; x-forefront-prvs: 01165471DB x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(346002)(136003)(376002)(396003)(366004)(199004)(189003)(386003)(6506007)(305945005)(7736002)(71200400001)(71190400001)(68736007)(14454004)(36756003)(54906003)(316002)(4744005)(110136005)(6116002)(3846002)(486006)(186003)(66066001)(6436002)(256004)(26005)(2201001)(6636002)(3450700001)(44832011)(6486002)(102836004)(2906002)(14444005)(446003)(476003)(2616005)(50226002)(64756008)(66446008)(66476007)(25786009)(81166006)(66946007)(52116002)(5660300002)(11346002)(76176011)(478600001)(66556008)(8676002)(86362001)(81156014)(8936002)(99286004)(6512007)(4326008)(2501003)(53936002)(43066004);DIR:OUT;SFP:1101;SCL:1;SRVR:VE1PR04MB6656;H:VE1PR04MB6463.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: MIb5s+aQ0MhROi2TSCfXpU78AOwyFbta0P+YAFTHfdSSu1PDwH1Pis8mY1+y2JBuQViVJVbTMBfxhOBIC3AN0ZtCu1jekactVCAoF46ZQ8Ig3c6r3Vn1EFW26ViB07fnVrGONkXf711UZAfZHmBpLMqoMSsG2d4ErQXMW7E2/vr/bCMQMmK7vT3qTnFD1A20Ajd8XL2QqwMe4wDMIecfuTJIg8NFdvt1uA0m95PyM4wYHIyqwvJAlqJMSWdiLtBnleQtcs4nrE9lJ9ET/9ZXR6F8N1MGRqzY+170nbuYBWRDRja/cxFS88gMJZVb87ZHg6xU5ugtmFv3tn5LI5+yy5TbMz2x95jLHOsNwZgiQM1Yfc4K5u7JBTA3ame53qLh8zNFAAsQcng0AVAmEAi8ic872b7FtHbY4FFjzpX/1+o= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6049c9a1-f12f-452c-727d-08d716bd3535 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2019 20:16:59.6707 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: roy.pledge@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB6656 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The drain_mr_fqni() function may be called fron uninterruptable context so convert the msleep() to an mdelay(). Also ensure that the valid bit is updated while polling. Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/qman.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index f10f77d..2989504 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -1164,6 +1164,7 @@ static int drain_mr_fqrni(struct qm_portal *p) { const union qm_mr_entry *msg; loop: + qm_mr_pvb_update(p); msg =3D qm_mr_current(p); if (!msg) { /* @@ -1180,7 +1181,8 @@ static int drain_mr_fqrni(struct qm_portal *p) * entries well before the ring has been fully consumed, so * we're being *really* paranoid here. */ - msleep(1); + mdelay(1); + qm_mr_pvb_update(p); msg =3D qm_mr_current(p); if (!msg) return 0; --=20 2.7.4