Original 3.5.7 with Adeos/i-pipe patch. x86 (32-bit).

I also tested the particular code snippet separately on 64-bit. Same
result. Problem is that the result of a multplication of 32-bit numbers is
also a 32-bit number before it is cast to u64 (uint64_t), causing the
entire second fraction of ns to become 0.

J.



On Wed, Apr 17, 2013 at 10:31 PM, Allan, Bruce W <[email protected]>wrote:

> > -----Original Message-----
> > From: Jeroen Van den Keybus
> > [mailto:[email protected]]
> > Sent: Wednesday, April 17, 2013 11:43 AM
> > To: [email protected]
> > Subject: [E1000-devel] e1000e_phc_settime() not working correctly
> >
> > Hi,
> >
> > I found that I was unable to set the PHC using Linux
> > /Documentation/ptp/ptptest.c. Apparently a cast is missing in
> > e1000e_phc_settime(). See patch below.
> >
> > J.
> >
> > --- e1000e-2.3.2/src/ptp.c      2013-02-28 04:25:36.000000000 +0000
> > +++ ../e1000e-2.3.2/src/ptp.c   2013-04-17 14:23:22.000000000 +0000
> > @@ -145,7 +145,7 @@ static int e1000e_phc_settime(struct ptp
> >         unsigned long flags;
> >         u64 ns;
> >
> > -       ns = ts->tv_sec * NSEC_PER_SEC;
> > +       ns = (u64)ts->tv_sec * NSEC_PER_SEC;
> >         ns += ts->tv_nsec;
> >
> >         /* reset the timecounter */
>
> For clarity, on what arch and kernel are you experiencing the problem?
>
>
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to