From patchwork Thu Aug 8 04:57:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis Efremov (Oracle)" X-Patchwork-Id: 11083131 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7F021398 for ; Thu, 8 Aug 2019 04:58:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 967602873D for ; Thu, 8 Aug 2019 04:58:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 889C32878F; Thu, 8 Aug 2019 04:58:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D4882873D for ; Thu, 8 Aug 2019 04:58:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726187AbfHHE6E (ORCPT ); Thu, 8 Aug 2019 00:58:04 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:55006 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbfHHE6E (ORCPT ); Thu, 8 Aug 2019 00:58:04 -0400 Received: by mail-wm1-f68.google.com with SMTP id p74so988240wme.4; Wed, 07 Aug 2019 21:58:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Q7D/8BznaDXMUKeNwuiimCqxMs4M4U8z2oe/6Zp1LH0=; b=QRz6meNnUgB1d68hz4Y0uHhl2sc9Lil/A6oHvm/LlDvt5vmfju0IUgGZVfQVVeXTOn YwOggKYCXh2e9wvVL2y1IJdlMbUtYmPOuzxMADhLNuC/D1gN0IQZDBKv563Nhx2TuwSH FKsNcGQVT+E8R0XTsx/TXjbYLJx4dZoS6wlSSHko92DnmlVJwFOCDJrkk8kA1mGq0gny t36kMtEoEZIBxtnXlsyv/yH0PBUn/mJdAymAldrZn3Je2zXp/Hp5fQVqhfk9infMIT0R T36ePaWFEco5ENVQlfRSACgnCiNvmbeCbxFUFQZoJDMPFqT5Ol8X6RlS/M9hOAy59Qnh HF+w== X-Gm-Message-State: APjAAAUtHwGGjMGHrZ7mNiC9CDAiDy28FlfWP7gsOGpikMvB86Hz/iO8 H0khtR0Up+3l4dUY887ptqU= X-Google-Smtp-Source: APXvYqxouo6xkD/Ka8KpoCVDtmIK16o8FHZU0T4FDxQSAnEw7PlKO9Sge9gjs2gBwXn8UQ+e4dHxHA== X-Received: by 2002:a1c:751a:: with SMTP id o26mr1727442wmc.13.1565240282122; Wed, 07 Aug 2019 21:58:02 -0700 (PDT) Received: from localhost.localdomain (broadband-188-32-48-208.ip.moscow.rt.ru. [188.32.48.208]) by smtp.googlemail.com with ESMTPSA id 32sm87082644wrh.76.2019.08.07.21.58.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Aug 2019 21:58:01 -0700 (PDT) From: Denis Efremov To: Bjorn Helgaas Cc: Denis Efremov , Derek Chickles , Satanand Burla , Felix Manlunas , netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] liquidio: Use pcie_flr() instead of reimplementing it Date: Thu, 8 Aug 2019 07:57:53 +0300 Message-Id: <20190808045753.5474-1-efremov@linux.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP octeon_mbox_process_cmd() directly writes the PCI_EXP_DEVCTL_BCR_FLR bit, which bypasses timing requirements imposed by the PCIe spec. This patch fixes the function to use the pcie_flr() interface instead. Signed-off-by: Denis Efremov Reviewed-by: Andrew Murray Reviewed-by: Bjorn Helgaas --- drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c index 021d99cd1665..614d07be7181 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c +++ b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c @@ -260,9 +260,7 @@ static int octeon_mbox_process_cmd(struct octeon_mbox *mbox, dev_info(&oct->pci_dev->dev, "got a request for FLR from VF that owns DPI ring %u\n", mbox->q_no); - pcie_capability_set_word( - oct->sriov_info.dpiring_to_vfpcidev_lut[mbox->q_no], - PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_BCR_FLR); + pcie_flr(oct->sriov_info.dpiring_to_vfpcidev_lut[mbox->q_no]); break; case OCTEON_PF_CHANGED_VF_MACADDR: