From patchwork Mon Apr 4 19:12:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 685321 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p34JCgId014665 for ; Mon, 4 Apr 2011 19:12:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755150Ab1DDTMl (ORCPT ); Mon, 4 Apr 2011 15:12:41 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:50734 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754862Ab1DDTMl (ORCPT ); Mon, 4 Apr 2011 15:12:41 -0400 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p34JCLuF022879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 4 Apr 2011 19:12:23 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p34JCKAO032380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Apr 2011 19:12:21 GMT Received: from abhmt014.oracle.com (abhmt014.oracle.com [141.146.116.23]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p34JCIdb015733; Mon, 4 Apr 2011 14:12:19 -0500 Received: from linux-siqj.site (/129.146.52.205) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Apr 2011 12:12:18 -0700 Message-ID: <4D9A1804.3070708@kernel.org> Date: Mon, 04 Apr 2011 12:12:04 -0700 From: Yinghai Lu User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110221 SUSE/3.1.8 Thunderbird/3.1.8 MIME-Version: 1.0 To: Bjorn Helgaas , Eugene Kanter CC: Stefan Richter , linux1394-user@lists.sourceforge.net, linux-pci@vger.kernel.org, Ram Pai Subject: Re: is this TI firewire express card supported? References: <84911301778082@web25.yandex.ru> In-Reply-To: X-Source-IP: acsmt356.oracle.com [141.146.40.156] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4D9A1815.0119,ss=1,fgs=0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 04 Apr 2011 19:12:43 +0000 (UTC) On 04/04/2011 07:58 AM, Bjorn Helgaas wrote: > I think your ExpressCard contains two devices: the Express-to-PCI bridge and > the 1394 controller itself, which is behind the bridge. When you plug it in, > we discover the devices: > > [ 501.714858] pci 0000:02:00.0: PCI bridge to [bus 03-ff] > [ 501.714942] pci 0000:02:00.0: bridge window [io > 0x0000-0x0000] (disabled) > [ 501.715065] pci 0000:02:00.0: bridge window [mem > 0x00000000-0x000fffff] (disabled) > [ 501.715176] pci 0000:02:00.0: bridge window [mem > 0x00000000-0x000fffff pref] (disabled) > [ 501.713371] pci 0000:03:00.0: reg 10: [mem 0x00000000-0x000007ff] > [ 501.713473] pci 0000:03:00.0: reg 14: [mem 0x00000000-0x00003fff] > > Then we attempt to assign resources to them. The Express-to-PCI bridge is on > bus 02, so we need space there, but the BIOS didn't assign anything for bus 02: > > [ 0.137841] pci 0000:00:05.0: PCI bridge to [bus 02-04] > [ 0.137934] pci 0000:00:05.0: bridge window [io > 0x0000-0x0000] (disabled) > [ 0.137939] pci 0000:00:05.0: bridge window [mem > 0x00000000-0x000fffff] (disabled) > [ 0.137944] pci 0000:00:05.0: bridge window [mem > 0xfff00000-0x000fffff pref] (disabled) > > Theoretically, we could reassign the 00:05.0 windows to make space on bus 02, > then open a 02:00.0 window, then assign the 03:00.0 resources. But I don't > think Linux is smart enough to do this yet. looks there is some bios problem, it does not allocate anything to bridge 00:05.0 current mainline kernel will at least try to update the pci bridge for downstream pcie devices with pciehp. wonder if following patch could help cardbus. also looks like we need to do some change in setup-bus.c Thanks Yinghai --- 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/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c index 9a58862..41026d1 100644 --- a/drivers/pcmcia/cardbus.c +++ b/drivers/pcmcia/cardbus.c @@ -66,7 +66,8 @@ static void cardbus_config_irq_and_cls(struct pci_bus *bus, int irq) */ int __ref cb_alloc(struct pcmcia_socket *s) { - struct pci_bus *bus = s->cb_dev->subordinate; + struct pci_dev *bridge = s->cb_dev; + struct pci_bus *bus = bridge->subordinate; struct pci_dev *dev; unsigned int max, pass; @@ -83,15 +84,13 @@ int __ref cb_alloc(struct pcmcia_socket *s) /* * Size all resources below the CardBus controller. */ - pci_bus_size_bridges(bus); - pci_bus_assign_resources(bus); + pci_assign_unassigned_bridge_resources(bridge); cardbus_config_irq_and_cls(bus, s->pci_irq); /* socket specific tune function */ if (s->tune_bridge) s->tune_bridge(s, bus); - pci_enable_bridges(bus); pci_bus_add_devices(bus); return 0;