[PATCH] PCI: rockchip: check link status when validating device
helgaas at kernel.org
Wed May 24 14:33:53 PDT 2017
On Tue, May 23, 2017 at 06:15:07PM -0700, Brian Norris wrote:
> (Since Shawn didn't quite answer this piece)
> On Wed, May 24, 2017 at 09:04:33AM +0800, Shawn Lin wrote:
> > 在 2017/5/24 3:44, Bjorn Helgaas 写道:
> > >On Fri, May 19, 2017 at 02:58:27PM +0800, Shawn Lin wrote:
> > >>This patch checks the link status before reading and
> > >>writing configure space of devices attached to the RC.
> > >>If the link status is down, we shouldn't try to access
> > >>the devices.
> > >
> > >What bad things happen without this patch?
> On this SoC, I've seen this sort of behavior (reading the config space
> when the device isn't responding) yield aborts, which panic the system.
Trying to read config space of a device that doesn't exist is an
essential part of enumeration, and we expect whatever error occurs at
the hardware level to get turned into 0xffffffff data at the CPU (as
Shawn mentioned some issue with memory read/write as well. I think we
need to sort out how to handle both the config space issue and the
memory issue. This patch seems like it papers over part of it and
reduces the urgency of finding a real solution.
I'm going to drop this for now, pending a more detailed explanation.
More information about the Linux-rockchip