All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net V3] eth: lan743x: reject extts for non-pci11x1x devices
@ 2022-09-28  7:08 Raju Lakkaraju
  2022-09-28  7:27 ` Horatiu Vultur
  0 siblings, 1 reply; 6+ messages in thread
From: Raju Lakkaraju @ 2022-09-28  7:08 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, linux-kernel, bryan.whitehead, edumazet, pabeni,
	UNGLinuxDriver

Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support
the PTP-IO Input event triggered timestamping mechanisms added

Fixes: 60942c397af6 ("Add support for PTP-IO Event Input External  Timestamp
 (extts)")

Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
---
Changes:                                                                        
========
V2 -> V3:
 - Correct the Fixes tag

V1 -> V2:
 - Repost against net with a Fixes tag

 drivers/net/ethernet/microchip/lan743x_ptp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/ethernet/microchip/lan743x_ptp.c
index 6a11e2ceb013..da3ea905adbb 100644
--- a/drivers/net/ethernet/microchip/lan743x_ptp.c
+++ b/drivers/net/ethernet/microchip/lan743x_ptp.c
@@ -1049,6 +1049,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 					   enum ptp_pin_function func,
 					   unsigned int chan)
 {
+	struct lan743x_ptp *lan_ptp =
+		container_of(ptp, struct lan743x_ptp, ptp_clock_info);
+	struct lan743x_adapter *adapter =
+		container_of(lan_ptp, struct lan743x_adapter, ptp);
 	int result = 0;
 
 	/* Confirm the requested function is supported. Parameter
@@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 	switch (func) {
 	case PTP_PF_NONE:
 	case PTP_PF_PEROUT:
+		break;
 	case PTP_PF_EXTTS:
+		if (!adapter->is_pci11x1x)
+			result = -1;
 		break;
 	case PTP_PF_PHYSYNC:
 	default:
-- 
2.25.1


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

* Re: [PATCH net V3] eth: lan743x: reject extts for non-pci11x1x devices
  2022-09-28  7:08 [PATCH net V3] eth: lan743x: reject extts for non-pci11x1x devices Raju Lakkaraju
@ 2022-09-28  7:27 ` Horatiu Vultur
  2022-09-28  8:20   ` Raju Lakkaraju
  0 siblings, 1 reply; 6+ messages in thread
From: Horatiu Vultur @ 2022-09-28  7:27 UTC (permalink / raw)
  To: Raju Lakkaraju
  Cc: netdev, davem, kuba, linux-kernel, bryan.whitehead, edumazet,
	pabeni, UNGLinuxDriver

The 09/28/2022 12:38, Raju Lakkaraju wrote:

Hi Raju,

> Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support
> the PTP-IO Input event triggered timestamping mechanisms added
> 
> Fixes: 60942c397af6 ("Add support for PTP-IO Event Input External  Timestamp
>  (extts)")

The fixes tag should not spread over multiple lines. Also you have extra
spaces between External and Timestamp which doesn't appear in the actual
commit.

Also you have an empty line between Fixes and Reviewed-by tags.
> 
> Reviewed-by: Jakub Kicinski <kuba@kernel.org>

I am not sure that Jakub gave his Reviewed-by, but maybe I have missed
that.

> Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
> ---
> Changes:                                                                        
> ========
> V2 -> V3:
>  - Correct the Fixes tag
> 
> V1 -> V2:
>  - Repost against net with a Fixes tag
> 
>  drivers/net/ethernet/microchip/lan743x_ptp.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/ethernet/microchip/lan743x_ptp.c
> index 6a11e2ceb013..da3ea905adbb 100644
> --- a/drivers/net/ethernet/microchip/lan743x_ptp.c
> +++ b/drivers/net/ethernet/microchip/lan743x_ptp.c
> @@ -1049,6 +1049,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
>  					   enum ptp_pin_function func,
>  					   unsigned int chan)
>  {
> +	struct lan743x_ptp *lan_ptp =
> +		container_of(ptp, struct lan743x_ptp, ptp_clock_info);
> +	struct lan743x_adapter *adapter =
> +		container_of(lan_ptp, struct lan743x_adapter, ptp);
>  	int result = 0;
>  
>  	/* Confirm the requested function is supported. Parameter
> @@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
>  	switch (func) {
>  	case PTP_PF_NONE:
>  	case PTP_PF_PEROUT:
> +		break;
>  	case PTP_PF_EXTTS:
> +		if (!adapter->is_pci11x1x)
> +			result = -1;
>  		break;
>  	case PTP_PF_PHYSYNC:
>  	default:
> -- 
> 2.25.1
> 

-- 
/Horatiu

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

* Re: [PATCH net V3] eth: lan743x: reject extts for non-pci11x1x devices
  2022-09-28  7:27 ` Horatiu Vultur
@ 2022-09-28  8:20   ` Raju Lakkaraju
  2022-09-28 16:50     ` Jakub Kicinski
  0 siblings, 1 reply; 6+ messages in thread
From: Raju Lakkaraju @ 2022-09-28  8:20 UTC (permalink / raw)
  To: Horatiu Vultur
  Cc: netdev, davem, kuba, linux-kernel, bryan.whitehead, edumazet,
	pabeni, UNGLinuxDriver

[-- Attachment #1: Type: text/plain, Size: 2559 bytes --]

Hi Horatiu,

Thank you for review comments.
In vim editor, set the textwidth as 75. Due to this, after 75 charecters of
the line, string placed in next line.

Please find the screenshot of column marker with textwidth.
I will fix it and repost the patch again.

The 09/28/2022 09:27, Horatiu Vultur wrote:
> The 09/28/2022 12:38, Raju Lakkaraju wrote:
> 
> Hi Raju,
> 
> > Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support
> > the PTP-IO Input event triggered timestamping mechanisms added
> > 
> > Fixes: 60942c397af6 ("Add support for PTP-IO Event Input External  Timestamp
> >  (extts)")
> 
> The fixes tag should not spread over multiple lines. Also you have extra
> spaces between External and Timestamp which doesn't appear in the actual
> commit.
> 
> Also you have an empty line between Fixes and Reviewed-by tags.
> > 
> > Reviewed-by: Jakub Kicinski <kuba@kernel.org>
> 
> I am not sure that Jakub gave his Reviewed-by, but maybe I have missed
> that.
> 

Fixes tag correction was suggested by Jakub in V2 patch.

> > Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
> > ---
> > Changes:                                                                        
> > ========
> > V2 -> V3:
> >  - Correct the Fixes tag
> > 
> > V1 -> V2:
> >  - Repost against net with a Fixes tag
> > 
> >  drivers/net/ethernet/microchip/lan743x_ptp.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/ethernet/microchip/lan743x_ptp.c
> > index 6a11e2ceb013..da3ea905adbb 100644
> > --- a/drivers/net/ethernet/microchip/lan743x_ptp.c
> > +++ b/drivers/net/ethernet/microchip/lan743x_ptp.c
> > @@ -1049,6 +1049,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
> >  					   enum ptp_pin_function func,
> >  					   unsigned int chan)
> >  {
> > +	struct lan743x_ptp *lan_ptp =
> > +		container_of(ptp, struct lan743x_ptp, ptp_clock_info);
> > +	struct lan743x_adapter *adapter =
> > +		container_of(lan_ptp, struct lan743x_adapter, ptp);
> >  	int result = 0;
> >  
> >  	/* Confirm the requested function is supported. Parameter
> > @@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
> >  	switch (func) {
> >  	case PTP_PF_NONE:
> >  	case PTP_PF_PEROUT:
> > +		break;
> >  	case PTP_PF_EXTTS:
> > +		if (!adapter->is_pci11x1x)
> > +			result = -1;
> >  		break;
> >  	case PTP_PF_PHYSYNC:
> >  	default:
> > -- 
> > 2.25.1
> > 
> 
> -- 
> /Horatiu

-- 
--------
Thanks,
Raju

[-- Attachment #2: ptp_io_fixes_flag_line_split.png --]
[-- Type: image/png, Size: 57074 bytes --]

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

* Re: [PATCH net V3] eth: lan743x: reject extts for non-pci11x1x devices
  2022-09-28  8:20   ` Raju Lakkaraju
@ 2022-09-28 16:50     ` Jakub Kicinski
  0 siblings, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2022-09-28 16:50 UTC (permalink / raw)
  To: Raju Lakkaraju
  Cc: Horatiu Vultur, netdev, davem, linux-kernel, bryan.whitehead,
	edumazet, pabeni, UNGLinuxDriver

On Wed, 28 Sep 2022 13:50:50 +0530 Raju Lakkaraju wrote:
> > > Reviewed-by: Jakub Kicinski <kuba@kernel.org>  
> > 
> > I am not sure that Jakub gave his Reviewed-by, but maybe I have missed
> > that.
> 
> Fixes tag correction was suggested by Jakub in V2 patch.

Does not mean I reviewed the patch, only add review tags if someone
explicitly sent them to you.

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

* RE: [PATCH net V3] eth: lan743x: reject extts for non-pci11x1x devices
  2022-09-28  3:11 Raju Lakkaraju
@ 2022-09-28  5:06 ` Raju.Lakkaraju
  0 siblings, 0 replies; 6+ messages in thread
From: Raju.Lakkaraju @ 2022-09-28  5:06 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, linux-kernel, Bryan.Whitehead, edumazet, pabeni,
	UNGLinuxDriver

Generate the patch on "net-next" branch
Please ignore this patch.

Thanks,
Raju

-----Original Message-----
From: Raju Lakkaraju <Raju.Lakkaraju@microchip.com> 
Sent: 28 September 2022 08:41 AM
To: netdev@vger.kernel.org
Cc: davem@davemloft.net; kuba@kernel.org; linux-kernel@vger.kernel.org; Bryan Whitehead - C21958 <Bryan.Whitehead@microchip.com>; edumazet@google.com; pabeni@redhat.com; UNGLinuxDriver <UNGLinuxDriver@microchip.com>
Subject: [PATCH net V3] eth: lan743x: reject extts for non-pci11x1x devices

Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support the PTP-IO Input event triggered timestamping mechanisms added

Fixes: 60942c397af6 ("Add support for PTP-IO Event Input External  Timestamp
 (extts)")

Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
---
Changes:                                                                        
========                                                                        
V2 -> V3:
 - Correct the Fixes tag

V1 -> V2:                                                                       
 - Repost against net with a Fixes tag 

 drivers/net/ethernet/microchip/lan743x_ptp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/ethernet/microchip/lan743x_ptp.c
index 6a11e2ceb013..da3ea905adbb 100644
--- a/drivers/net/ethernet/microchip/lan743x_ptp.c
+++ b/drivers/net/ethernet/microchip/lan743x_ptp.c
@@ -1049,6 +1049,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 					   enum ptp_pin_function func,
 					   unsigned int chan)
 {
+	struct lan743x_ptp *lan_ptp =
+		container_of(ptp, struct lan743x_ptp, ptp_clock_info);
+	struct lan743x_adapter *adapter =
+		container_of(lan_ptp, struct lan743x_adapter, ptp);
 	int result = 0;
 
 	/* Confirm the requested function is supported. Parameter @@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 	switch (func) {
 	case PTP_PF_NONE:
 	case PTP_PF_PEROUT:
+		break;
 	case PTP_PF_EXTTS:
+		if (!adapter->is_pci11x1x)
+			result = -1;
 		break;
 	case PTP_PF_PHYSYNC:
 	default:
--
2.25.1


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

* [PATCH net V3] eth: lan743x: reject extts for non-pci11x1x devices
@ 2022-09-28  3:11 Raju Lakkaraju
  2022-09-28  5:06 ` Raju.Lakkaraju
  0 siblings, 1 reply; 6+ messages in thread
From: Raju Lakkaraju @ 2022-09-28  3:11 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, linux-kernel, bryan.whitehead, edumazet, pabeni,
	UNGLinuxDriver

Remove PTP_PF_EXTTS support for non-PCI11x1x devices since they do not support
the PTP-IO Input event triggered timestamping mechanisms added

Fixes: 60942c397af6 ("Add support for PTP-IO Event Input External  Timestamp
 (extts)")

Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
---
Changes:                                                                        
========                                                                        
V2 -> V3:
 - Correct the Fixes tag

V1 -> V2:                                                                       
 - Repost against net with a Fixes tag 

 drivers/net/ethernet/microchip/lan743x_ptp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/ethernet/microchip/lan743x_ptp.c
index 6a11e2ceb013..da3ea905adbb 100644
--- a/drivers/net/ethernet/microchip/lan743x_ptp.c
+++ b/drivers/net/ethernet/microchip/lan743x_ptp.c
@@ -1049,6 +1049,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 					   enum ptp_pin_function func,
 					   unsigned int chan)
 {
+	struct lan743x_ptp *lan_ptp =
+		container_of(ptp, struct lan743x_ptp, ptp_clock_info);
+	struct lan743x_adapter *adapter =
+		container_of(lan_ptp, struct lan743x_adapter, ptp);
 	int result = 0;
 
 	/* Confirm the requested function is supported. Parameter
@@ -1057,7 +1061,10 @@ static int lan743x_ptpci_verify_pin_config(struct ptp_clock_info *ptp,
 	switch (func) {
 	case PTP_PF_NONE:
 	case PTP_PF_PEROUT:
+		break;
 	case PTP_PF_EXTTS:
+		if (!adapter->is_pci11x1x)
+			result = -1;
 		break;
 	case PTP_PF_PHYSYNC:
 	default:
-- 
2.25.1


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

end of thread, other threads:[~2022-09-28 16:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28  7:08 [PATCH net V3] eth: lan743x: reject extts for non-pci11x1x devices Raju Lakkaraju
2022-09-28  7:27 ` Horatiu Vultur
2022-09-28  8:20   ` Raju Lakkaraju
2022-09-28 16:50     ` Jakub Kicinski
  -- strict thread matches above, loose matches on Subject: below --
2022-09-28  3:11 Raju Lakkaraju
2022-09-28  5:06 ` Raju.Lakkaraju

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.