From patchwork Sun Mar 14 19:40:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12137925 X-Patchwork-Delegate: miriam.rachel.korenblit@intel.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 X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 131DCC433DB for ; Sun, 14 Mar 2021 19:44:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C772664D9C for ; Sun, 14 Mar 2021 19:44:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233710AbhCNToO (ORCPT ); Sun, 14 Mar 2021 15:44:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233389AbhCNTnt (ORCPT ); Sun, 14 Mar 2021 15:43:49 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 977CFC061574; Sun, 14 Mar 2021 12:43:48 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id j18so4644319wra.2; Sun, 14 Mar 2021 12:43:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=JhQQZ730Ric7YkzqrbciaYJqNCpwz1HnANK4iuqSu2g=; b=jd7TiWzFZzxNUrFPuqmjaB5O1BDKvfdPQib16Qf5LBJf81Ah54FkVAg5yh11S0ipQt OWp9Xe8RE8Md4dg9gAxv8DR8+uRjHvLg/21CiDi5flLPxvI1swDqoSncwtoh44N1wMEr hTRxlmLmObA11646pwFxtOQ96N0k/fy1cJn6Ne+SgY91fTRaz2zyedU2YYglDDyWZdjc dr1hVIaWfTq/gJ/fmFdUfUpvZZqOhoen6U0yM0Yre+Rk63UaZzErDLVi/Uw05s4Hdh8x X7dB6t2lQwYnrAPqLvqIncz1bzINpS34+Dtsj37bGMlJLwz+Ga9Yw3CQoWbfHVVML8jv ZblQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JhQQZ730Ric7YkzqrbciaYJqNCpwz1HnANK4iuqSu2g=; b=DtEubkKleqaHsyxtfIRR9pTwfUpcz7760m0+hSIeIq2IxUElrha9H92dlQHXeQ33+B OLXVbEIiUUGbxmZQT6G5HgG9toNl0VKQb/ktz0HC1JxIkJ47wqYGt+29NMNqYHRdb48O 6W7ndUY3Nt4SLhg7/q366mrK6dGK3aRydIP9h1u0Nce6aFMYXxHoqH/zBXJUqaVhUE2D XLGsd7wieP4P5b+tbhlMfr5KuLcKEl3uN3y7wIQH0M4/DzvCT7zpH18DsnAwO9rhpOOH z3ljp3bp+yKV6nfiTXCh7Vf9yD2lNV96TmwfPqvEUAdunpvAEZcPrbUrdRfHK/GV4eBx qgyA== X-Gm-Message-State: AOAM531nak5aY1Ce7PuucBa1tGyWdgzNCPJRRbQmVfG5D+A1dKzw2ZZx t+JqwL/gqXAEvK4wBMX5orHfItNRDowVuA== X-Google-Smtp-Source: ABdhPJxY1J0l8vaQiUBT6wUYkPhG0LATc7waebos/Z7EFDdesiw4carYxR7hHUKKFG80zAd1hDGmQg== X-Received: by 2002:a5d:6cd2:: with SMTP id c18mr24015011wrc.330.1615751026993; Sun, 14 Mar 2021 12:43:46 -0700 (PDT) Received: from ?IPv6:2003:ea:8f1f:bb00:fc04:867f:ef73:99ed? (p200300ea8f1fbb00fc04867fef7399ed.dip0.t-ipconnect.de. [2003:ea:8f1f:bb00:fc04:867f:ef73:99ed]) by smtp.googlemail.com with ESMTPSA id u63sm10176042wmg.24.2021.03.14.12.43.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Mar 2021 12:43:46 -0700 (PDT) Subject: [PATCH net-next 1/3] iwlwifi: use DECLARE_BITMAP macro From: Heiner Kallweit To: Luca Coelho , Kalle Valo , David Miller , Jakub Kicinski Cc: "netdev@vger.kernel.org" , linux-wireless References: <22e63925-1469-2839-e4d3-c10d8658ba82@gmail.com> Message-ID: <7dc766a7-7aca-5d24-955a-cf2a12039b31@gmail.com> Date: Sun, 14 Mar 2021 20:40:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <22e63925-1469-2839-e4d3-c10d8658ba82@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Use DECLARE_BITMAP macro to simplify the code. Signed-off-by: Heiner Kallweit --- drivers/net/wireless/intel/iwlwifi/fw/img.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/img.h b/drivers/net/wireless/intel/iwlwifi/fw/img.h index 1dee4714e..de6c7d05a 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/img.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/img.h @@ -51,8 +51,8 @@ struct iwl_ucode_capabilities { u32 error_log_addr; u32 error_log_size; u32 num_stations; - unsigned long _api[BITS_TO_LONGS(NUM_IWL_UCODE_TLV_API)]; - unsigned long _capa[BITS_TO_LONGS(NUM_IWL_UCODE_TLV_CAPA)]; + DECLARE_BITMAP(_api, NUM_IWL_UCODE_TLV_API); + DECLARE_BITMAP(_capa, NUM_IWL_UCODE_TLV_CAPA); const struct iwl_fw_cmd_version *cmd_versions; u32 n_cmd_versions; From patchwork Sun Mar 14 19:42:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12137923 X-Patchwork-Delegate: miriam.rachel.korenblit@intel.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 X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14B68C433E6 for ; Sun, 14 Mar 2021 19:44:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD32864EB6 for ; Sun, 14 Mar 2021 19:44:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233802AbhCNToP (ORCPT ); Sun, 14 Mar 2021 15:44:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233554AbhCNTnu (ORCPT ); Sun, 14 Mar 2021 15:43:50 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD329C061574; Sun, 14 Mar 2021 12:43:49 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id f22-20020a7bc8d60000b029010c024a1407so19008640wml.2; Sun, 14 Mar 2021 12:43:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Uphds8AuecjI9QNpNuQj9Y2x9eEtS5xUyy6OMjiB/rI=; b=p3D4LW2jo/Y4MC/YyTNIOSjEVoJebt3vUOuIp2dLzEvN15giSGRMamgiBAK0LIGQcQ fG8sFgbAiunf/nkLSeZ8mezIeHiOXnMZIrHt1uYXzgHjEL4Hm8GTl5JCBnAOsZ0Rt9Qf yb8/2u53ugA3FZ/7Bfzd4Jmlu7l9tKauA1iHetQoqcIBibTp4H28sEBnSth9JnzvAXj4 RKgHdP8k0PtVcBBDhijmiScQCEHcwrCtfc/8mFbCXdDYWjIR536dq7svTUp0mHAVa2m2 OhsN329f9/23RxcinIUHJVRjy+WxoYt5SzSMC027HiqmS83DEZHxakAtmWLsV7YVbOhW 4d+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Uphds8AuecjI9QNpNuQj9Y2x9eEtS5xUyy6OMjiB/rI=; b=NvJrF/9E5sC/2UDL/DT002LrkvgkvU85lIgesg38y48JV93NVvMt4apxQTEMUznLz/ f1sHTVNn6Md+NmCHfgab4szz/oncppgL6Xcu/fpvSzqHPJA2jFTbfZoQgRwDYP5+tOLt D/4bCCQUMJMOuZhvYhGz+tymYBWaKCyVkg04mv/8nTHZX+TSx/E1P8atOyWGsovt1QZY cRQA6zJRGAmV6sZKktiNAL/MxJh3Xw6RWJTWjOB42HhWvwhmDtVGNb7uHBHCwbVpwEh2 576nURRxok2IyPeWilGdcbXxhE/vEIMVIojJhEfLcS2WojIjNTGK1iEm3N0hDl8bxYhy Nivw== X-Gm-Message-State: AOAM531vQRRgMs5fvPC6u+0bDmwFfHKGsHkS5JewoEzk9oeood5etx1/ jThZuiQfh+q2UczS3BXSxyFkbzRxXVNyhg== X-Google-Smtp-Source: ABdhPJwlT9fmJjmBuTAPRJF17N+Q0dEahD0ZzA2W/t7wBWskv6aQ5Ol9n5/6rO+apE4ilJkaZpt5pA== X-Received: by 2002:a1c:3d46:: with SMTP id k67mr17760273wma.188.1615751028294; Sun, 14 Mar 2021 12:43:48 -0700 (PDT) Received: from ?IPv6:2003:ea:8f1f:bb00:fc04:867f:ef73:99ed? (p200300ea8f1fbb00fc04867fef7399ed.dip0.t-ipconnect.de. [2003:ea:8f1f:bb00:fc04:867f:ef73:99ed]) by smtp.googlemail.com with ESMTPSA id a8sm10158812wmm.46.2021.03.14.12.43.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Mar 2021 12:43:48 -0700 (PDT) Subject: [PATCH net-next 2/3] iwlwifi: switch "index larger than supported by driver" warning to debug level From: Heiner Kallweit To: Luca Coelho , Kalle Valo , David Miller , Jakub Kicinski Cc: "netdev@vger.kernel.org" , linux-wireless References: <22e63925-1469-2839-e4d3-c10d8658ba82@gmail.com> Message-ID: <693dcf02-16bd-7bec-8cad-bb927c1e899f@gmail.com> Date: Sun, 14 Mar 2021 20:42:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <22e63925-1469-2839-e4d3-c10d8658ba82@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org If a chip supports additional API calls that are not supported by the driver yet, then this is no reason to bother users with a warning. Therefore switch the message to debug level. Signed-off-by: Heiner Kallweit --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index eb168dc53..647f8d003 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -408,9 +408,8 @@ static void iwl_set_ucode_api_flags(struct iwl_drv *drv, const u8 *data, int i; if (api_index >= DIV_ROUND_UP(NUM_IWL_UCODE_TLV_API, 32)) { - IWL_WARN(drv, - "api flags index %d larger than supported by driver\n", - api_index); + IWL_DEBUG_FW_INFO(drv, "api flags index %d larger than supported by driver\n", + api_index); return; } @@ -429,9 +428,8 @@ static void iwl_set_ucode_capabilities(struct iwl_drv *drv, const u8 *data, int i; if (api_index >= DIV_ROUND_UP(NUM_IWL_UCODE_TLV_CAPA, 32)) { - IWL_WARN(drv, - "capa flags index %d larger than supported by driver\n", - api_index); + IWL_DEBUG_FW_INFO(drv, "capa flags index %d larger than supported by driver\n", + api_index); return; } From patchwork Sun Mar 14 19:43:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 12137927 X-Patchwork-Delegate: miriam.rachel.korenblit@intel.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 X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31171C433E9 for ; Sun, 14 Mar 2021 19:44:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1015C64EC3 for ; Sun, 14 Mar 2021 19:44:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233821AbhCNToQ (ORCPT ); Sun, 14 Mar 2021 15:44:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233641AbhCNTnv (ORCPT ); Sun, 14 Mar 2021 15:43:51 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C164C061574; Sun, 14 Mar 2021 12:43:51 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id w203-20020a1c49d40000b029010c706d0642so1410857wma.0; Sun, 14 Mar 2021 12:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sZwayokeza50r+JZ/406W906zpF/PAEcZt2TCtDizn4=; b=qivqOWhHjy5ePOaGgVAlMt8HU2tt9CgqgMshvYwu5MH/fA2hIZQ7QR8Ypwcs3oWqJa szJf5p1cczM+zvTkP/MLm59hnqrov/+Ogl9kQBBQXAMPk/Uq4Lyv1Ng6T7XDyEqxRcd1 guyPV902DYUePxGUuwSNo9NMuPeqJReNpbDlvKElUDlaENHxhBbTFsmKXdTScUC0VnjV wGVLIg0vQ4rjMHrwhrk0MEPRsQXP3GOABYKwAn1/a8NTEGcJ4UiByeKxJbTsAKlswaP0 P2LOqWQxEwQ1nHnM0bH+bAt+6IA8DK2RtQgW/1B/dzU80duAr92fKy2cGzx6yMe8ohba MWcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sZwayokeza50r+JZ/406W906zpF/PAEcZt2TCtDizn4=; b=bsxBce5zMvs0vMLTxR/5MVUL95WnppgRCe4M18+5UsY3ByQLUJuCSdZKlw88zdDhVi lTcBL6A2CRXm9ZMZdRncSbgjKYhXR6j8rF6m2/EqW6YuLKwnX16hPAYUFTAagkuQJRo4 2h6xv7UAvyJFo5MrVsb+M7SFjmAg6unxSdt5CDlgxJh82aIvsquJucvmHD+dCSbVq9pa Wk5wnboEHiWvDeVSh/9IM8VaEbqIpEHnuPs1H0LK3Hr4JPLaOxHgpknT8EbjW97r3P8U ALoZfnubo2s/3iTCX0txacc1Je89PpDV37pikKY0phjOWFRlUagzl0lLI7mj5KbLcMya 9seA== X-Gm-Message-State: AOAM532HoaNZZp2ZEhDP0QjgaOkWQq47aSbTv+TaAnqp7VZlaJkNfPtj okb0LC6bwE76DCQA8OBzYDqgGsskHVcp1Q== X-Google-Smtp-Source: ABdhPJwzbLtgq9RvmSPAkCvx8N3WccZ+V2MPDB1FczL6B0jAHejqqtA3Qr500ythKAwQAe+tIX0CCg== X-Received: by 2002:a1c:6a03:: with SMTP id f3mr17543013wmc.179.1615751029604; Sun, 14 Mar 2021 12:43:49 -0700 (PDT) Received: from ?IPv6:2003:ea:8f1f:bb00:fc04:867f:ef73:99ed? (p200300ea8f1fbb00fc04867fef7399ed.dip0.t-ipconnect.de. [2003:ea:8f1f:bb00:fc04:867f:ef73:99ed]) by smtp.googlemail.com with ESMTPSA id s18sm18505144wrr.27.2021.03.14.12.43.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 14 Mar 2021 12:43:49 -0700 (PDT) Subject: [PATCH net-next 3/3] iwlwifi: use dma_set_mask_and_coherent From: Heiner Kallweit To: Luca Coelho , Kalle Valo , David Miller , Jakub Kicinski Cc: "netdev@vger.kernel.org" , linux-wireless References: <22e63925-1469-2839-e4d3-c10d8658ba82@gmail.com> Message-ID: <26a13b6e-6fa8-6e34-1e08-37c9fd8e398f@gmail.com> Date: Sun, 14 Mar 2021 20:43:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <22e63925-1469-2839-e4d3-c10d8658ba82@gmail.com> Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Simplify the code by using dma_set_mask_and_coherent(). Signed-off-by: Heiner Kallweit --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 1bf4c37fe..4fd391dda 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -3440,15 +3440,9 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, pci_set_master(pdev); addr_size = trans->txqs.tfd.addr_size; - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(addr_size)); - if (!ret) - ret = pci_set_consistent_dma_mask(pdev, - DMA_BIT_MASK(addr_size)); + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(addr_size)); if (ret) { - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - if (!ret) - ret = pci_set_consistent_dma_mask(pdev, - DMA_BIT_MASK(32)); + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); /* both attempts failed: */ if (ret) { dev_err(&pdev->dev, "No suitable DMA available\n");