RE: [PATCH] PCIe: limit Max Read Request Size on i.MX to 512 bytes
From: Richard Zhu
Date: Mon Aug 16 2021 - 03:50:04 EST
Regarding my understanding, that there should be decomposition operations if the
Max_Read_Request_Size is larger than the Max_Payload_size specified by RC port.
The bit0 of AMBA Multiple Outbound Decomposed NP Sub-Requests Control Register(Offset:0x700 + 0x24)
had been set to be 1b1 in default.
Note: The description of this bit.
Enable AMBA Multiple Outbound Decomposed NP Sub- Requests.
This bit when set to '0' disables the possibility of having multiple outstanding non-posted requests that
were derived from decomposition of an outbound AMBA request. See Supported AXI Burst Operations for
more details. You should not clear this register unless your application master is requesting an amount of read data
greater than Max_Read_Request_Size, and the remote device (or switch) is reordering completions that
have different tags
> -----Original Message-----
> From: khalasa@xxxxxxx <khalasa@xxxxxxx>
> Sent: Monday, August 16, 2021 1:19 PM
> To: Bjorn Helgaas <helgaas@xxxxxxxxxx>
> Cc: Krzysztof Wilczyński <kw@xxxxxxxxx>; Bjorn Helgaas
> <bhelgaas@xxxxxxxxxx>; linux-pci@xxxxxxxxxxxxxxx; Artem Lapkin
> <email2tema@xxxxxxxxx>; Neil Armstrong <narmstrong@xxxxxxxxxxxx>;
> Huacai Chen <chenhuacai@xxxxxxxxx>; Rob Herring <robh@xxxxxxxxxx>;
> Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>; Richard Zhu
> <hongxing.zhu@xxxxxxx>; Lucas Stach <l.stach@xxxxxxxxxxxxxx>;
> Subject: Re: [PATCH] PCIe: limit Max Read Request Size on i.MX to 512 bytes
> Bjorn Helgaas <helgaas@xxxxxxxxxx> writes:
> >> TBH I don't think of this as of a "quirk" - all systems have MRRS
> >> limits, it just happens that these ones have their limit lower than
> >> 4096 bytes. This isn't a limitation of a particular PCIe device, this
> >> is a common limit of the whole system.
> > Do you have a reference for this? I don't see anything in the PCIe
> > spec that suggests platforms must limit MRRS, and it seems that only
> > these ARM-related controllers have this issue.
> I meant there is always a limit - isn't Max_Read_Request_Size a limit?
> Device Control Register (Offset 08h) Bit Location 14:12
> Max_Read_Request_Size allows for max 4096 bytes, though two values are
> reserved, so there is room for some easy extension.
> - non-ARM (non-DWC?) systems are limited to 4096 bytes
[Richard] Regarding to the descriptions listed above, I think that there should no limitations of the Max_payload_size of RC port.
> - DWC-based systems are limited to 128, 256, 512 bytes (are there
> 4096-byte ones?)
[Richard] The Max_payload_size can be configured from 128bytes to 4KB when integrate the DWC IP into the SOC.
On i.MX6 PCIe, this parameter is fixed set to 512 bytes.
> That's how I understand it, please correct me if I'm wrong.
> Krzysztof "Chris" Hałasa
> Sieć Badawcza Łukasiewicz
> Przemysłowy Instytut Automatyki i Pomiarów PIAP Al. Jerozolimskie 202,
> 02-486 Warszawa