• Rajat Jain's avatar
    PCI: Check only the Vendor ID to identify Configuration Request Retry · 89665a6a
    Rajat Jain authored
    Per PCIe r3.0, sec 2.3.2, if a Root Complex
    
      - has Configuration Request Retry Status Software Visibility enabled,
      - issues a Configuration Read of both bytes of the Vendor ID, and
      - receives a Completion with Configuration Request Retry Status (CRS),
    
    it must complete the request to the host by fabricating data of 0x0001 for
    the Vendor ID and 0xff for any additional bytes in the request.
    
    Linux issues a single config read for the four bytes containing the Vendor
    ID and the Device ID.  Previously we checked all four bytes for 0xffff0001
    to identify CRS.
    
    However, it is only the Vendor ID that really indicates CRS, because it's
    sufficient to read only those two bytes.  Checking the Device ID verifies
    spec compliance but doesn't add any information.
    
    Some Root Complexes appear to indicate CRS by returning 0x0001 for the
    Vendor ID along with the actual the Device ID.  Previously we interpreted
    that as a valid Vendor/Device ID pair, although 0x0001 is reserved and
    cannot be a valid Vendor ID.
    
    [bhelgaas: changelog]
    Link: http://lkml.kernel.org/r/4729FC36.3040000@gmail.comSigned-off-by: default avatarRajat Jain <rajatxjain@gmail.com>
    Signed-off-by: default avatarRajat Jain <rajatjain@juniper.net>
    Signed-off-by: default avatarGuenter Roeck <groeck@juniper.net>
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    89665a6a
probe.c 53.2 KB