RE: [PATCH] PCIE: pcie_set_readrq must not be allowed by PCIE EP driver

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

 



Hello,

pratyush wrote on Thursday, March 10, 2011 7:19 PM:

> Hello,
> 
> On 2/17/2011 8:40 PM, Pedanekar, Hemant wrote:
>> Correction: outbound --> remote
>> 
>> linux-pci-owner@xxxxxxxxxxxxxxx wrote on :
>> 
>>> Hello,
>>> 
>>> linux-pci-owner@xxxxxxxxxxxxxxx wrote on Thursday, February 17, 2011 3:44
>>> PM: 
>>> 
>>>> pcie_set_readrq modifies read request size in EP's capability register.
>>>> Now considering a situation where this EP is to be connected to an RC
>>>> whose implemented read buffer size is less than what this function
>>>> programs. [As per pcie specification this buffer size can be 128-4096
>>>> bytes. So an RC can have lesser buffer size]
>>>> In this scenario there is no way that RC can revert this as
>>>> per its capability.
>>>> So , read capability should always be either programmed by enumeration
>>>> during bootloader or by using postinit hook of base driver. I mean, it
>>>> should be programmed by RC's driver not by EP's driver.
>>> 
>>> I am also working on a RC device which supports max outbound
>>> read request of
>>> 256 bytes and have to modify this (sil) driver to set read request size to
>>> 256 bytes. This patch would probably help me.
>>> 
>>> But I have one question: aren't the completors supposed to respond with
>>> multiple completions if the read request exceeds their buffer limit?
>>> 
> 
> I am also agreeing with this statement. But, I really do not know why
> does a read request fails , rather to be replied by multiple packets.
> 
> What happens in your case? Does it not work, if you do not
> modify sil driver?
> 
I also require to modify the sil driver to avoid setting max RRQ to 4096 
otherwise the data transfer over PCIe does not work. The RC responds with 
"Unsupported Request" for read request of size greater than 256 bytes.

The other problem is, there is no way for peers to know that the other 
device cannot handle RRQ of size beyond certain limit. At least I am not 
aware of any bits in PCIe configuration space which advertise this. Do you
know of any such?

While, there is "Max RRQ size" field in device control register which only
controls outbound RRQ size.

This restriction probbaly will complicate more when the device with such 
RRQ limitation is a EP, in such case, no one else than the EP (and its driver) 
would know about this limitation and need to force others (including RC) to
reduce the max RRQ size.
  
> Regards
> Pratyush
[...]

Thanks
   Hemant--
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