From patchwork Mon Feb 18 10:09:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 2156721 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 5B0CD3FDF1 for ; Mon, 18 Feb 2013 10:09:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756868Ab3BRKJ5 (ORCPT ); Mon, 18 Feb 2013 05:09:57 -0500 Received: from cantor2.suse.de ([195.135.220.15]:47432 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756755Ab3BRKJ4 (ORCPT ); Mon, 18 Feb 2013 05:09:56 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4CB87A3A78; Mon, 18 Feb 2013 11:09:55 +0100 (CET) From: Hannes Reinecke To: linux-kernel@vger.kernel.org Cc: Hannes Reinecke , Frederik Himpe , Oliver Neukum , David Haerdeman , linux-usb@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH] pci: do not try to assign irq 255 Date: Mon, 18 Feb 2013 11:09:53 +0100 Message-Id: <1361182193-31894-1-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.7.4.2 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The PCI config space reseves a byte for the interrupt line, so irq 255 actually refers to 'not set'. However, the 'irq' field for struct pci_dev is an integer, so the original meaning is lost, causing the system to assign an interrupt '255', which fails. So we should _not_ assign an interrupt value here, and allow upper layers to fixup things. This patch make PCI devices with MSI interrupts only (like the xhci device on certain HP laptops) work properly. Cc: Frederik Himpe Cc: Oliver Neukum Cc: David Haerdeman Cc: linux-usb@vger.kernel.org Cc: linux-pci@vger.kernel.org Signed-off-by: Hannes Reinecke Tested-by: David Härdeman --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 6186f03..a2db887f 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -923,7 +923,8 @@ static void pci_read_irq(struct pci_dev *dev) dev->pin = irq; if (irq) pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); - dev->irq = irq; + if (irq < 255) + dev->irq = irq; } void set_pcie_port_type(struct pci_dev *pdev)