Re: [PATCH v3] PCI: Max Payload Size BIOS workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 4, 2011 at 7:14 PM, Benjamin Herrenschmidt
<benh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 2011-06-03 at 11:00 -0500, Jon Mason wrote:
>>
>> You are correct.  I was only thinking about the DMA write.  The entire
>> fabric needs have each device/bridge MPS set to the smallest MPS
>> found, otherwise DMA reads could be too large for a device on the
>> fabric and cause an PCI unrecoverable error.
>>
>> So the correct solution is to find the smallest MPS per fabric while
>> walking the bus, then walk the bus again setting each device/bridge's
>> MPS to the smallest MPS found.
>>
>> This patch just got much more complicated.  Damn you crappy BIOS
>> developers!
>
> Same with max read req. size except that for that one we don't even have
> a register telling us what the bridge max is in the first place.

Yes, I was going to look into that as well, since it makes sense to
check and set it at the same time as the MPS.

>
> I have some in-house code to fix that up on powerpc at boot that I
> haven't released yet (for a platform that we haven't published yet) but
> it's only boot time, I haven't dealt with the hotplug case.
>
> The problem I see with hotplug is that potentially, one could have to
> change the entire hierarchy below the PHB when a new device is plugged
> with a smaller max payload size than what was used before.
>
> However, I didn't think it was "safe" to just change the size on a live
> system, devices have to be quiescent.
>
> That makes it impossible to do reliably in my book, ie, anything with a
> hotplug might have to be hard wired to the smallest size unless the
> hotplug happens at the PHB level in which case there is no risk of
> disrupting another device while changing the size.

On the limited amount of systems I've access to, I see the PCI-E slots
wired directly to the RC.  So, this would not be an issue for these.
Though, we might want to add a check for a bus between the RC and the
hotpluggable PCI-E slot, and force it to the minimum in that case.

>
> Ben.
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux