Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4626870ybf; Wed, 4 Mar 2020 07:35:24 -0800 (PST) X-Google-Smtp-Source: ADFU+vsx+LmKogEfVQ+umQfU3W1jn21z5n4PNZ/0Oo/fHsq0syQHvmFtDc8IgcuJzHOyFz/qDnmk X-Received: by 2002:a05:6830:160c:: with SMTP id g12mr2256845otr.86.1583336124168; Wed, 04 Mar 2020 07:35:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583336124; cv=none; d=google.com; s=arc-20160816; b=IfzTkMURNwUPkAXMszD9wuTL4GJDpRobxjnyUVZGe+gxla/PTklO36/PDNGifA+EgN adgLRm1GUIeyqreVUdk+nJQjVgXhMtp3wikiLzoPM3fgxTDiAz1K0szfWj+zFawyhzz6 d4CVIjq/XFodH2NdRvp8KGYB24IXbfRGJeHJ4sUUkTOV3Mfnr65RF5RP78Cz4iIOaVzm nfsu7iKPsIt637QA7XP2qoRf9pDUxwIbtRU26wxEuldloXIXL0LZJ5rClFbk5GhSC07D Evq5S13NcaXpjIaJaJFd2LR2Rktrw148R6UZLZIDFy9dy+DOaGmkV1oVhK7bgdfGlOCv I49Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RGyEJuI0kAg2tW9pvbpX/sZCZp/ZoM/v+2tyXfY92H0=; b=Zc1GD9ZVoF1/iNP90yxQBTlZtLkojbIAK+E9zd1YaMfDoTR0k1LI0cRY0bu7Gl2ei1 LDmY46n2soteIGGkiZcard/D4LqB7Nio2SWTIsyeqkGk0LKya2iMGBnFgX7FJA4deavO LPujV7Jma4NnW0idw5Acvpu29OXm0tb4xwLgO4nnUkr+hzppoBQYBIVCIj/65WM88mXH SQcT7xur5whUcyiRtJyM74i9GF7fkvjUUxR8+FW0KCTOHWrv0GgC1NhB98RMzrE2DToQ yUW/beUPkAB8JyeAX+zYZAg0NF94sZG7lZipgw5pyu8PxrCUhd5cRTnaC4qD5YTHKOrF SN+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QRNx0e+9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si1398217otd.134.2020.03.04.07.35.09; Wed, 04 Mar 2020 07:35:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QRNx0e+9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387505AbgCDPe7 (ORCPT + 99 others); Wed, 4 Mar 2020 10:34:59 -0500 Received: from mail-vs1-f65.google.com ([209.85.217.65]:44934 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729386AbgCDPe6 (ORCPT ); Wed, 4 Mar 2020 10:34:58 -0500 Received: by mail-vs1-f65.google.com with SMTP id u24so1396860vso.11 for ; Wed, 04 Mar 2020 07:34:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RGyEJuI0kAg2tW9pvbpX/sZCZp/ZoM/v+2tyXfY92H0=; b=QRNx0e+96HXnLEsiEzLvRaxIhEp8noyfUSKTqykgBn4K80pcOPttmsH1jwCIujaUDY a/51nZiu/41ENr9DIlhcbzxHxtD9as5ilUaUl47nhn/4Nt9JuZUfZ8aQwuZLek8ugSa6 +7Fz2L6YYgOqLI9IiRijovjoVgJkyIc/FHHHl+p/v8jjFTSdq3fO7rmsc1hseLYYiO62 b117TL6aTtnXoxhBk5c6ZprMPRyBuD85M45tLny7zNshwWAXokRAeMsLCoi8Tyg5A45g eedaNpwMqRxoYgw7gqyss9Lo76pKi7tlDbFl/GYFaEiBKE83NiULD8PalVTKbZTEiyXR Q/qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RGyEJuI0kAg2tW9pvbpX/sZCZp/ZoM/v+2tyXfY92H0=; b=Ss0fjHPmdNls4eDusk6GnPV4fALlWYiwOPvy2vIYvymSnhMiR/ivHgawgEGraAaqUT s4peaWQxQC4KbRNYH9VLGeDufCwkx2F5QsnMM5LMZouOGbd8dUWX2mgKfyP9bOZFWPYo 0O6XjKT+OXcsVtDQs+E9UnwhohculodPzGfG6qHiGx9RHPI0mseEGtTwQMvNFEH0YI/x ImYZert3LIz0y4dHvioLb6cWUuU6r1EBs+66bnq/ZGMpDub947+r0QlsuSV9Xyn4UWVG qf/Z+iCgDfhxWSC1aXR0Imn23Ie6XR7q9FK6Ucr9Bqim+iAxP424zmjHgh9Hx6O+5u86 XVLw== X-Gm-Message-State: ANhLgQ2p1OTey/5KufaJDdQ/f4kYzDyXZyjmDecgcIzTngSHeD+gpfPh NZ6BcFQxc0X4OSe0/7ZUvx4PBW33BuUc5iEujeOs3A== X-Received: by 2002:a67:7fd0:: with SMTP id a199mr2128947vsd.200.1583336097623; Wed, 04 Mar 2020 07:34:57 -0800 (PST) MIME-Version: 1.0 References: <20200219092900.9151-1-benchuanggli@gmail.com> In-Reply-To: <20200219092900.9151-1-benchuanggli@gmail.com> From: Ulf Hansson Date: Wed, 4 Mar 2020 16:34:21 +0100 Message-ID: Subject: Re: [PATCH] mmc: sdhci-pci-gli: Enable MSI interrupt for GL975x To: Ben Chuang Cc: Adrian Hunter , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List , Ben Chuang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Feb 2020 at 10:29, Ben Chuang wrote: > > From: Ben Chuang > > Enable MSI interrupt for GL9750/GL9755. Some platforms > do not support PCI INTx and devices can not work without > interrupt. Like messages below: > > [ 4.487132] sdhci-pci 0000:01:00.0: SDHCI controller found [17a0:9755] (rev 0) > [ 4.487198] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.PBR2._PRT.APS2], AE_NOT_FOUND (20190816/psargs-330) > [ 4.487397] ACPI Error: Aborting method \_SB.PCI0.PBR2._PRT due to previous error (AE_NOT_FOUND) (20190816/psparse-529) > [ 4.487707] pcieport 0000:00:01.3: can't derive routing for PCI INT A > [ 4.487709] sdhci-pci 0000:01:00.0: PCI INT A: no GSI > > Signed-off-by: Ben Chuang Applied for fixes and by adding a stable tag, thanks! Kind regards Uffe > --- > drivers/mmc/host/sdhci-pci-gli.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-pci-gli.c b/drivers/mmc/host/sdhci-pci-gli.c > index 5eea8d70a85d..ce15a05f23d4 100644 > --- a/drivers/mmc/host/sdhci-pci-gli.c > +++ b/drivers/mmc/host/sdhci-pci-gli.c > @@ -262,10 +262,26 @@ static int gl9750_execute_tuning(struct sdhci_host *host, u32 opcode) > return 0; > } > > +static void gli_pcie_enable_msi(struct sdhci_pci_slot *slot) > +{ > + int ret; > + > + ret = pci_alloc_irq_vectors(slot->chip->pdev, 1, 1, > + PCI_IRQ_MSI | PCI_IRQ_MSIX); > + if (ret < 0) { > + pr_warn("%s: enable PCI MSI failed, error=%d\n", > + mmc_hostname(slot->host->mmc), ret); > + return; > + } > + > + slot->host->irq = pci_irq_vector(slot->chip->pdev, 0); > +} > + > static int gli_probe_slot_gl9750(struct sdhci_pci_slot *slot) > { > struct sdhci_host *host = slot->host; > > + gli_pcie_enable_msi(slot); > slot->host->mmc->caps2 |= MMC_CAP2_NO_SDIO; > sdhci_enable_v4_mode(host); > > @@ -276,6 +292,7 @@ static int gli_probe_slot_gl9755(struct sdhci_pci_slot *slot) > { > struct sdhci_host *host = slot->host; > > + gli_pcie_enable_msi(slot); > slot->host->mmc->caps2 |= MMC_CAP2_NO_SDIO; > sdhci_enable_v4_mode(host); > > -- > 2.25.0 >