diff mbox series

[03/12] PCI/switchtec: Add support for new events

Message ID 20200106190337.2428-4-logang@deltatee.com (mailing list archive)
State Accepted, archived
Headers show
Series Switchtec Fixes and Gen4 Support | expand

Commit Message

Logan Gunthorpe Jan. 6, 2020, 7:03 p.m. UTC
The intercomm notify  event was added for PAX variants of switchtec
hardware and the UEC Port was added for the MR1 release of GEN3 firmware.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
---
 drivers/pci/switch/switchtec.c       | 3 +++
 include/linux/switchtec.h            | 7 +++++--
 include/uapi/linux/switchtec_ioctl.h | 4 +++-
 3 files changed, 11 insertions(+), 3 deletions(-)

Comments

Bjorn Helgaas Jan. 8, 2020, 9:33 p.m. UTC | #1
On Mon, Jan 06, 2020 at 12:03:28PM -0700, Logan Gunthorpe wrote:
> The intercomm notify  event was added for PAX variants of switchtec
> hardware and the UEC Port was added for the MR1 release of GEN3 firmware.

Do they actually spell it "intercomm" in the datasheet?  Seems like
the most common English spelling is "intercom".

Is there some meaningful expansion of "UEC"?

> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> ---
>  drivers/pci/switch/switchtec.c       | 3 +++
>  include/linux/switchtec.h            | 7 +++++--
>  include/uapi/linux/switchtec_ioctl.h | 4 +++-
>  3 files changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
> index 9c3ad09d3022..218e67428cf9 100644
> --- a/drivers/pci/switch/switchtec.c
> +++ b/drivers/pci/switch/switchtec.c
> @@ -751,10 +751,13 @@ static const struct event_reg {
>  	EV_PAR(SWITCHTEC_IOCTL_EVENT_MRPC_COMP, mrpc_comp_hdr),
>  	EV_PAR(SWITCHTEC_IOCTL_EVENT_MRPC_COMP_ASYNC, mrpc_comp_async_hdr),
>  	EV_PAR(SWITCHTEC_IOCTL_EVENT_DYN_PART_BIND_COMP, dyn_binding_hdr),
> +	EV_PAR(SWITCHTEC_IOCTL_EVENT_INTERCOMM_REQ_NOTIFY,
> +	       intercomm_notify_hdr),
Logan Gunthorpe Jan. 8, 2020, 9:47 p.m. UTC | #2
On 2020-01-08 2:33 p.m., Bjorn Helgaas wrote:
> On Mon, Jan 06, 2020 at 12:03:28PM -0700, Logan Gunthorpe wrote:
>> The intercomm notify  event was added for PAX variants of switchtec
>> hardware and the UEC Port was added for the MR1 release of GEN3 firmware.
> 
> Do they actually spell it "intercomm" in the datasheet?  Seems like
> the most common English spelling is "intercom".

Hmm, not sure I don't have this event in my datasheet which is a little
out of date. Kelvin, whose CC'd, would know if we can change the
spelling hopefully he can weigh in on this. As far as I know the define
isn't used anywhere yet.

> Is there some meaningful expansion of "UEC"?

Upstream Error Containment -- I'll mention that in the commit message.

Logan


>> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
>> ---
>>  drivers/pci/switch/switchtec.c       | 3 +++
>>  include/linux/switchtec.h            | 7 +++++--
>>  include/uapi/linux/switchtec_ioctl.h | 4 +++-
>>  3 files changed, 11 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
>> index 9c3ad09d3022..218e67428cf9 100644
>> --- a/drivers/pci/switch/switchtec.c
>> +++ b/drivers/pci/switch/switchtec.c
>> @@ -751,10 +751,13 @@ static const struct event_reg {
>>  	EV_PAR(SWITCHTEC_IOCTL_EVENT_MRPC_COMP, mrpc_comp_hdr),
>>  	EV_PAR(SWITCHTEC_IOCTL_EVENT_MRPC_COMP_ASYNC, mrpc_comp_async_hdr),
>>  	EV_PAR(SWITCHTEC_IOCTL_EVENT_DYN_PART_BIND_COMP, dyn_binding_hdr),
>> +	EV_PAR(SWITCHTEC_IOCTL_EVENT_INTERCOMM_REQ_NOTIFY,
>> +	       intercomm_notify_hdr),
Kelvin Cao Jan. 14, 2020, 2:07 a.m. UTC | #3
'InterComm' is the spelling in the latest datasheet, it's short for "Inter Fabric Manager Communication". Thanks.

Kelvin

-----Original Message-----
From: Logan Gunthorpe [mailto:logang@deltatee.com] 
Sent: Thursday, January 9, 2020 5:48 AM
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-kernel@vger.kernel.org; linux-pci@vger.kernel.org; Kelvin Cao - A31060 <Kelvin.Cao@microchip.com>; Eric Pilmore <epilmore@gigaio.com>; Doug Meyer <dmeyer@gigaio.com>
Subject: Re: [PATCH 03/12] PCI/switchtec: Add support for new events

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

On 2020-01-08 2:33 p.m., Bjorn Helgaas wrote:
> On Mon, Jan 06, 2020 at 12:03:28PM -0700, Logan Gunthorpe wrote:
>> The intercomm notify  event was added for PAX variants of switchtec 
>> hardware and the UEC Port was added for the MR1 release of GEN3 firmware.
>
> Do they actually spell it "intercomm" in the datasheet?  Seems like 
> the most common English spelling is "intercom".

Hmm, not sure I don't have this event in my datasheet which is a little out of date. Kelvin, whose CC'd, would know if we can change the spelling hopefully he can weigh in on this. As far as I know the define isn't used anywhere yet.

> Is there some meaningful expansion of "UEC"?

Upstream Error Containment -- I'll mention that in the commit message.

Logan


>> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
>> ---
>>  drivers/pci/switch/switchtec.c       | 3 +++
>>  include/linux/switchtec.h            | 7 +++++--
>>  include/uapi/linux/switchtec_ioctl.h | 4 +++-
>>  3 files changed, 11 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/pci/switch/switchtec.c 
>> b/drivers/pci/switch/switchtec.c index 9c3ad09d3022..218e67428cf9 
>> 100644
>> --- a/drivers/pci/switch/switchtec.c
>> +++ b/drivers/pci/switch/switchtec.c
>> @@ -751,10 +751,13 @@ static const struct event_reg {
>>      EV_PAR(SWITCHTEC_IOCTL_EVENT_MRPC_COMP, mrpc_comp_hdr),
>>      EV_PAR(SWITCHTEC_IOCTL_EVENT_MRPC_COMP_ASYNC, mrpc_comp_async_hdr),
>>      EV_PAR(SWITCHTEC_IOCTL_EVENT_DYN_PART_BIND_COMP, 
>> dyn_binding_hdr),
>> +    EV_PAR(SWITCHTEC_IOCTL_EVENT_INTERCOMM_REQ_NOTIFY,
>> +           intercomm_notify_hdr),
Logan Gunthorpe Jan. 14, 2020, 6:21 p.m. UTC | #4
Bjorn,

On 2020-01-13 7:07 p.m., Kelvin.Cao@microchip.com wrote:
> 'InterComm' is the spelling in the latest datasheet, it's short for "Inter Fabric Manager Communication". Thanks.

I noticed you fixed up the spelling in your branch but the IOCTL define
is still spelled INTERCOM, which is arguably the most important seeing
it's a userspace interface.

Thanks,

Logan



diff --git a/include/uapi/linux/switchtec_ioctl.h
b/include/uapi/linux/switchtec_ioctl.h
index c912b5a678e4..902fffa9e0f5 100644
--- a/include/uapi/linux/switchtec_ioctl.h
+++ b/include/uapi/linux/switchtec_ioctl.h
@@ -98,7 +98,9 @@ struct switchtec_ioctl_event_summary {
 #define SWITCHTEC_IOCTL_EVENT_CREDIT_TIMEOUT           27
 #define SWITCHTEC_IOCTL_EVENT_LINK_STATE               28
 #define SWITCHTEC_IOCTL_EVENT_GFMS                     29
-#define SWITCHTEC_IOCTL_MAX_EVENTS                     30
+#define SWITCHTEC_IOCTL_EVENT_INTERCOM_REQ_NOTIFY      30
+#define SWITCHTEC_IOCTL_EVENT_UEC                      31
+#define SWITCHTEC_IOCTL_MAX_EVENTS                     32

 #define SWITCHTEC_IOCTL_EVENT_LOCAL_PART_IDX -1
 #define SWITCHTEC_IOCTL_EVENT_IDX_ALL -2
Bjorn Helgaas Jan. 14, 2020, 7:07 p.m. UTC | #5
On Tue, Jan 14, 2020 at 11:21:45AM -0700, Logan Gunthorpe wrote:
> Bjorn,
> 
> On 2020-01-13 7:07 p.m., Kelvin.Cao@microchip.com wrote:
> > 'InterComm' is the spelling in the latest datasheet, it's short for "Inter Fabric Manager Communication". Thanks.
> 
> I noticed you fixed up the spelling in your branch but the IOCTL define
> is still spelled INTERCOM, which is arguably the most important seeing
> it's a userspace interface.

Thanks, I missed that one.  Fixed now.
diff mbox series

Patch

diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 9c3ad09d3022..218e67428cf9 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -751,10 +751,13 @@  static const struct event_reg {
 	EV_PAR(SWITCHTEC_IOCTL_EVENT_MRPC_COMP, mrpc_comp_hdr),
 	EV_PAR(SWITCHTEC_IOCTL_EVENT_MRPC_COMP_ASYNC, mrpc_comp_async_hdr),
 	EV_PAR(SWITCHTEC_IOCTL_EVENT_DYN_PART_BIND_COMP, dyn_binding_hdr),
+	EV_PAR(SWITCHTEC_IOCTL_EVENT_INTERCOMM_REQ_NOTIFY,
+	       intercomm_notify_hdr),
 	EV_PFF(SWITCHTEC_IOCTL_EVENT_AER_IN_P2P, aer_in_p2p_hdr),
 	EV_PFF(SWITCHTEC_IOCTL_EVENT_AER_IN_VEP, aer_in_vep_hdr),
 	EV_PFF(SWITCHTEC_IOCTL_EVENT_DPC, dpc_hdr),
 	EV_PFF(SWITCHTEC_IOCTL_EVENT_CTS, cts_hdr),
+	EV_PFF(SWITCHTEC_IOCTL_EVENT_UEC, uec_hdr),
 	EV_PFF(SWITCHTEC_IOCTL_EVENT_HOTPLUG, hotplug_hdr),
 	EV_PFF(SWITCHTEC_IOCTL_EVENT_IER, ier_hdr),
 	EV_PFF(SWITCHTEC_IOCTL_EVENT_THRESH, threshold_hdr),
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h
index e295515bc3f3..b4ba3a38f30f 100644
--- a/include/linux/switchtec.h
+++ b/include/linux/switchtec.h
@@ -196,7 +196,9 @@  struct part_cfg_regs {
 	u32 mrpc_comp_async_data[5];
 	u32 dyn_binding_hdr;
 	u32 dyn_binding_data[5];
-	u32 reserved4[159];
+	u32 intercomm_notify_hdr;
+	u32 intercomm_notify_data[5];
+	u32 reserved4[153];
 } __packed;
 
 enum {
@@ -320,7 +322,8 @@  struct pff_csr_regs {
 	u32 dpc_data[5];
 	u32 cts_hdr;
 	u32 cts_data[5];
-	u32 reserved3[6];
+	u32 uec_hdr;
+	u32 uec_data[5];
 	u32 hotplug_hdr;
 	u32 hotplug_data[5];
 	u32 ier_hdr;
diff --git a/include/uapi/linux/switchtec_ioctl.h b/include/uapi/linux/switchtec_ioctl.h
index c912b5a678e4..e8db938985ca 100644
--- a/include/uapi/linux/switchtec_ioctl.h
+++ b/include/uapi/linux/switchtec_ioctl.h
@@ -98,7 +98,9 @@  struct switchtec_ioctl_event_summary {
 #define SWITCHTEC_IOCTL_EVENT_CREDIT_TIMEOUT		27
 #define SWITCHTEC_IOCTL_EVENT_LINK_STATE		28
 #define SWITCHTEC_IOCTL_EVENT_GFMS			29
-#define SWITCHTEC_IOCTL_MAX_EVENTS			30
+#define SWITCHTEC_IOCTL_EVENT_INTERCOMM_REQ_NOTIFY	30
+#define SWITCHTEC_IOCTL_EVENT_UEC			31
+#define SWITCHTEC_IOCTL_MAX_EVENTS			32
 
 #define SWITCHTEC_IOCTL_EVENT_LOCAL_PART_IDX -1
 #define SWITCHTEC_IOCTL_EVENT_IDX_ALL -2