Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cxgb4: fix 64-bit division on i386

Fix following compile error on i386 architecture.

ERROR: "__udivdi3" [drivers/net/ethernet/chelsio/cxgb4/cxgb4.ko] undefined!

Fixes: 0e395b3cb1fb ("cxgb4: add FLOWC based QoS offload")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Rahul Lakkireddy and committed by
David S. Miller
97c20ea8 5bd2ce6a

+2 -2
+2 -2
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
··· 307 307 p.u.params.channel = pi->tx_chan; 308 308 for (i = 0; i < mqprio->qopt.num_tc; i++) { 309 309 /* Convert from bytes per second to Kbps */ 310 - p.u.params.minrate = mqprio->min_rate[i] * 8 / 1000; 311 - p.u.params.maxrate = mqprio->max_rate[i] * 8 / 1000; 310 + p.u.params.minrate = div_u64(mqprio->min_rate[i] * 8, 1000); 311 + p.u.params.maxrate = div_u64(mqprio->max_rate[i] * 8, 1000); 312 312 313 313 e = cxgb4_sched_class_alloc(dev, &p); 314 314 if (!e) {