Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1826634imm; Mon, 3 Sep 2018 10:26:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZC3skofByjZysmD21JV9x2RaYStWFmJeZ2bEmciL/z5b6nejiHBMqqnj6x1zVI/kn5jmSV X-Received: by 2002:a63:1c1b:: with SMTP id c27-v6mr28047184pgc.48.1535995590436; Mon, 03 Sep 2018 10:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995590; cv=none; d=google.com; s=arc-20160816; b=ryoZ3NrfHRjZJUEyz2ziV/gQQq8STyR7OJWQM1l2CSdHiWJ+eQxfpy3BFsCaNmirNs 2ytNe7OK5sIa2xxDfwYOoqdIKDQtlwUbexkSjgt2u/Zh7/ZziEAfKQozWRxe4dm6y+IN ip+rxjGSvDF9z9+ZYRaDYOO2MjbGY7mbABd+VyH/DE514qGEh+qafN0s+4/B+l5+NPPy kmpufLUN/f1/hj0HBDQJzizeFM9cQHZqBXBa1jl3RWGclL8RuvqiXo+q54cBhZk42o6c UsOk39t9G3XESbAZAoNupWy1oAIClYK8yBCuqLQu429WKQUqkb5/GRlXxBBa/IXvcX40 IhLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization :content-disposition:mime-version:message-id:subject:to:from:date :arc-authentication-results; bh=Ei3wJmF4ql/vf7AtwJUKjyVxyDpKQqtIRKiD53AZ0Zk=; b=k3SxBKLNs7TPTmje0uW3+O6JNGgwMHAaiUiUrChK5bxJjUPJ/mgmE2uhcudAIajcAc emRsDPg5tFrrJbx+XdzNNvAwPgm+IfheyOqxQDVhJFOxDxqEgYETsofn0+TzDvDKPdQJ ZxlfXdUgSVg0YlRRHJVVpugxURu5yQJldQAJ3K0wX1As3SCRFySmzYSjKAGFMrya3QZW S8KaLRSHq/CInF1b/T4gcn2I6+oaqy1X0t9G4L8cEPR0PKm90y4MPDz95/Hw4j8+uVU+ IuSLfV5o5MhxlSKGSmnYd/e8fZW2dUXD1y4Fms2EoFdTvArHlKQ+v6gDhg3QNMRVCqHv 9JGg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 44-v6si18810867plc.409.2018.09.03.10.26.15; Mon, 03 Sep 2018 10:26:30 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730280AbeICVo2 (ORCPT + 99 others); Mon, 3 Sep 2018 17:44:28 -0400 Received: from cust-95-128-94-82.breedbanddelft.nl ([95.128.94.82]:50292 "EHLO cust-95-128-94-82.breedbanddelft.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728357AbeICVo2 (ORCPT ); Mon, 3 Sep 2018 17:44:28 -0400 X-Greylist: delayed 403 seconds by postgrey-1.27 at vger.kernel.org; Mon, 03 Sep 2018 17:44:27 EDT Received: by abra2.bitwizard.nl (Postfix, from userid 1000) id 6AEB513FCFC; Mon, 3 Sep 2018 19:16:39 +0200 (CEST) Date: Mon, 3 Sep 2018 19:16:39 +0200 From: Rogier Wolff To: linux-kernel@vger.kernel.org Subject: IRQ number question. Message-ID: <20180903171639.GC16262@BitWizard.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: BitWizard B.V. User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I'm writing a kernel driver. It is not going to be widely used, so I'm not motivated to make things nice enough for inclusion in the standard kernel. But lspci shows my device: 03:01.0 Serial bus controller [0c80]: Phoenix Contact GmbH & Co. Device 0002 (rev b7) Flags: bus master, stepping, medium devsel, latency 32, IRQ 14 I/O ports at e070 [size=16] Memory at f7d00000 (32-bit, non-prefetchable) [size=256K] Now when I start my module and prod the device a bit, it will generate an interrupt. (in this case the monitor program needs to start sending messages to the card.) Then the kernel reports: irq 18: nobody cared (try booting with the "irqpoll" option) I've been writing device drivers in the past, but in the past when the lspci listed "IRQ 14" then I'd have to request_irq (14, ... Has this changed? Or is this hardware "odd"/"bad"/"broken" in that it initializes the PCI devices wrong? (*) My driver now works with the interrupts coming in nicely on IRQ18... I have this card where I'm writing my own driver, and another PCI card that uses an "included-in-the-kernel" driver, and it too behaves as if it doesn't get any interrupts. Roger. (*) Obviously according to everybody "windows works", so could it be that modern windows simply activates an irq and polls to see what driver handles it? Or something like that? Ah! That would be somewhat similar to what "irqpoll" does on Linux! -- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work.