Switchtec Updates
Subsystems (2)
Logan Gunthorpe
maintainercover Switchtec Updates
Hi Bjorn,
Blease accept the following two patches. The first adds a couple more device IDs for the Switchtec driver. The second adds a new event type for it to report.
Thanks,
Logan
Kelvin Cao (1):
switchtec: Add device IDs for PSX 24xG3 and PSX 48xG3
Logan Gunthorpe (1):
switchtec: Added Global Fabric Manager Server (GFMS) event
drivers/pci/switch/switchtec.c | 3 +++ include/linux/switchtec.h | 3 +++ include/uapi/linux/switchtec_ioctl.h | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-)
--
2.11.0
Logan Gunthorpe
maintainerPATCH 1/2 switchtec: Added Global Fabric Manager Server (GFMS) event
Add a new event type that is newly exposed by recent firmware. The event will never occur if the firmware is too old. If user space tries to use this event in an older kernel, it will just get an EINVAL which is perfectly acceptable in the existing user space code.
--- drivers/pci/switch/switchtec.c | 1 + include/linux/switchtec.h | 3 +++ include/uapi/linux/switchtec_ioctl.h | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-)
drivers/pci/switch/switchtec.c +1 -0
@@ -707,6 +707,7 @@ static const struct event_reg {EV_GLB (SWITCHTEC_IOCTL_EVENT_CLI_MRPC_COMP_ASYNC , cli_mrpc_comp_async_hdr),EV_GLB (SWITCHTEC_IOCTL_EVENT_GPIO_INT , gpio_interrupt_hdr), +EV_GLB (SWITCHTEC_IOCTL_EVENT_GFMS , gfms_event_hdr),EV_PAR (SWITCHTEC_IOCTL_EVENT_PART_RESET , part_reset_hdr),EV_PAR (SWITCHTEC_IOCTL_EVENT_MRPC_COMP , mrpc_comp_hdr), EV_PAR(SWITCHTEC_IOCTL_EVENT_MRPC_COMP_ASYNC, mrpc_comp_async_hdr),
include/linux/switchtec.h +3 -0
@@ -100,6 +100,9 @@ struct sw_event_regs {u32 gpio_interrupt_hdr;u32 gpio_interrupt_data;u32 reserved16[4 ]; +u32 gfms_event_hdr; +u32 gfms_event_data; +u32 reserved17[4 ]; } __packed;enum {
include/uapi/linux/switchtec_ioctl.h +2 -1
@@ -88,7 +88,8 @@ struct switchtec_ioctl_event_summary {#define SWITCHTEC_IOCTL_EVENT_FORCE_SPEED 26#define SWITCHTEC_IOCTL_EVENT_CREDIT_TIMEOUT 27#define SWITCHTEC_IOCTL_EVENT_LINK_STATE 28 -#define SWITCHTEC_IOCTL_MAX_EVENTS 29 +#define SWITCHTEC_IOCTL_EVENT_GFMS 29 +#define SWITCHTEC_IOCTL_MAX_EVENTS 30#define SWITCHTEC_IOCTL_EVENT_LOCAL_PART_IDX -1#define SWITCHTEC_IOCTL_EVENT_IDX_ALL -2
Signature · 1 line
2.11.0
Logan Gunthorpe
maintainerPATCH 2/2 switchtec: Add device IDs for PSX 24xG3 and PSX 48xG3
In reply to Logan GunthorpeFrom: Kelvin Cao <[email protected]>
These are valid devices that were missing from the existing device ID table for the Switchtec driver.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit. # # Author: Kelvin Cao <[email protected]> # Date: Sat Oct 14 01:31:58 2017 +0800 # # interactive rebase in progress; onto 4fbd8d194f06 # Last commands done (2 commands done): # r b63e909353b8 switchtec: Added Global Fabric Manager Server (GFMS) event. # r a9d2d2460138 switchtec: Add device IDs for PSX 24xG3 and PSX 48xG3 # No commands remaining. # You are currently editing a commit while rebasing branch 'switchtec-pci-next' on '4fbd8d194f06'. # # Changes to be committed: # modified: drivers/pci/switch/switchtec.c #
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit. # # Author: Kelvin Cao <[email protected]> # Date: Sat Oct 14 01:31:58 2017 +0800 # # On branch switchtec-pci-next # Changes to be committed: # modified: drivers/pci/switch/switchtec.c # --- drivers/pci/switch/switchtec.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/pci/switch/switchtec.c +2 -0
@@ -1353,6 +1353,8 @@ static const struct pci_device_id switchtec_pci_tbl[] = {SWITCHTEC_PCI_DEVICE (0x8534 ),//PFX 64xG3 SWITCHTEC_PCI_DEVICE (0x8535 ),//PFX 80xG3 SWITCHTEC_PCI_DEVICE (0x8536 ),//PFX 96xG3 +SWITCHTEC_PCI_DEVICE (0x8541 ),//PSX 24xG3 +SWITCHTEC_PCI_DEVICE (0x8542 ),//PSX 32xG3 SWITCHTEC_PCI_DEVICE (0x8543 ),//PSX 48xG3 SWITCHTEC_PCI_DEVICE (0x8544 ),//PSX 64xG3 SWITCHTEC_PCI_DEVICE(0x8545), //PSX 80xG3
Signature · 1 line
2.11.0
Bjorn Helgaas
AppliedQuoted 13 lines · Logan Gunthorpe
Hi Bjorn,
Blease accept the following two patches. The first adds a couple more device IDs for the Switchtec driver. The second adds a new event type for it to report.
Thanks,
Logan
Kelvin Cao (1):
switchtec: Add device IDs for PSX 24xG3 and PSX 48xG3
Quoted 7 lines
Logan Gunthorpe (1):
switchtec: Added Global Fabric Manager Server (GFMS) eventdrivers/pci/switch/switchtec.c | 3 +++ include/linux/switchtec.h | 3 +++ include/uapi/linux/switchtec_ioctl.h | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-)
Applied to pci/switchtec for v4.16, thanks!