From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145AbbJHDKO (ORCPT ); Wed, 7 Oct 2015 23:10:14 -0400 Received: from mga14.intel.com ([192.55.52.115]:2329 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908AbbJHDKM (ORCPT ); Wed, 7 Oct 2015 23:10:12 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,652,1437462000"; d="scan'208";a="660053158" Subject: Re: [Bugfix v4 1/2] eata: Convert eata driver as normal PCI and platform device drivers To: James Bottomley , Thomas Gleixner , Bjorn Helgaas , Arthur Marsh , Hannes Reinecke , Dario , Christoph Hellwig References: <1444272675-14631-1-git-send-email-jiang.liu@linux.intel.com> Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, x86@kernel.org From: Jiang Liu Organization: Intel Message-ID: <5615DE90.4090203@linux.intel.com> Date: Thu, 8 Oct 2015 11:10:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1444272675-14631-1-git-send-email-jiang.liu@linux.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/10/8 10:51, Jiang Liu wrote: > Previously the eata driver just grabs and accesses eata PCI devices > without implementing a PCI device driver, that causes troubles with > latest IRQ related > > Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()") changes the way to allocate PCI legacy IRQ > for PCI devices on x86 platforms. Instead of allocating PCI legacy > IRQs when pcibios_enable_device() gets called, now pcibios_alloc_irq() > will be called by pci_device_probe() to allocate PCI legacy IRQs > when binding PCI drivers to PCI devices. > > But the eata driver directly accesses PCI devices without implementing > corresponding PCI drivers, so pcibios_alloc_irq() won't be called for > those PCI devices and wrong IRQ number may be used to manage the PCI > device. > > This patch implements a PCI device driver to manage eata PCI devices, > so eata driver could properly cooperate with the PCI core. It also > provides headroom for PCI hotplug with eata driver. > > It also represents non-PCI eata devices as platform devices, so it could > be managed as normal devices. > Hi all, Sorry, should add: Reported-and-tested-by: Arthur Marsh > Signed-off-by: Jiang Liu > Cc: Hannes Reinecke > Cc: Ballabio, Dario > Cc: Christoph Hellwig > ---