From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A1DBDA0579; Fri, 9 Apr 2021 09:59:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6AEC3141395; Fri, 9 Apr 2021 09:59:40 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 480F5141394 for ; Fri, 9 Apr 2021 09:59:38 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1397usgU014464; Fri, 9 Apr 2021 00:59:37 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=wcmgDj+D2myDcODiOss265T5X0TA82U2in0FMAEcGic=; b=A6eMUujb0Mn5Mt3QciifV19AvPQuU3B7YhCeDtbNrzGgHDJobtbqhk1UiiENpset4LSN /73FS0JiG9PR1XayPdU2iLFXsKe/3oRYyk4jv54dKoi5JJZS+Zxe7UmuvuapvRzmdZ0X 5k7QKxi077VQBNrLWDWx6dg0riQDTuwUL1KHEtr79zPKrUh0+EYb8e1S3v7Rrix5Ujm2 WCvcOZYf8qI08xeFgkV3+R2fScvpRxHITZFKgdrspYBClIHAHgBtlMQoCanoqExckYZl tr8JBPAK/UDcDHn2kdxfosvJ2ohc09W/oanVDepi3UdNhtjYXkxSmdFcK0jLsltiCT4O 1w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 37tftp8frj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 09 Apr 2021 00:59:37 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 9 Apr 2021 00:59:36 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 9 Apr 2021 00:59:36 -0700 Received: from rchin-dellt430.marvell.com (rchin-dellt430.marvell.com [10.85.176.141]) by maili.marvell.com (Postfix) with ESMTP id D1E443F703F; Fri, 9 Apr 2021 00:59:35 -0700 (PDT) From: Radha Mohan Chintakuntla To: , CC: , Radha Mohan Chintakuntla Date: Fri, 9 Apr 2021 00:59:22 -0700 Message-ID: <20210409075922.122787-1-radhac@marvell.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: srdSGKpkm1oJlSRmPGpeF8jicuNjxARf X-Proofpoint-ORIG-GUID: srdSGKpkm1oJlSRmPGpeF8jicuNjxARf X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-09_04:2021-04-08, 2021-04-09 signatures=0 Subject: [dpdk-dev] [PATCH] raw/octeontx2_dma: fix unavailable PCI device in dpivf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The PCI device address is being used for sending mailbox which was introduced in previous commit which replaced the macros so that multiple DPI blocks in the hardware can be supported. This patch fixes a NULL pointer access by assigning the PCI device structure to dpivf. Fixes: 4495bd887d38 ("raw/octeontx2_dma: support multiple DPI blocks") Signed-off-by: Radha Mohan Chintakuntla --- drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c index efdba2779b..8c01f25ec7 100644 --- a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c +++ b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c @@ -389,6 +389,7 @@ otx2_dpi_rawdev_probe(struct rte_pci_driver *pci_drv __rte_unused, vf_id = ((pci_dev->addr.devid & 0x1F) << 3) | (pci_dev->addr.function & 0x7); vf_id -= 1; + dpivf->dev = pci_dev; dpivf->state = DPI_QUEUE_START; dpivf->vf_id = vf_id; dpivf->vf_bar0 = (uintptr_t)pci_dev->mem_resource[0].addr; -- 2.24.1