Re: FW: [PATCH 4.4-rc8] pci: Make 4K config space available for non PCI-e/PCI-X devices

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

 



On Thu, 2016-01-07 at 23:20 +0000, Ananth, Rajesh wrote:
> Resending this in PLAIN TEXT.
> 
> Description:
> 
> The Kernel PCI driver that probes the devices always reports the
> config space as 256 bytes for the PCI devices that are not PCI-e or
> PCI-X.  
> There are some vendor devices that are not PCI-e or PCI-X, but might
> have the configuration space data that is more than 256 bytes  in
> size to
> be made accessible through the standard sys-fs
> "/sys/bus/pci/devices/./config" link.  
> 
> Currently, the current Kernel does not provide the extended config
> space access for those devices, and a proprietary mechanism is
> oftentimes used by the vendor utilities to address that. As the
> problem could be seen, use of proprietary tools and utilities
> automatically
> leads to user confusion of using non-standard tools across different
> vendor devices.
> 
> Patch:
> 
> --- linux-4.4-rc8/drivers/pci/probe.c.orig      2016-01-07
> 13:30:54.310392700 -0800
> +++ linux-4.4-rc8/drivers/pci/probe.c   2016-01-07 13:32:14.586392700
> -0800
> @@ -1119,28 +1119,8 @@ static int pci_cfg_space_size_ext(struct
> 
> int pci_cfg_space_size(struct pci_dev *dev)
> {
> -       int pos;
> -       u32 status;
> -       u16 class;
> -
> -       class = dev->class >> 8;
> -       if (class == PCI_CLASS_BRIDGE_HOST)
> -               return pci_cfg_space_size_ext(dev);
> -
> -       if (!pci_is_pcie(dev)) {
> -               pos = pci_find_capability(dev, PCI_CAP_ID_PCIX);
> -               if (!pos)
> -                       goto fail;
> -
> -               pci_read_config_dword(dev, pos + PCI_X_STATUS,
> &status);
> -               if (!(status & (PCI_X_STATUS_266MHZ |
> PCI_X_STATUS_533MHZ)))
> -                       goto fail;
> -       }
> -
>         return pci_cfg_space_size_ext(dev);
> 
> - fail:
> -       return PCI_CFG_SPACE_SIZE;
> }

Just no.  Use quirks if there are specific devices which provide
extended config space in non-standard ways, don't impose this broken
behavior everywhere.  Thanks,

Alex
--
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