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 16F52A0542; Fri, 16 Dec 2022 18:18:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 09D2242D29; Fri, 16 Dec 2022 18:18:07 +0100 (CET) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id 7788E4068E for ; Fri, 16 Dec 2022 18:18:05 +0100 (CET) Received: by mail-wm1-f42.google.com with SMTP id p13-20020a05600c468d00b003cf8859ed1bso2290891wmo.1 for ; Fri, 16 Dec 2022 09:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=xX8CIutqebOv0MhwRfEEYfa642r47l0Jt8l+uU4SXQ8=; b=cxAdApX0WVc1wahqlQNfnY2mDZsQRyr+WeOdcs3BE9GWjEnXfWwW5WvTxLZMO281Xl UpXBHQtjB/uSh0VDt6edFjEhiSCh6CV7uaXtpiLvbbBw4SEUVANc9iCayuXZULzfRN5+ 9VD3GsaV6LZR/BpmmrDMSQwkT8yCzW5oU0rNWAZMgHPfqin9TxPXdTwPphLZMjTY4AA4 ZuDLVsPNlbVhOGP04Ew3L7buE3TU9v/0ijRDMmBPHm3VLSH2yMkOl7pChKZF+5Fo3FNI /RMKttak2iGx+tOwursK/KjzNLzqKDn38nfqc+UqCphG4ycT7Gzd5I5SmwlezZnYVf3f DeqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xX8CIutqebOv0MhwRfEEYfa642r47l0Jt8l+uU4SXQ8=; b=kvyiJ7+u4q8lj5LbDsgtvcWSPHQ2yny/xnekgi2Hrjp+ZfJ4GVaMzNtA1u7X8oPyFz wBx4nZu/5s9+wjnUm1rBy2ZIODs3xsr5mnQmSWsGJHTUANDi+vixVR06QJCrJmMaTGDj CSo3ZxuaatnLK2h+/tggfyjT/dCoYG2+sXyKZHw54ASEXl4a5kx6iXXzeppU0TUcpR39 MtF0foE89ujyn57/BdCveAlT1f/jw12LoNuH10bL0mTE0+TbvzEsUvraJdm7C2sfm5zg sJ10EzLZk7RHp03SUv7E8xl+YQuGPyhR8AcGEWvP3c3SN+1FLlKWNHH5r+r56FZqrRHb SJYw== X-Gm-Message-State: ANoB5pnw+Pm5ihko7UHwOd8rPZ6gq/vocL3zZcOl5a47gHTpqS6I5Jh+ w8SlXW+mMuAe9UO2AOznOpBq6LR3SSU= X-Google-Smtp-Source: AA0mqf4nhJuqMR0dxN6ehDP7dg8mijbkUtrM7zRm5eM51760em3AC92goJPZLjfm4zfGFReFmQOlPw== X-Received: by 2002:a1c:7316:0:b0:3c6:e60f:3f66 with SMTP id d22-20020a1c7316000000b003c6e60f3f66mr26503298wmb.29.1671211084930; Fri, 16 Dec 2022 09:18:04 -0800 (PST) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id j41-20020a05600c1c2900b003b4ff30e566sm22605471wms.3.2022.12.16.09.18.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 09:18:04 -0800 (PST) From: luca.boccassi@gmail.com To: dev@dpdk.org Subject: [PATCH kmods] linux/igb_uio: fix build on Linux 5.18+ Date: Fri, 16 Dec 2022 17:18:01 +0000 Message-Id: <20221216171801.348224-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Luca Boccassi Reported-by: Paolo Pisati Signed-off-by: Luca Boccassi --- Only build-tested. linux/igb_uio/igb_uio.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c index 33e0e02..3d8a8a8 100644 --- a/linux/igb_uio/igb_uio.c +++ b/linux/igb_uio/igb_uio.c @@ -512,13 +512,21 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) goto fail_release_iomem; /* set 64-bit DMA mask */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0) err = pci_set_dma_mask(dev, DMA_BIT_MASK(64)); +#else + err = dma_set_mask(&dev->dev, DMA_BIT_MASK(64)); +#endif if (err != 0) { dev_err(&dev->dev, "Cannot set DMA mask\n"); goto fail_release_iomem; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0) err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64)); +#else + err = dma_set_coherent_mask(&dev->dev, DMA_BIT_MASK(64)); +#endif if (err != 0) { dev_err(&dev->dev, "Cannot set consistent DMA mask\n"); goto fail_release_iomem; -- 2.34.1