From patchwork Tue Sep 8 05:19:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 7138421 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5171DBEEC1 for ; Tue, 8 Sep 2015 05:19:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 954842091D for ; Tue, 8 Sep 2015 05:19:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C910320919 for ; Tue, 8 Sep 2015 05:19:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751613AbbIHFTQ (ORCPT ); Tue, 8 Sep 2015 01:19:16 -0400 Received: from mga09.intel.com ([134.134.136.24]:48941 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751094AbbIHFTP (ORCPT ); Tue, 8 Sep 2015 01:19:15 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 07 Sep 2015 22:19:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,487,1437462000"; d="scan'208,223";a="640453853" Received: from jliu23-mobl.ccr.corp.intel.com (HELO [10.238.131.137]) ([10.238.131.137]) by orsmga003.jf.intel.com with ESMTP; 07 Sep 2015 22:19:14 -0700 Subject: Re: eata fails to load on post 4.2 kernels To: Arthur Marsh References: <55EC019F.4010209@internode.on.net> <55EC2567.8000100@internode.on.net> <55ECA291.1060103@internode.on.net> <55ECFF32.9030902@linux.intel.com> <55ED2DFA.6030502@internode.on.net> Cc: Bjorn Helgaas , tglx@linutronix.de, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org From: Jiang Liu Organization: Intel Message-ID: <55EE6FD1.2030600@linux.intel.com> Date: Tue, 8 Sep 2015 13:19:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55ED2DFA.6030502@internode.on.net> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Auhur, Could you please help to apply the test patch against the latest mainstream linux kernel? Thanks! Gerry On 2015/9/7 14:26, Arthur Marsh wrote: > > > Jiang Liu wrote on 07/09/15 12:36: >> On 2015/9/7 4:31, Arthur Marsh wrote: >>> Arthur Marsh wrote on 06/09/15 21:07: >>>> Arthur Marsh wrote on 06/09/15 18:34: >>>>> Arthur Marsh wrote on 06/09/15 15:58: >>>>>> Hi, I'm seeing the following on post 4.2 kernels, am currently >>>>>> bisecting >>>>>> to find where it started: >>>> >>>> First kernel in the bisection that worked without needing irqpoll: >>>> >>>> [ 73.751482] EATA0: IRQ 10 mapped to IO-APIC IRQ 17. >>>> [ 73.776711] EATA/DMA 2.0x: Copyright (C) 1994-2003 Dario Ballabio. >>>> [ 73.802005] EATA config options -> tm:1, lc:y, mq:16, rs:y, et:n, >>>> ip:n, ep:n, pp:y. >>>> [ 73.829175] EATA0: 2.0C, PCI 0xd890, IRQ 17, BMST, SG 122, MB 64. >>>> [ 73.855552] EATA0: wide SCSI support enabled, max_id 16, max_lun 8. >>>> [ 73.881125] EATA0: SCSI channel 0 enabled, host target ID 7. >>> >>> After a git bisect, I get: >>> >>> git bisect good >>> 991de2e59090e55c65a7f59a049142e3c480f7bd is the first bad commit >>> commit 991de2e59090e55c65a7f59a049142e3c480f7bd >>> Author: Jiang Liu >>> Date: Wed Jun 10 16:54:59 2015 +0800 >>> >>> PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq() >>> >>> To support IOAPIC hotplug, we need to allocate PCI IRQ resources on >>> demand >>> and free them when not used anymore. >>> >>> Implement pcibios_alloc_irq() and pcibios_free_irq() to dynamically >>> allocate and free PCI IRQs. >>> >>> Remove mp_should_keep_irq(), which is no longer used. >>> >>> [bhelgaas: changelog] >>> Signed-off-by: Jiang Liu >>> Signed-off-by: Bjorn Helgaas >>> Acked-by: Thomas Gleixner >>> >>> :040000 040000 765e2d5232d53247ec260b34b51589c3bccb36ae >>> f680234a27685e94b1a35ae2a7218f8eafa9071a M arch >>> :040000 040000 d55a682bcde72682e883365e88ad1df6186fd54d >>> f82c470a04a6845fcf5e0aa934512c75628f798d M drivers >>> >>> I'm happy to supply more details if needed. >> Hi Arthur, >> Thanks for reporting this. It seems to be an irq misrouting >> issue. Could you please help to provide: >> 1) full dmesg with the latest code >> 2) full dmesg and /proc/interrupts with the latest code and >> kernel parameter "irqpoll" specified >> Thanks! >> Gerry > > The pc locks up when loading the eata module so I've attached a photo of > the monitor screen. > > Arthur. > > From 3085626fb2e677c1d88f158397948935b73f5239 Mon Sep 17 00:00:00 2001 From: Jiang Liu Date: Tue, 8 Sep 2015 10:41:19 +0800 Subject: [PATCH] Signed-off-by: Jiang Liu --- drivers/pci/pci-driver.c | 1 + drivers/scsi/eata.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 52a880ca1768..17d2a0b1de18 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -392,6 +392,7 @@ int __weak pcibios_alloc_irq(struct pci_dev *dev) { return 0; } +EXPORT_SYMBOL_GPL(pcibios_alloc_irq); void __weak pcibios_free_irq(struct pci_dev *dev) { diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 227dd2c2ec2f..7e6eaf867987 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c @@ -1061,6 +1061,7 @@ static void enable_pci_ports(void) driver_name, dev->bus->number, dev->devfn); #endif + pcibios_alloc_irq(dev); if (pci_enable_device(dev)) printk ("%s: warning, pci_enable_device failed, bus %d devfn 0x%x.\n", @@ -1520,6 +1521,7 @@ static void add_pci_ports(void) if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) break; + pcibios_alloc_irq(dev); if (pci_enable_device(dev)) { #if defined(DEBUG_PCI_DETECT) printk -- 1.7.10.4