linux/drivers/net/ethernet/broadcom/bnx2x
Andy Shevchenko dd3e7cba16 ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use
There are users already and will be more of BITS_TO_BYTES() macro.  Move
it to bitops.h for wider use.

In the case of ocfs2 the replacement is identical.

As for bnx2x, there are two places where floor version is used.  In the
first case to calculate the amount of structures that can fit one memory
page.  In this case obviously the ceiling variant is correct and
original code might have a potential bug, if amount of bits % 8 is not
0.  In the second case the macro is used to calculate bytes transmitted
in one microsecond.  This will work for all speeds which is multiply of
1Gbps without any change, for the rest new code will give ceiling value,
for instance 100Mbps will give 13 bytes, while old code gives 12 bytes
and the arithmetically correct one is 12.5 bytes.  Further the value is
used to setup timer threshold which in any case has its own margins due
to certain resolution.  I don't see here an issue with slightly shifting
thresholds for low speed connections, the card is supposed to utilize
highest available rate, which is usually 10Gbps.

Link: http://lkml.kernel.org/r/20200108121316.22411-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Acked-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-01-31 10:30:36 -08:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
bnx2x.h bnx2x: Bump up driver version to 1.713.36 2019-01-22 21:02:00 -08:00
bnx2x_cmn.c netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
bnx2x_cmn.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-22 15:15:05 -08:00
bnx2x_dcb.c
bnx2x_dcb.h
bnx2x_dump.h
bnx2x_ethtool.c bnx2x: Prevent ptp_task to be rescheduled indefinitely 2019-06-29 12:19:42 -07:00
bnx2x_fw_defs.h bnx2x: Utilize FW 7.13.15.0. 2019-11-05 18:25:14 -08:00
bnx2x_fw_file_hdr.h
bnx2x_hsi.h bnx2x: Utilize FW 7.13.15.0. 2019-11-05 18:25:14 -08:00
bnx2x_init.h ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use 2020-01-31 10:30:36 -08:00
bnx2x_init_ops.h
bnx2x_link.c bnx2x: Remove hw_reset_t function casts 2019-11-16 12:50:57 -08:00
bnx2x_link.h bnx2x: Remove format_fw_ver_t function casts 2019-11-16 12:50:57 -08:00
bnx2x_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-01-28 16:02:33 -08:00
bnx2x_mfw_req.h
bnx2x_reg.h bnx2x: Fix 84833 phy command handler 2016-02-21 22:50:55 -05:00
bnx2x_sp.c drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
bnx2x_sp.h bnx2x: Fix accounting of vlan resources among the PFs 2019-12-26 15:27:14 -08:00
bnx2x_sriov.c bnx2x: Fix PF-VF communication over multi-cos queues. 2019-11-05 18:25:14 -08:00
bnx2x_sriov.h bnx2x: Do not handle requests from VFs after parity 2019-12-14 12:59:16 -08:00
bnx2x_stats.c
bnx2x_stats.h bnx2x: Prevent ptp_task to be rescheduled indefinitely 2019-06-29 12:19:42 -07:00
bnx2x_vfpf.c bnx2x: Do not handle requests from VFs after parity 2019-12-14 12:59:16 -08:00
bnx2x_vfpf.h