From patchwork Thu Mar 6 20:11:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Gordeev X-Patchwork-Id: 327569 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 854CB2C009F for ; Fri, 7 Mar 2014 07:10:50 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207AbaCFUJp (ORCPT ); Thu, 6 Mar 2014 15:09:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21247 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752612AbaCFUJo (ORCPT ); Thu, 6 Mar 2014 15:09:44 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s26K9eiH028570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Mar 2014 15:09:41 -0500 Received: from dhcp-26-207.brq.redhat.com (vpn-48-239.rdu2.redhat.com [10.10.48.239]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s26K9Uwj023357; Thu, 6 Mar 2014 15:09:38 -0500 From: Alexander Gordeev To: linux-kernel@vger.kernel.org Cc: Alexander Gordeev , Sarah Sharp , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v2 RESEND 4/4] xhci: Use pci_enable_msix_exact() instead of pci_enable_msix() Date: Thu, 6 Mar 2014 21:11:24 +0100 Message-Id: <606a52afdccf627b6273379b21daffc460b9559a.1394128952.git.agordeev@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org As result of deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() or pci_enable_msi_exact() and pci_enable_msix_range() or pci_enable_msix_exact() interfaces. This update also cleans up a bit xhci_setup_msi() and xhci_setup_msix() returning of success. Signed-off-by: Alexander Gordeev Cc: Sarah Sharp Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: linux-pci@vger.kernel.org --- drivers/usb/host/xhci.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 6fe577d..dc7cfb5 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -232,9 +232,10 @@ static int xhci_setup_msi(struct xhci_hcd *xhci) xhci_dbg_trace(xhci, trace_xhci_dbg_init, "disable MSI interrupt"); pci_disable_msi(pdev); + return ret; } - return ret; + return 0; } /* @@ -291,7 +292,7 @@ static int xhci_setup_msix(struct xhci_hcd *xhci) xhci->msix_entries[i].vector = 0; } - ret = pci_enable_msix(pdev, xhci->msix_entries, xhci->msix_count); + ret = pci_enable_msix_exact(pdev, xhci->msix_entries, xhci->msix_count); if (ret) { xhci_dbg_trace(xhci, trace_xhci_dbg_init, "Failed to enable MSI-X"); @@ -307,7 +308,7 @@ static int xhci_setup_msix(struct xhci_hcd *xhci) } hcd->msix_enabled = 1; - return ret; + return 0; disable_msix: xhci_dbg_trace(xhci, trace_xhci_dbg_init, "disable MSI-X interrupt");