diff mbox

linux-next: Tree for Apr 30 (netdev: mellanox/mlx4)

Message ID 1367350578.11020.4.camel@edumazet-glaptop
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet April 30, 2013, 7:36 p.m. UTC
On Tue, 2013-04-30 at 11:58 -0700, Randy Dunlap wrote:
> On 04/29/13 23:57, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Please do not add any v3.11 destined work to your linux-next included
> > branches until after v3.10-rc1 is released.
> > 
> > Changes since 20130429:
> > 
> 
> on i386:
> 
> ERROR: "__udivdi3" [drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko] undefined!
> 
> 

Could you try the following patch/fix ?



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Randy Dunlap April 30, 2013, 8:39 p.m. UTC | #1
On 04/30/13 12:36, Eric Dumazet wrote:
> On Tue, 2013-04-30 at 11:58 -0700, Randy Dunlap wrote:
>> On 04/29/13 23:57, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Please do not add any v3.11 destined work to your linux-next included
>>> branches until after v3.10-rc1 is released.
>>>
>>> Changes since 20130429:
>>>
>>
>> on i386:
>>
>> ERROR: "__udivdi3" [drivers/net/ethernet/mellanox/mlx4/mlx4_en.ko] undefined!
>>
>>
> 
> Could you try the following patch/fix ?

Yes, that fixes it.  Thanks.

Acked-by: Randy Dunlap <rdunlap@infradead.org>


> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_clock.c b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
> index 2f18121..fd64410 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_clock.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
> @@ -114,6 +114,7 @@ void mlx4_en_fill_hwtstamps(struct mlx4_en_dev *mdev,
>  void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev)
>  {
>  	struct mlx4_dev *dev = mdev->dev;
> +	u64 ns;
>  
>  	memset(&mdev->cycles, 0, sizeof(mdev->cycles));
>  	mdev->cycles.read = mlx4_en_read_clock;
> @@ -133,10 +134,9 @@ void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev)
>  	/* Calculate period in seconds to call the overflow watchdog - to make
>  	 * sure counter is checked at least once every wrap around.
>  	 */
> -	mdev->overflow_period =
> -		(cyclecounter_cyc2ns(&mdev->cycles,
> -				    mdev->cycles.mask) / NSEC_PER_SEC / 2)
> -		* HZ;
> +	ns = cyclecounter_cyc2ns(&mdev->cycles, mdev->cycles.mask);
> +	do_div(ns, NSEC_PER_SEC / 2 / HZ);
> +	mdev->overflow_period = ns;
>  }
>  
>  void mlx4_en_ptp_overflow_check(struct mlx4_en_dev *mdev)
> 
> 
> --
Eric Dumazet April 30, 2013, 8:47 p.m. UTC | #2
On Tue, 2013-04-30 at 13:39 -0700, Randy Dunlap wrote:

> Yes, that fixes it.  Thanks.
> 
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
> 

Thanks, I'll send the official patch in a couple of minutes.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_clock.c b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
index 2f18121..fd64410 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_clock.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_clock.c
@@ -114,6 +114,7 @@  void mlx4_en_fill_hwtstamps(struct mlx4_en_dev *mdev,
 void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev)
 {
 	struct mlx4_dev *dev = mdev->dev;
+	u64 ns;
 
 	memset(&mdev->cycles, 0, sizeof(mdev->cycles));
 	mdev->cycles.read = mlx4_en_read_clock;
@@ -133,10 +134,9 @@  void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev)
 	/* Calculate period in seconds to call the overflow watchdog - to make
 	 * sure counter is checked at least once every wrap around.
 	 */
-	mdev->overflow_period =
-		(cyclecounter_cyc2ns(&mdev->cycles,
-				    mdev->cycles.mask) / NSEC_PER_SEC / 2)
-		* HZ;
+	ns = cyclecounter_cyc2ns(&mdev->cycles, mdev->cycles.mask);
+	do_div(ns, NSEC_PER_SEC / 2 / HZ);
+	mdev->overflow_period = ns;
 }
 
 void mlx4_en_ptp_overflow_check(struct mlx4_en_dev *mdev)