mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Switchtec Updates
@ 2017-11-29 17:28 Logan Gunthorpe
  2017-11-29 17:28 ` [PATCH 1/2] switchtec: Added Global Fabric Manager Server (GFMS) event Logan Gunthorpe
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Logan Gunthorpe @ 2017-11-29 17:28 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Kelvin Cao, linux-pci, linux-kernel, 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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] switchtec: Added Global Fabric Manager Server (GFMS) event
  2017-11-29 17:28 [PATCH 0/2] Switchtec Updates Logan Gunthorpe
@ 2017-11-29 17:28 ` Logan Gunthorpe
  2017-11-29 17:28 ` [PATCH 2/2] switchtec: Add device IDs for PSX 24xG3 and PSX 48xG3 Logan Gunthorpe
  2017-12-05 20:11 ` [PATCH 0/2] Switchtec Updates Bjorn Helgaas
  2 siblings, 0 replies; 4+ messages in thread
From: Logan Gunthorpe @ 2017-11-29 17:28 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Kelvin Cao, linux-pci, linux-kernel, Logan Gunthorpe

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.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
---
 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(-)

diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 730cc897b94d..7668d270725d 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -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),
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h
index 09d73d0d1aa8..42d121174fe2 100644
--- a/include/linux/switchtec.h
+++ b/include/linux/switchtec.h
@@ -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 {
diff --git a/include/uapi/linux/switchtec_ioctl.h b/include/uapi/linux/switchtec_ioctl.h
index 75df44373034..4f4daf8db954 100644
--- a/include/uapi/linux/switchtec_ioctl.h
+++ b/include/uapi/linux/switchtec_ioctl.h
@@ -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
-- 
2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] switchtec: Add device IDs for PSX 24xG3 and PSX 48xG3
  2017-11-29 17:28 [PATCH 0/2] Switchtec Updates Logan Gunthorpe
  2017-11-29 17:28 ` [PATCH 1/2] switchtec: Added Global Fabric Manager Server (GFMS) event Logan Gunthorpe
@ 2017-11-29 17:28 ` Logan Gunthorpe
  2017-12-05 20:11 ` [PATCH 0/2] Switchtec Updates Bjorn Helgaas
  2 siblings, 0 replies; 4+ messages in thread
From: Logan Gunthorpe @ 2017-11-29 17:28 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Kelvin Cao, linux-pci, linux-kernel, Logan Gunthorpe

From: Kelvin Cao <kelvin.cao@microsemi.com>

These are valid devices that were missing from the existing device
ID table for the Switchtec driver.

Signed-off-by: Kelvin Cao <kelvin.cao@microsemi.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Author:    Kelvin Cao <kelvin.cao@microsemi.com>
# 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 <kelvin.cao@microsemi.com>
# 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(+)

diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 7668d270725d..a0f8373f3b5f 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -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
-- 
2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Switchtec Updates
  2017-11-29 17:28 [PATCH 0/2] Switchtec Updates Logan Gunthorpe
  2017-11-29 17:28 ` [PATCH 1/2] switchtec: Added Global Fabric Manager Server (GFMS) event Logan Gunthorpe
  2017-11-29 17:28 ` [PATCH 2/2] switchtec: Add device IDs for PSX 24xG3 and PSX 48xG3 Logan Gunthorpe
@ 2017-12-05 20:11 ` Bjorn Helgaas
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2017-12-05 20:11 UTC (permalink / raw)
  To: Logan Gunthorpe; +Cc: Bjorn Helgaas, Kelvin Cao, linux-pci, linux-kernel

On Wed, Nov 29, 2017 at 10:28:42AM -0700, Logan Gunthorpe wrote:
> 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(-)

Applied to pci/switchtec for v4.16, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-05 20:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 17:28 [PATCH 0/2] Switchtec Updates Logan Gunthorpe
2017-11-29 17:28 ` [PATCH 1/2] switchtec: Added Global Fabric Manager Server (GFMS) event Logan Gunthorpe
2017-11-29 17:28 ` [PATCH 2/2] switchtec: Add device IDs for PSX 24xG3 and PSX 48xG3 Logan Gunthorpe
2017-12-05 20:11 ` [PATCH 0/2] Switchtec Updates Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome