From patchwork Wed Oct 14 15:32:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 54957 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id 939A220490 for ; Wed, 14 Oct 2015 15:33:12 +0000 (UTC) Received: by wibzt1 with SMTP id zt1sf29477390wib.0 for ; Wed, 14 Oct 2015 08:33:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=UN7nFr2nOglqv7Pqth4oIC5t1hqBKPKZ5E/ZCqwknn4=; b=F4I3TTGWISw//qg6nq8C2UCv46HKrUfqgGrqMZ989Umfg41pNKW4i/V+cTcmNC9NMu jrT4/h0TTXLElCgDPX/lbdDgKwQP9Apgd7sGozTitdg2/e1jfKIeujqz+uAVl21z9S/d M07zVHQnc3goYzY2NawE2zjs3K6hvpgNF4bqIvdPB36M3aGBVC9FQPzdbhakFGVsgJKT 4CQ6t3sN6NYuqv4pAj4RbSdGhgbUMsxscq9Zs20b32KmKpqLB7+lpmWgHBZDKylr8L+m FCsgIpF27gX+d2jya7oEC53vjjktO8hFiPodJHXuYb0VUvw/4PwZdN8YcBk1A8se9mGU 5aZA== X-Gm-Message-State: ALoCoQnJA+9xS0YVAwDfZ1Bf0gAKG//HN4eZIRXGw2F23VNQL04xkLQk3EP9aWuPQgMP2ru6iJqK X-Received: by 10.112.16.229 with SMTP id j5mr937104lbd.6.1444836791838; Wed, 14 Oct 2015 08:33:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.15.147 with SMTP id 19ls56443lfp.5.gmail; Wed, 14 Oct 2015 08:33:11 -0700 (PDT) X-Received: by 10.25.32.131 with SMTP id g125mr1296731lfg.26.1444836791701; Wed, 14 Oct 2015 08:33:11 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id 73si5944128lfs.33.2015.10.14.08.33.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 08:33:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbbpp2 with SMTP id pp2so19992767lbb.0 for ; Wed, 14 Oct 2015 08:33:11 -0700 (PDT) X-Received: by 10.112.129.202 with SMTP id ny10mr1929322lbb.112.1444836791397; Wed, 14 Oct 2015 08:33:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.59.35 with SMTP id w3csp80444lbq; Wed, 14 Oct 2015 08:33:10 -0700 (PDT) X-Received: by 10.194.205.162 with SMTP id lh2mr4751879wjc.61.1444836790751; Wed, 14 Oct 2015 08:33:10 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com. [209.85.212.172]) by mx.google.com with ESMTPS id f12si11334135wjs.18.2015.10.14.08.33.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 08:33:10 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.172 as permitted sender) client-ip=209.85.212.172; Received: by wicgb1 with SMTP id gb1so134727147wic.1 for ; Wed, 14 Oct 2015 08:33:10 -0700 (PDT) X-Received: by 10.180.107.193 with SMTP id he1mr30633343wib.81.1444836787655; Wed, 14 Oct 2015 08:33:07 -0700 (PDT) Received: from new-host-20.home (LMontsouris-657-1-37-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id p18sm7585711wik.19.2015.10.14.08.33.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Oct 2015 08:33:06 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, alex.williamson@redhat.com, b.reynal@virtualopensystems.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: suravee.suthikulpanit@amd.com, thomas.lendacky@amd.com, christoffer.dall@linaro.org, linux-kernel@vger.kernel.org, patches@linaro.org Subject: [PATCH] VFIO: platform: clear IRQ_NOAUTOEN when de-assigning the IRQ Date: Wed, 14 Oct 2015 15:32:56 +0000 Message-Id: <1444836776-2364-1-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The vfio platform driver currently sets the IRQ_NOAUTOEN before doing the request_irq to properly handle the user masking. However it does not clear it when de-assigning the IRQ. This brings issues when loading the native driver again which may not explicitly enable the IRQ. This problem was observed with xgbe driver. Signed-off-by: Eric Auger --- drivers/vfio/platform/vfio_platform_irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vfio/platform/vfio_platform_irq.c b/drivers/vfio/platform/vfio_platform_irq.c index 88bba57..46d4750 100644 --- a/drivers/vfio/platform/vfio_platform_irq.c +++ b/drivers/vfio/platform/vfio_platform_irq.c @@ -185,6 +185,7 @@ static int vfio_set_trigger(struct vfio_platform_device *vdev, int index, int ret; if (irq->trigger) { + irq_clear_status_flags(irq->hwirq, IRQ_NOAUTOEN); free_irq(irq->hwirq, irq); kfree(irq->name); eventfd_ctx_put(irq->trigger);