• Wesley Sheng's avatar
    switchtec: Increase PFF limit from 48 to 255 · ba8a3982
    Wesley Sheng authored
    The Switchtec devices supports two PCIe Function Frameworks (PFFs) per
    upstream port (one for the port itself and one for the management endoint),
    and each PFF may have up to 255 ports.  Previously the driver only
    supported 48 of those ports, and the SWITCHTEC_IOCTL_EVENT_SUMMARY ioctl
    only returned information about those 48.
    
    Increase SWITCHTEC_MAX_PFF_CSR from 48 to 255 so the driver supports all
    255 possible ports.
    
    Rename SWITCHTEC_IOCTL_EVENT_SUMMARY and associated struct
    switchtec_ioctl_event_summary to SWITCHTEC_IOCTL_EVENT_SUMMARY_LEGACY and
    switchtec_ioctl_event_summary_legacy with so existing applications work
    unchanged, supporting up to 48 ports.
    
    Add replacement SWITCHTEC_IOCTL_EVENT_SUMMARY and struct
    switchtec_ioctl_event_summary that new and recompiled applications support
    up to 255 ports.
    Signed-off-by: default avatarWesley Sheng <wesley.sheng@microchip.com>
    [bhelgaas: changelog]
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
    ba8a3982
switchtec.c 38.6 KB