netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Patchset for gianfar ptp driver
@ 2016-02-22  6:49 Yangbo Lu
  2016-02-22  6:49 ` [PATCH 1/3] ARM: dts: ls1021a: add 1588 timer node Yangbo Lu
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Yangbo Lu @ 2016-02-22  6:49 UTC (permalink / raw)
  To: netdev, Claudiu Manoil; +Cc: Yangbo Lu

This patchset is to enable ptp support for ls1021a platform. The endianness
issue in gianfar driver and gianfar ptp driver must be fixed, and a 1588
timer node must be added into dts.

Yangbo Lu (3):
  ARM: dts: ls1021a: add 1588 timer node
  gianfar_ptp: fix endianness in get_of_u32()
  gianfar: fix endianness for hardware timestamp

 arch/arm/boot/dts/ls1021a.dtsi               | 12 ++++++++++++
 drivers/net/ethernet/freescale/gianfar.c     |  2 ++
 drivers/net/ethernet/freescale/gianfar_ptp.c |  2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)

-- 
2.1.0.27.g96db324

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

* [PATCH 1/3] ARM: dts: ls1021a: add 1588 timer node
  2016-02-22  6:49 [PATCH 0/3] Patchset for gianfar ptp driver Yangbo Lu
@ 2016-02-22  6:49 ` Yangbo Lu
  2016-02-22  8:49   ` Richard Cochran
  2016-02-22  6:49 ` [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32() Yangbo Lu
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Yangbo Lu @ 2016-02-22  6:49 UTC (permalink / raw)
  To: netdev, Claudiu Manoil; +Cc: Yangbo Lu

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 arch/arm/boot/dts/ls1021a.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
index 2c84ca2..ecf12dc 100644
--- a/arch/arm/boot/dts/ls1021a.dtsi
+++ b/arch/arm/boot/dts/ls1021a.dtsi
@@ -457,6 +457,18 @@
 			reg = <0x0 0x2d24000 0x0 0x4000>;
 		};
 
+		ptp_clock@2d10e00 {
+			compatible = "fsl,etsec-ptp";
+			reg = <0x0 0x2d10e00 0x0 0xb0>;
+			interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
+			fsl,tclk-period = <5>;
+			fsl,tmr-prsc    = <2>;
+			fsl,tmr-add     = <0xaaaaaaab>;
+			fsl,tmr-fiper1  = <999999990>;
+			fsl,tmr-fiper2  = <99990>;
+			fsl,max-adj     = <499999999>;
+		};
+
 		enet0: ethernet@2d10000 {
 			compatible = "fsl,etsec2";
 			device_type = "network";
-- 
2.1.0.27.g96db324

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

* [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32()
  2016-02-22  6:49 [PATCH 0/3] Patchset for gianfar ptp driver Yangbo Lu
  2016-02-22  6:49 ` [PATCH 1/3] ARM: dts: ls1021a: add 1588 timer node Yangbo Lu
@ 2016-02-22  6:49 ` Yangbo Lu
  2016-02-22  8:35   ` Richard Cochran
  2016-02-22  8:50   ` Richard Cochran
  2016-02-22  6:49 ` [PATCH 3/3] gianfar: fix endianness for hardware timestamp Yangbo Lu
  2016-02-22  8:32 ` [PATCH 0/3] Patchset for gianfar ptp driver Richard Cochran
  3 siblings, 2 replies; 15+ messages in thread
From: Yangbo Lu @ 2016-02-22  6:49 UTC (permalink / raw)
  To: netdev, Claudiu Manoil; +Cc: Yangbo Lu

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 drivers/net/ethernet/freescale/gianfar_ptp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c b/drivers/net/ethernet/freescale/gianfar_ptp.c
index b40fba9..a86145c 100644
--- a/drivers/net/ethernet/freescale/gianfar_ptp.c
+++ b/drivers/net/ethernet/freescale/gianfar_ptp.c
@@ -431,7 +431,7 @@ static int get_of_u32(struct device_node *node, char *str, u32 *val)
 
 	if (!prop || plen != sizeof(*prop))
 		return -1;
-	*val = *prop;
+	*val = be32_to_cpu(*prop);
 	return 0;
 }
 
-- 
2.1.0.27.g96db324

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

* [PATCH 3/3] gianfar: fix endianness for hardware timestamp
  2016-02-22  6:49 [PATCH 0/3] Patchset for gianfar ptp driver Yangbo Lu
  2016-02-22  6:49 ` [PATCH 1/3] ARM: dts: ls1021a: add 1588 timer node Yangbo Lu
  2016-02-22  6:49 ` [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32() Yangbo Lu
@ 2016-02-22  6:49 ` Yangbo Lu
  2016-02-22  8:48   ` Richard Cochran
  2016-02-22  8:51   ` Richard Cochran
  2016-02-22  8:32 ` [PATCH 0/3] Patchset for gianfar ptp driver Richard Cochran
  3 siblings, 2 replies; 15+ messages in thread
From: Yangbo Lu @ 2016-02-22  6:49 UTC (permalink / raw)
  To: netdev, Claudiu Manoil; +Cc: Yangbo Lu

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 2aa7b40..20e8648 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -2708,6 +2708,7 @@ static void gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
 			struct skb_shared_hwtstamps shhwtstamps;
 			u64 *ns = (u64 *)(((uintptr_t)skb->data + 0x10) &
 					  ~0x7UL);
+			*ns = be64_to_cpu(*ns);
 
 			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
 			shhwtstamps.hwtstamp = ns_to_ktime(*ns);
@@ -3037,6 +3038,7 @@ static void gfar_process_frame(struct net_device *ndev, struct sk_buff *skb)
 	if (priv->hwts_rx_en) {
 		struct skb_shared_hwtstamps *shhwtstamps = skb_hwtstamps(skb);
 		u64 *ns = (u64 *) skb->data;
+		*ns = be64_to_cpu(*ns);
 
 		memset(shhwtstamps, 0, sizeof(*shhwtstamps));
 		shhwtstamps->hwtstamp = ns_to_ktime(*ns);
-- 
2.1.0.27.g96db324

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

* Re: [PATCH 0/3] Patchset for gianfar ptp driver
  2016-02-22  6:49 [PATCH 0/3] Patchset for gianfar ptp driver Yangbo Lu
                   ` (2 preceding siblings ...)
  2016-02-22  6:49 ` [PATCH 3/3] gianfar: fix endianness for hardware timestamp Yangbo Lu
@ 2016-02-22  8:32 ` Richard Cochran
  2016-02-24  9:21   ` Yangbo Lu
  3 siblings, 1 reply; 15+ messages in thread
From: Richard Cochran @ 2016-02-22  8:32 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: netdev, Claudiu Manoil

On Mon, Feb 22, 2016 at 02:49:30PM +0800, Yangbo Lu wrote:
> This patchset is to enable ptp support for ls1021a platform. The endianness
> issue in gianfar driver and gianfar ptp driver must be fixed, and a 1588
> timer node must be added into dts.

Why have you excluded both the driver author and the PTP maintainer
from CC?

Thanks,
Richard

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

* Re: [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32()
  2016-02-22  6:49 ` [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32() Yangbo Lu
@ 2016-02-22  8:35   ` Richard Cochran
  2016-02-24  9:23     ` Yangbo Lu
  2016-02-22  8:50   ` Richard Cochran
  1 sibling, 1 reply; 15+ messages in thread
From: Richard Cochran @ 2016-02-22  8:35 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: netdev, Claudiu Manoil

On Mon, Feb 22, 2016 at 02:49:32PM +0800, Yangbo Lu wrote:
> @@ -431,7 +431,7 @@ static int get_of_u32(struct device_node *node, char *str, u32 *val)
>  
>  	if (!prop || plen != sizeof(*prop))
>  		return -1;
> -	*val = *prop;
> +	*val = be32_to_cpu(*prop);
>  	return 0;
>  }

Why not simply replace get_of_u32 with the standard helper function,
of_property_read_u32?

Thanks,
Richard

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

* Re: [PATCH 3/3] gianfar: fix endianness for hardware timestamp
  2016-02-22  6:49 ` [PATCH 3/3] gianfar: fix endianness for hardware timestamp Yangbo Lu
@ 2016-02-22  8:48   ` Richard Cochran
  2016-02-24  9:24     ` Yangbo Lu
  2016-02-22  8:51   ` Richard Cochran
  1 sibling, 1 reply; 15+ messages in thread
From: Richard Cochran @ 2016-02-22  8:48 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: netdev, Claudiu Manoil

On Mon, Feb 22, 2016 at 02:49:33PM +0800, Yangbo Lu wrote:
> @@ -2708,6 +2708,7 @@ static void gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
>  			struct skb_shared_hwtstamps shhwtstamps;
>  			u64 *ns = (u64 *)(((uintptr_t)skb->data + 0x10) &
>  					  ~0x7UL);
> +			*ns = be64_to_cpu(*ns);
>  
>  			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
>  			shhwtstamps.hwtstamp = ns_to_ktime(*ns);

There is no point in modifying the buffer data in place.

Instead, do this:

			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
			shhwtstamps.hwtstamp = ns_to_ktime(be64_to_cpu(*ns));

or this:

			u64 ns, *ptr = (u64 *)(((uintptr_t)skb->data + 0x10) &
					       ~0x7UL);
			ns = be64_to_cpu(*ptr);

			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
			shhwtstamps.hwtstamp = ns_to_ktime(ns);

> @@ -3037,6 +3038,7 @@ static void gfar_process_frame(struct net_device *ndev, struct sk_buff *skb)
>  	if (priv->hwts_rx_en) {
>  		struct skb_shared_hwtstamps *shhwtstamps = skb_hwtstamps(skb);
>  		u64 *ns = (u64 *) skb->data;
> +		*ns = be64_to_cpu(*ns);
>  
>  		memset(shhwtstamps, 0, sizeof(*shhwtstamps));
>  		shhwtstamps->hwtstamp = ns_to_ktime(*ns);

Same here.

Thanks,
Richard

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

* Re: [PATCH 1/3] ARM: dts: ls1021a: add 1588 timer node
  2016-02-22  6:49 ` [PATCH 1/3] ARM: dts: ls1021a: add 1588 timer node Yangbo Lu
@ 2016-02-22  8:49   ` Richard Cochran
  2016-02-24  9:24     ` Yangbo Lu
  0 siblings, 1 reply; 15+ messages in thread
From: Richard Cochran @ 2016-02-22  8:49 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: netdev, Claudiu Manoil

On Mon, Feb 22, 2016 at 02:49:31PM +0800, Yangbo Lu wrote:
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Commit message is missing.

Thanks,
Richard

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

* Re: [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32()
  2016-02-22  6:49 ` [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32() Yangbo Lu
  2016-02-22  8:35   ` Richard Cochran
@ 2016-02-22  8:50   ` Richard Cochran
  1 sibling, 0 replies; 15+ messages in thread
From: Richard Cochran @ 2016-02-22  8:50 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: netdev, Claudiu Manoil

On Mon, Feb 22, 2016 at 02:49:32PM +0800, Yangbo Lu wrote:
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Commit message is missing.

Thanks,
Richard

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

* Re: [PATCH 3/3] gianfar: fix endianness for hardware timestamp
  2016-02-22  6:49 ` [PATCH 3/3] gianfar: fix endianness for hardware timestamp Yangbo Lu
  2016-02-22  8:48   ` Richard Cochran
@ 2016-02-22  8:51   ` Richard Cochran
  1 sibling, 0 replies; 15+ messages in thread
From: Richard Cochran @ 2016-02-22  8:51 UTC (permalink / raw)
  To: Yangbo Lu; +Cc: netdev, Claudiu Manoil

On Mon, Feb 22, 2016 at 02:49:33PM +0800, Yangbo Lu wrote:
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>

Commit message is missing.

Thanks,
Richard

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

* RE: [PATCH 0/3] Patchset for gianfar ptp driver
  2016-02-22  8:32 ` [PATCH 0/3] Patchset for gianfar ptp driver Richard Cochran
@ 2016-02-24  9:21   ` Yangbo Lu
  0 siblings, 0 replies; 15+ messages in thread
From: Yangbo Lu @ 2016-02-24  9:21 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev@vger.kernel.org, Claudiu Manoil

> -----Original Message-----
> From: Richard Cochran [mailto:richardcochran@gmail.com]
> Sent: Monday, February 22, 2016 4:33 PM
> To: Yangbo Lu
> Cc: netdev@vger.kernel.org; Claudiu Manoil
> Subject: Re: [PATCH 0/3] Patchset for gianfar ptp driver
> 
> On Mon, Feb 22, 2016 at 02:49:30PM +0800, Yangbo Lu wrote:
> > This patchset is to enable ptp support for ls1021a platform. The
> > endianness issue in gianfar driver and gianfar ptp driver must be
> > fixed, and a 1588 timer node must be added into dts.
> 
> Why have you excluded both the driver author and the PTP maintainer from
> CC?
>
 
[Lu Yangbo-B47093] Sorry for missing some reviewers. I will add them in the later v2 patchset.
Thanks a lot, Richard.

> Thanks,
> Richard

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

* RE: [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32()
  2016-02-22  8:35   ` Richard Cochran
@ 2016-02-24  9:23     ` Yangbo Lu
  0 siblings, 0 replies; 15+ messages in thread
From: Yangbo Lu @ 2016-02-24  9:23 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev@vger.kernel.org, Claudiu Manoil

> -----Original Message-----
> From: Richard Cochran [mailto:richardcochran@gmail.com]
> Sent: Monday, February 22, 2016 4:36 PM
> To: Yangbo Lu
> Cc: netdev@vger.kernel.org; Claudiu Manoil
> Subject: Re: [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32()
> 
> On Mon, Feb 22, 2016 at 02:49:32PM +0800, Yangbo Lu wrote:
> > @@ -431,7 +431,7 @@ static int get_of_u32(struct device_node *node,
> > char *str, u32 *val)
> >
> >  	if (!prop || plen != sizeof(*prop))
> >  		return -1;
> > -	*val = *prop;
> > +	*val = be32_to_cpu(*prop);
> >  	return 0;
> >  }
> 
> Why not simply replace get_of_u32 with the standard helper function,
> of_property_read_u32?

[Lu Yangbo-B47093] Thank you for your suggestion. I even didn't know this function.
Will use it in v2 patchset.

> 
> Thanks,
> Richard

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

* RE: [PATCH 3/3] gianfar: fix endianness for hardware timestamp
  2016-02-22  8:48   ` Richard Cochran
@ 2016-02-24  9:24     ` Yangbo Lu
  2016-02-24 10:14       ` YOSHIFUJI Hideaki
  0 siblings, 1 reply; 15+ messages in thread
From: Yangbo Lu @ 2016-02-24  9:24 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev@vger.kernel.org, Claudiu Manoil

> -----Original Message-----
> From: Richard Cochran [mailto:richardcochran@gmail.com]
> Sent: Monday, February 22, 2016 4:48 PM
> To: Yangbo Lu
> Cc: netdev@vger.kernel.org; Claudiu Manoil
> Subject: Re: [PATCH 3/3] gianfar: fix endianness for hardware timestamp
> 
> On Mon, Feb 22, 2016 at 02:49:33PM +0800, Yangbo Lu wrote:
> > @@ -2708,6 +2708,7 @@ static void gfar_clean_tx_ring(struct
> gfar_priv_tx_q *tx_queue)
> >  			struct skb_shared_hwtstamps shhwtstamps;
> >  			u64 *ns = (u64 *)(((uintptr_t)skb->data + 0x10) &
> >  					  ~0x7UL);
> > +			*ns = be64_to_cpu(*ns);
> >
> >  			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
> >  			shhwtstamps.hwtstamp = ns_to_ktime(*ns);
> 
> There is no point in modifying the buffer data in place.
> 
> Instead, do this:
> 
> 			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
> 			shhwtstamps.hwtstamp = ns_to_ktime(be64_to_cpu(*ns));
> 
> or this:
> 
> 			u64 ns, *ptr = (u64 *)(((uintptr_t)skb->data + 0x10) &
> 					       ~0x7UL);
> 			ns = be64_to_cpu(*ptr);
> 
> 			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
> 			shhwtstamps.hwtstamp = ns_to_ktime(ns);
> 

[Lu Yangbo-B47093] I will modify codes according your suggestion.
Thank you so much!
 
> > @@ -3037,6 +3038,7 @@ static void gfar_process_frame(struct net_device
> *ndev, struct sk_buff *skb)
> >  	if (priv->hwts_rx_en) {
> >  		struct skb_shared_hwtstamps *shhwtstamps = skb_hwtstamps(skb);
> >  		u64 *ns = (u64 *) skb->data;
> > +		*ns = be64_to_cpu(*ns);
> >
> >  		memset(shhwtstamps, 0, sizeof(*shhwtstamps));
> >  		shhwtstamps->hwtstamp = ns_to_ktime(*ns);
> 
> Same here.
> 
> Thanks,
> Richard

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

* RE: [PATCH 1/3] ARM: dts: ls1021a: add 1588 timer node
  2016-02-22  8:49   ` Richard Cochran
@ 2016-02-24  9:24     ` Yangbo Lu
  0 siblings, 0 replies; 15+ messages in thread
From: Yangbo Lu @ 2016-02-24  9:24 UTC (permalink / raw)
  To: Richard Cochran; +Cc: netdev@vger.kernel.org, Claudiu Manoil

> -----Original Message-----
> From: Richard Cochran [mailto:richardcochran@gmail.com]
> Sent: Monday, February 22, 2016 4:50 PM
> To: Yangbo Lu
> Cc: netdev@vger.kernel.org; Claudiu Manoil
> Subject: Re: [PATCH 1/3] ARM: dts: ls1021a: add 1588 timer node
> 
> On Mon, Feb 22, 2016 at 02:49:31PM +0800, Yangbo Lu wrote:
> > Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> 
> Commit message is missing.

[Lu Yangbo-B47093] I will add commit messages for each patch.
Thanks a lot, Richard.

> 
> Thanks,
> Richard

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

* Re: [PATCH 3/3] gianfar: fix endianness for hardware timestamp
  2016-02-24  9:24     ` Yangbo Lu
@ 2016-02-24 10:14       ` YOSHIFUJI Hideaki
  0 siblings, 0 replies; 15+ messages in thread
From: YOSHIFUJI Hideaki @ 2016-02-24 10:14 UTC (permalink / raw)
  To: Yangbo Lu, Richard Cochran
  Cc: hideaki.yoshifuji, netdev@vger.kernel.org, Claudiu Manoil

Hi,

Yangbo Lu wrote:
>> -----Original Message-----
>> From: Richard Cochran [mailto:richardcochran@gmail.com]
>> Sent: Monday, February 22, 2016 4:48 PM
>> To: Yangbo Lu
>> Cc: netdev@vger.kernel.org; Claudiu Manoil
>> Subject: Re: [PATCH 3/3] gianfar: fix endianness for hardware timestamp
>>
>> On Mon, Feb 22, 2016 at 02:49:33PM +0800, Yangbo Lu wrote:
>>> @@ -2708,6 +2708,7 @@ static void gfar_clean_tx_ring(struct
>> gfar_priv_tx_q *tx_queue)
>>>  			struct skb_shared_hwtstamps shhwtstamps;
>>>  			u64 *ns = (u64 *)(((uintptr_t)skb->data + 0x10) &
>>>  					  ~0x7UL);
>>> +			*ns = be64_to_cpu(*ns);
>>>
>>>  			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
>>>  			shhwtstamps.hwtstamp = ns_to_ktime(*ns);
>>
>> There is no point in modifying the buffer data in place.
>>
>> Instead, do this:
>>
>> 			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
>> 			shhwtstamps.hwtstamp = ns_to_ktime(be64_to_cpu(*ns));
>>
>> or this:
>>
>> 			u64 ns, *ptr = (u64 *)(((uintptr_t)skb->data + 0x10) &
>> 					       ~0x7UL);
>> 			ns = be64_to_cpu(*ptr);
>>
>> 			memset(&shhwtstamps, 0, sizeof(shhwtstamps));
>> 			shhwtstamps.hwtstamp = ns_to_ktime(ns);
>>
> 
> [Lu Yangbo-B47093] I will modify codes according your suggestion.
> Thank you so much!

You may want to use PTR_ALIGN() and be64_to_cpup() here.

--yoshfuji

>  
>>> @@ -3037,6 +3038,7 @@ static void gfar_process_frame(struct net_device
>> *ndev, struct sk_buff *skb)
>>>  	if (priv->hwts_rx_en) {
>>>  		struct skb_shared_hwtstamps *shhwtstamps = skb_hwtstamps(skb);
>>>  		u64 *ns = (u64 *) skb->data;
>>> +		*ns = be64_to_cpu(*ns);
>>>
>>>  		memset(shhwtstamps, 0, sizeof(*shhwtstamps));
>>>  		shhwtstamps->hwtstamp = ns_to_ktime(*ns);
>>
>> Same here.
>>
>> Thanks,
>> Richard

-- 
Hideaki Yoshifuji <hideaki.yoshifuji@miraclelinux.com>
Technical Division, MIRACLE LINUX CORPORATION

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

end of thread, other threads:[~2016-02-24 10:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22  6:49 [PATCH 0/3] Patchset for gianfar ptp driver Yangbo Lu
2016-02-22  6:49 ` [PATCH 1/3] ARM: dts: ls1021a: add 1588 timer node Yangbo Lu
2016-02-22  8:49   ` Richard Cochran
2016-02-24  9:24     ` Yangbo Lu
2016-02-22  6:49 ` [PATCH 2/3] gianfar_ptp: fix endianness in get_of_u32() Yangbo Lu
2016-02-22  8:35   ` Richard Cochran
2016-02-24  9:23     ` Yangbo Lu
2016-02-22  8:50   ` Richard Cochran
2016-02-22  6:49 ` [PATCH 3/3] gianfar: fix endianness for hardware timestamp Yangbo Lu
2016-02-22  8:48   ` Richard Cochran
2016-02-24  9:24     ` Yangbo Lu
2016-02-24 10:14       ` YOSHIFUJI Hideaki
2016-02-22  8:51   ` Richard Cochran
2016-02-22  8:32 ` [PATCH 0/3] Patchset for gianfar ptp driver Richard Cochran
2016-02-24  9:21   ` Yangbo Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).