From patchwork Mon Apr 13 13:09:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 1269811 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=M50oA/cK; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49189Q2SNKz9sQx for ; Mon, 13 Apr 2020 23:10:02 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729763AbgDMNJ5 (ORCPT ); Mon, 13 Apr 2020 09:09:57 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:25116 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729762AbgDMNJ5 (ORCPT ); Mon, 13 Apr 2020 09:09:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586783395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sJD8oGD7PYCy/FWovcDdMiLIk0TuWYP2CDrm3wgFKwY=; b=M50oA/cKRPRtcpDdbrT/6P8H8D46eWD1F/Dj4ayCXzGwyD+aqCzGd6gt0tpYfCIJgSiPSJ Xvra7Ut2kvsq84auNd1FxI538DVc/7i8yn1908eFTPOQtJclAO+OSGFgwPSGx80zwBrpHc iguy5a4ljKDoagtfResuXSaKJH7q110= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-484-DEwraSvuOcaIYwYW7ApPkQ-1; Mon, 13 Apr 2020 09:09:54 -0400 X-MC-Unique: DEwraSvuOcaIYwYW7ApPkQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CB4FC8017F3; Mon, 13 Apr 2020 13:09:52 +0000 (UTC) Received: from x1.localdomain.com (ovpn-113-27.ams2.redhat.com [10.36.113.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74D3760BE1; Mon, 13 Apr 2020 13:09:51 +0000 (UTC) From: Hans de Goede To: "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas Cc: Hans de Goede , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v2] ACPI/PCI: pci_link: use extended_irq union member when setting ext-irq shareable Date: Mon, 13 Apr 2020 15:09:49 +0200 Message-Id: <20200413130949.302829-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The case ACPI_RESOURCE_TYPE_EXTENDED_IRQ inside acpi_pci_link_set() is correctly using resource->res.data.extended_irq.foo for most settings, but for the shareable setting it so far has accidentally been using resource->res.data.irq.shareable instead of resource->res.data.extended_irq.shareable. Note that the old code happens to also work because the shareable field offset is the same for both the acpi_resource_irq and acpi_resource_extended_irq structs. Acked-by: Bjorn Helgaas Signed-off-by: Hans de Goede --- Changes in v2: - Fix some spelling errors in the commit message pointed out by Bjorn - Add Bjorn's Acked-by --- drivers/acpi/pci_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 00a6da2121be..ed3d2182cf2c 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -322,10 +322,10 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) resource->res.data.extended_irq.polarity = link->irq.polarity; if (link->irq.triggering == ACPI_EDGE_SENSITIVE) - resource->res.data.irq.shareable = + resource->res.data.extended_irq.shareable = ACPI_EXCLUSIVE; else - resource->res.data.irq.shareable = ACPI_SHARED; + resource->res.data.extended_irq.shareable = ACPI_SHARED; resource->res.data.extended_irq.interrupt_count = 1; resource->res.data.extended_irq.interrupts[0] = irq; /* ignore resource_source, it's optional */