Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754484AbbHFEZG (ORCPT ); Thu, 6 Aug 2015 00:25:06 -0400 Received: from mail-ig0-f179.google.com ([209.85.213.179]:33144 "EHLO mail-ig0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbbHFEZE (ORCPT ); Thu, 6 Aug 2015 00:25:04 -0400 MIME-Version: 1.0 In-Reply-To: <55C2C4F4.1040600@roeck-us.net> References: <1438308908-12259-1-git-send-email-linux@roeck-us.net> <55C2C4F4.1040600@roeck-us.net> Date: Wed, 5 Aug 2015 21:25:03 -0700 X-Google-Sender-Auth: gHrFrCcvNqUV2qvzKxfa2-oSj_w Message-ID: Subject: Re: [PATCH v3] PCI: Only enable IO window if supported From: Yinghai Lu To: Guenter Roeck Cc: Bjorn Helgaas , "linux-pci@vger.kernel.org" , Linux Kernel Mailing List , Lorenzo Pieralisi Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1917 Lines: 55 On Wed, Aug 5, 2015 at 7:22 PM, Guenter Roeck wrote: > On 08/05/2015 06:38 PM, Yinghai Lu wrote: >> >> On Wed, Aug 5, 2015 at 6:14 PM, Yinghai Lu wrote: >>> >>> >>> It only can avoid warning with bridge, and still have warning on >>> devices under the bridge. >>> >>> also would have problem on transparent bridges, like >>> >>> BRIDGE_A ---- BRIDGE_AA----DEVICE_AA >>> | >>> \-- BRIDGE_AB ---DEVICE_AB >>> >>> if only BRIDGE_A and BRIDGE_AA are transparent, and BRIDGE_AB is not. >>> >>> and if pci_bridge_supports_io() return false for BRIDGE_A. >>> >>> We will have all three bridges have PCI_BUS_FLAGS_SUPPORTS_IO cleared. >>> so all will not been sized and will not get assigned io port resource. >>> >>> later DEVICE_AA could root bus io port as parent, and get io resource >>> assigned. >>> but DEVICE_AB will not get assigned. >>> >>> so we should get rid of pci_bridge_supports_io(), and just check root >>> resource IO port. >> >> >> I would suggest this version instead: >> >> Subject: [PATCH] PCI: Only try to assign io port only if root bus support >> that >> > > Bjorn had asked me to move the IO support check out of > pci_bridge_check_ranges(). > It looks like you want to keep it there. > > Can you explain your reasons ? Sorry, I just don't understand. in pci_alloc_child_bus(), child bus's bus_flags will be assigned with parent's bus_flags. so if one parent bus has bridge's io bar can not changed, then all children bus will also have same bus_flags, and their bridge io bar will not used. then if BRIDGE_AB is not transparent, we do need to use it's bridge io bar. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/