On Fri, 2014-08-22 at 14:00 -0500, Aaron Sierra wrote: > ----- Original Message ----- > > From: "Scott Wood" <scottw...@freescale.com> > > To: "Aaron Sierra" <asie...@xes-inc.com> > > Cc: linuxppc-dev@lists.ozlabs.org, "Minghuan Lian" > > <minghuan.l...@freescale.com> > > Sent: Friday, August 22, 2014 1:36:31 PM > > Subject: Re: [PATCH] powerpc: fsl_pci: Fix PCI/PCI-X regression > > > > On Fri, 2014-08-22 at 12:54 -0500, Aaron Sierra wrote: > > > ----- Original Message ----- > > > > From: "Scott Wood" <scottw...@freescale.com> > > > > Sent: Thursday, August 21, 2014 5:01:46 PM > > > > > > > > On Thu, 2014-08-21 at 16:54 -0500, Aaron Sierra wrote: > > > > > ----- Original Message ----- > > > > > > From: "Scott Wood" <scottw...@freescale.com> > > > > > > Sent: Thursday, August 21, 2014 4:19:56 PM > > > > > > > > > > > > Why wouldn't a normal PCI agent be able to bus master? > > > > > > > > > > > > -Scott > > > > > > > > > > > > > > > > Short answer: > > > > > > > > > > Simply because the hardware strapping for Host/Agent determines the > > > > > default state of the Bus Master bit in the Command register. Without > > > > > that bit being set, an Agent won't be able to send the PCI cycles > > > > > necessary to enumerate the bus. > > > > > > > > But what if the host has already set that bit before Linux boots? > > > > > > That's a very good point. I think that concern can be addressed by looking > > > for another telltale sign of enumeration, whether an address has been > > > assigned to the bridge's BAR 0 (PCSRBAR). > > > > I don't see how that's any different. The host may or may not have > > assigned an address. > > I don't agree with that. If the host has enabled bus mastering for the > device, then it also surely would also have assigned an address to the > always on PCSRBAR during enumeration. > > In what sort of environment would a host have enabled bus mastering for > a peripheral device _before_ assigning addresses to its BARs?
It's unusual, but not illegal and doing so shouldn't cause a PCI device to try to take over the system. Plus, zero is (arguably) a valid BAR address. > > > > I understand why you need to do this -- I just don't think this is a > > > > reliable way of detecting that you're in that situation. How about a > > > > kernel command line setting? > > > > > > I'd like to avoid requiring a kernel command-line option for this. > > > > It's hardware description, so you could use a device tree property. > > > > I like this better than a command-line option, but what are you > suggesting? Would you want a device-tree property to gate the logic that > I've proposed? I don't think you need the logic you've proposed if you have a device tree property -- the property would assert that you are the owner of the bus despite being an agent. -Scott _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev