From patchwork Wed Dec 29 06:07:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Chen X-Patchwork-Id: 12700752 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 535B7C433F5 for ; Wed, 29 Dec 2021 06:07:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234500AbhL2GHj (ORCPT ); Wed, 29 Dec 2021 01:07:39 -0500 Received: from mx0a-00622301.pphosted.com ([205.220.163.205]:29646 "EHLO mx0a-00622301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234520AbhL2GHj (ORCPT ); Wed, 29 Dec 2021 01:07:39 -0500 Received: from pps.filterd (m0241924.ppops.net [127.0.0.1]) by mx0a-00622301.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1BT64lSW012466; Tue, 28 Dec 2021 22:07:27 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ambarella.com; h=from : to : subject : date : message-id : content-transfer-encoding : mime-version : content-type; s=com20210415pp; bh=/omBWCIbafD8kLqQUOsGPJqVxH+KzYGJXQcIPMYS5zM=; b=XT1U/au0Wc0rf5UOO8ekh3psNmVAiUR5oY8EQ4Bgm/ETi3b7/fetc+g5NNkKKBZFJOPd HocVLHQHf5Di6mIsOiBLibpocCydVY/2HaTkTS/xGDUxNzl8eLZ/dV68c23dbGcZDzU5 aHT2MwvDkTRMKMlF2AC59RZrkdbKPE/shQmq8UjgpAUy4C97hwxySsVFloCH+PM1Nqv2 gRlga/LqNe+tROEMzGEypBzWDTMlx0K0kMzM7jHHsubQBOvsNtJX/2eJLfrq9ATcldqW iL1/ULUhTMa0S1rxv65casg4CmIUDsS/2uAEV9RfiZ6f4qtkL8GdkIcW5jkQJ0wjRPPR QQ== Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by mx0a-00622301.pphosted.com (PPS) with ESMTPS id 3d7f1dh3hv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Dec 2021 22:07:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dw0whSiJ1pVsCI50ngKk1H67j210Oe4/8/1MTqhKkeWY7FG+S29xIzpAtlYzjVr8f+lckoEsB6Wbjsb/Cn55qYb2D5k94Ew1ObHH3zlnHQrcajoCIuRxyuEjdApWRflu5tbnFZi5eNhkLNe5Lu60+V3c8M30Z8pb/fhf2lbN03kjd74eX0AF5yclhShAfV1zJea5oC8TkFhcwV8HUEm31BrDh0e3VX752ounbRnk3J4SeAxsR4bY4oTxvFe+/YpAv5mrndD7CwuY9qvu72gRXUj1vvXa3qor91OJcSWJ/eIAR4TpC6jCTNLrJFNzrHOq4kq5I9go4td+jqGAD4vL3Q== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1Wfc8iZEqgIgTegNd+W4/c7w283MftuSwCA8nPVXm7w=; b=C9M/utajHhBnefuYuLj1yRRCIFQhp6eil4+yac8fRMdw3V7tVmXN6f8CDObZkHwPaJrU3w+iM7XuPyuqj8+2AfXWcUV75uzlkD9vIdeITjv4UbMv5xoJ/EEb3WXzrscfL1gzqOnxZeZYm4UdqMkGWjSqcBuJJbodq9yF9xwAFSuwRyArHxiw7hHiE4P9S/7jkCNedV1+IJvbHEHItIpAu+LWaleshsYdJZPVue5X1pyqTJ8a3SZ9kUlYRkN+LpBcrOGxpK1C1A2Atb0P/jtCICLywq9CLuWT50esdGxgZ+G1KuuNB0xAlK4ZiCBDWc53pWy/TK2je97a+HNvY308Vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ambarella.com; dmarc=pass action=none header.from=ambarella.com; dkim=pass header.d=ambarella.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ambarella.onmicrosoft.com; s=selector1-ambarella-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1Wfc8iZEqgIgTegNd+W4/c7w283MftuSwCA8nPVXm7w=; b=DmgXo3FJKMWxqWxUNdrwUnNZ/66BHjyW+shlX06EeuNY0VL2rhpJRVNGGnjNKxfG//yGk8OdowwZoAKys/aDbIGHjLnQbCiBa0CTdJpoC/faVMrBXA4wtkfHN/591tKZxJoTZshFgCaANiFD2ci9P+yOcvxKrdfZo8lDNw0fIqs= Received: from PH7PR19MB5562.namprd19.prod.outlook.com (2603:10b6:510:132::22) by PH0PR19MB5441.namprd19.prod.outlook.com (2603:10b6:510:fb::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.14; Wed, 29 Dec 2021 06:07:24 +0000 Received: from PH7PR19MB5562.namprd19.prod.outlook.com ([fe80::8c3a:e80f:9fe7:959]) by PH7PR19MB5562.namprd19.prod.outlook.com ([fe80::8c3a:e80f:9fe7:959%5]) with mapi id 15.20.4823.022; Wed, 29 Dec 2021 06:07:24 +0000 From: Li Chen To: Kishon Vijay Abraham I , Lorenzo Pieralisi , =?iso-8859-2?q?Krzysztof_Wil?= =?iso-8859-2?q?czy=F1ski?= , Arnd Bergmann , Greg Kroah-Hartman , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] misc: pci_endpoint_test: fix misuse of COMMAND_READ/WRITE Thread-Topic: [PATCH] misc: pci_endpoint_test: fix misuse of COMMAND_READ/WRITE Thread-Index: Adf8ec9MVzgZ+shNToay1AX1NAaMGA== Date: Wed, 29 Dec 2021 06:07:24 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 182edb38-6253-43a8-563c-08d9ca917bb0 x-ms-traffictypediagnostic: PH0PR19MB5441:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1824; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: nkXvhdpyGCPtsfDXFhclpA8/ljoRVJJl2/0A7n1pVO0c08ypIDeDK3PowcyjciO9Pnw3yONhb66SfJEdZ+a01jxuRbkNLWWKP9Bp1PbE4LR/3HF2foUOA0Hlpw7eM1SlPqAsYqY4YtIf8DavChmKX+0792yzzNI6iHZS2lCNPWAoEDvUwXiy3kZ4zFnl+xWFyvQI32EDj2OlsNTWb+IGf4ajqsgh/rW7YkcF7IKMVl9u0B9Efp8/o7LWCxzhglyFQTxm6y8wtXmZlawgDJKkng8ENQz6ZfjX69hBUlEY3GxOYHaLMy/TbRN5LgkLUGyoc/6lStYtwaax6KBcc1rAuSjvsOP7mC2zdACvIDjzHPsBFgoRJQFTvNwCvX/EGg4Yw4jkraFEVtni8OrObW2FsYzR/ogpFHfZT7gOCFW3kDqaReCHz4QLJ/nL5S7hrD/q+6tCEWLW+cvmRXGilMMuZ5hTL264+L5Q9lWO5khSWXzmKDgk7exuvKaa2+1MqWEEkItlkozMihz0ArMl+Q0DwRPC35awLJD4K8DSCOivyGzeTWSqoJanx6xvjYaxmUEaDZ9ICWjX6/0JLGaPpGqtKM6jOD09kQJy+XtgH7yNHmXlGsfJlqumJzTEEYbtOpJjuWf1+y6/p8dr4ZghSPFRww== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR19MB5562.namprd19.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(86362001)(66556008)(66476007)(66946007)(5660300002)(52536014)(64756008)(66446008)(2906002)(508600001)(88996005)(122000001)(38100700002)(9686003)(110136005)(316002)(8676002)(8936002)(26005)(55016003)(83380400001)(186003)(33656002)(6506007)(71200400001)(7696005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-2?q?pvCJl1wyrVDQzlAsiyu3p1K?= =?iso-8859-2?q?GFGCbWpXq1y79AG9CI7noqv9gIYOci8AyImfiwgvfzbOOLspxSrKryM+zPNe?= =?iso-8859-2?q?GeRIdhTt2pQOlCo610G7Fz1jXH17XWVFZPKqEH6L8948dv4N72Y781gur86S?= =?iso-8859-2?q?E833q7QJ7WKxNuSnIvPrUZihX22AeaZnECxvDnXFKrc/R2KlLZFlSy4MgwJb?= =?iso-8859-2?q?bfkYlfZCL9gwKtU+Z0g4MY0iRswn4EeTe6W8LxoSDofmc6s7OG8kASD43M9j?= =?iso-8859-2?q?cY1ZO88/qdRWROfYTzyBGhL7CTAB734PCvl8391VoVsaBcVtXQARzWs0Ry0x?= =?iso-8859-2?q?nr9dXzIEfBwwMkr9qgc8UrWUCUujutgxdz9ZMT2wEcPaMpwE3LyGJpSzYVqi?= =?iso-8859-2?q?y7q1R2WcMJ6f2DMYpB80Nq84BqGfI6bZKsgbTKx8gumuMHjc0dWae65/i+Py?= =?iso-8859-2?q?swGv1FsHsTdr8YijmVii+Lhn43DljSfuznOhCsGwF/779jS7hL6SD/YXHbLy?= =?iso-8859-2?q?JSGcqU5vzgapeJ+NkNtCYn1Rjt2D8auh7w//QW3noHfIw2dFYoLpX3PEIkXc?= =?iso-8859-2?q?YV4Yz5cHwI6d2v78DxnEFw4eGjTrDkylXzQk8MYSk5McUkuL0fSHLvUNvjxC?= =?iso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+zzIhdLG4xIMaqfD6x/7al7rHJIBT12eGgQe043/+Hp?= =?iso-8859-2?q?ERxuyRaIby4QmrMcVuRVSCJnL1IcN5BHkZ3uwslSGVARKUL2saZp1yQq0tGc?= =?iso-8859-2?q?RbDZw0pHfcVeTcWYrswQq4mQSWRfQmdgNMENI0/C//skQYFr8HuySfBkLWpc?= =?iso-8859-2?q?=3D?= MIME-Version: 1.0 X-OriginatorOrg: ambarella.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR19MB5562.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 182edb38-6253-43a8-563c-08d9ca917bb0 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Dec 2021 06:07:24.2296 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3ccd3c8d-5f7c-4eb4-ae6f-32d8c106402c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: W+KomdcPLSDgjKXcIuvS4MsPv7vNBkHRA82tqJbSg2+6y6kpOCtKSdSEFkyJdbXxjpL5QfO71Xw/xWh4VGwnVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR19MB5441 X-Proofpoint-ORIG-GUID: 5tCJon9bp0jlRkfRGc5keGezCdVsmh2V X-Proofpoint-GUID: 5tCJon9bp0jlRkfRGc5keGezCdVsmh2V X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-29_02,2021-12-28_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 bulkscore=0 spamscore=0 malwarescore=0 mlxlogscore=999 clxscore=1011 impostorscore=0 suspectscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112290033 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org IIUC, COMMAND_WRITE should be set for pci_endpoint_test_write, and COMMAND_READ should be set for pci_endpoint_test_read. Signed-off-by: Li Chen --- drivers/misc/pci_endpoint_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index 2ed7e3aaff3a8..ea7a90830932d 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -551,12 +551,12 @@ static bool pci_endpoint_test_write(struct pci_endpoint_test *test, pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_IRQ_TYPE, irq_type); pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_IRQ_NUMBER, 1); pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_COMMAND, - COMMAND_READ); + COMMAND_WRITE); wait_for_completion(&test->irq_raised); reg = pci_endpoint_test_readl(test, PCI_ENDPOINT_TEST_STATUS); - if (reg & STATUS_READ_SUCCESS) + if (reg & STATUS_WRITE_SUCCESS) ret = true; dma_unmap_single(dev, orig_phys_addr, size + alignment, @@ -643,7 +643,7 @@ static bool pci_endpoint_test_read(struct pci_endpoint_test *test, pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_IRQ_TYPE, irq_type); pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_IRQ_NUMBER, 1); pci_endpoint_test_writel(test, PCI_ENDPOINT_TEST_COMMAND, - COMMAND_WRITE); + COMMAND_READ); wait_for_completion(&test->irq_raised);