switchtec: Increase PFF limit from 48 to 255
authorWesley Sheng <wesley.sheng@microchip.com>
Mon, 15 Apr 2019 14:41:41 +0000 (22:41 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 17 Apr 2019 22:20:01 +0000 (17:20 -0500)
commitba8a39820d4614b2b04ac74a48d1f8de677de750
tree9417afa76040060adf44718e3548f4d1748cc614
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b
switchtec: Increase PFF limit from 48 to 255

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: Wesley Sheng <wesley.sheng@microchip.com>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
drivers/pci/switch/switchtec.c
include/linux/switchtec.h
include/uapi/linux/switchtec_ioctl.h