linux/drivers/net/ethernet
Yunsheng Lin 5f543a54ee net: hns3: fix for not calculating tx bd num correctly
When there is only one byte in a frag, the current calculation
using "(size + HNS3_MAX_BD_SIZE - 1) >> HNS3_MAX_BD_SIZE_OFFSET"
will return zero, because HNS3_MAX_BD_SIZE is 65535 and
HNS3_MAX_BD_SIZE_OFFSET is 16. So it will cause tx error when
a frag's size is one byte.

This patch fixes it by using DIV_ROUND_UP.

Fixes: 3fe13ed95d ("net: hns3: avoid mult + div op in critical data path")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-21 13:59:24 -07:00
..
3com 3c515: fix integer overflow warning 2019-03-19 15:07:49 -07:00
8390 mac8390: Fix mmio access size probe 2019-03-18 16:56:57 -07:00
adaptec net: adaptec: starfire: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:15 -05:00
aeroflex
agere
alacritech
allwinner
alteon net: alteon: replace dev_kfree_skb_irq by dev_consume_skb_irq 2019-01-28 23:09:19 -08:00
altera net: altera_tse: fix msgdma_tx_completion on non-zero fill_level case 2019-01-27 10:39:07 -08:00
amazon net: ena: update driver version from 2.0.2 to 2.0.3 2019-02-12 14:05:07 -05:00
amd net: amd: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 11:56:36 -05:00
apm
apple net: apple: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:42 -08:00
aquantia net: aquantia: fix rx checksum offload for UDP/TCP over IPv6 2019-03-18 16:59:35 -07:00
arc net: arc_emac: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:15 -05:00
atheros Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-24 12:06:19 -08:00
aurora
broadcom 5.1 Merge Window Pull Request 2019-03-09 15:53:03 -08:00
brocade bna: fix indentation issue on call to bfa_ioc_pf_failed 2019-02-02 20:14:38 -08:00
cadence net: macb: Add null check for PCLK and HCLK 2019-03-21 13:22:41 -07:00
calxeda
cavium net: thunder: fix a potential NULL pointer dereference 2019-03-11 13:34:31 -07:00
chelsio 5.1 Merge Window Pull Request 2019-03-09 15:53:03 -08:00
cirrus
cisco enic: fix build warning without CONFIG_CPUMASK_OFFSTACK 2019-03-07 09:41:08 -08:00
cortina
davicom
dec Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
dlink net:dl2k: Replace dev_kfree_skb_irq by dev_consume_skb_irq 2019-02-14 12:25:24 -05:00
emulex benet: remove broken and unused macro 2019-01-28 10:56:01 -08:00
ezchip
faraday drivers: net: Remove unnecessary semicolon 2019-03-01 23:13:49 -08:00
freescale dpaa2-eth: Fix possible access beyond end of array 2019-03-20 16:28:13 -07:00
fujitsu net: fujitsu: fix a potential NULL pointer dereference 2019-03-12 14:48:35 -07:00
hisilicon net: hns3: fix for not calculating tx bd num correctly 2019-03-21 13:59:24 -07:00
hp
huawei hinic: Add pci device ids 2019-01-22 14:54:08 -08:00
i825xx net: i825xx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:14 -05:00
ibm net: emac: remove IBM_EMAC_RX_SKB_HEADROOM 2019-02-06 19:50:41 -08:00
intel mm: replace all open encodings for NUMA_NO_NODE 2019-03-05 21:07:14 -08:00
marvell sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79 2019-03-04 11:31:25 -08:00
mediatek drivers: net: Remove unnecessary semicolon 2019-03-01 23:13:49 -08:00
mellanox mlxsw: core: mlxsw: core: avoid -Wint-in-bool-context warning 2019-03-19 13:26:03 -07:00
micrel net: ks8851: Deduplicate register macros 2019-03-20 12:43:52 -07:00
microchip lan743x: Fix TX Stall Issue 2019-03-13 13:41:46 -07:00
moxa net: moxa: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:42 -08:00
mscc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-03-04 13:26:15 -08:00
myricom net: myri10ge: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 11:56:36 -05:00
natsemi net: ns83820: code cleanup for ns83820_probe_phy() 2019-02-19 14:08:19 -08:00
neterion net: neterion: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:41 -08:00
netronome nfp: fix simple vNIC mailbox length 2019-03-07 11:00:21 -08:00
ni net: nixge: Add support for fixed-link configurations 2019-02-05 10:34:34 -08:00
nuvoton net: nuvoton: w90p910_ether: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 11:56:36 -05:00
nvidia
nxp
oki-semi pci-v5.1-changes 2019-03-09 14:57:08 -08:00
packetengines net: packetengines: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:15 -05:00
pasemi net: pasemi: set a 64-bit DMA mask on the DMA device 2019-02-18 22:41:01 +11:00
qlogic qlcnic: Avoid potential NULL pointer dereference 2019-03-15 11:55:53 -07:00
qualcomm net: qualcomm: emac: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:42 -08:00
rdc
realtek drivers: net: atp: fix various indentation issues 2019-03-15 11:58:17 -07:00
renesas net: sh_eth: fix a missing check of of_get_phy_mode 2019-03-12 14:51:02 -07:00
rocker net: rocker: fix a potential NULL pointer dereference 2019-03-11 16:17:31 -07:00
samsung
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-15 12:38:38 -08:00
sgi net: sgi: use GFP_ATOMIC under spin lock 2019-02-17 15:51:46 -08:00
silan
sis net: sis900: fix indentation issues, remove some spaces 2019-03-15 11:59:00 -07:00
smsc smc911x: pass struct device to DMA API functions 2019-02-12 12:09:24 -05:00
socionext
stmicro net: stmmac: fix memory corruption with large MTUs 2019-03-19 13:30:30 -07:00
sun net: ethernet: sun: Zero initialize class in default case in niu_add_ethtool_tcam_entry 2019-03-08 15:26:21 -08:00
synopsys
tehuti net: tehuti: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-03-11 08:54:01 -07:00
toshiba
tundra
via net: via-velocity: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-06 17:38:15 -08:00
wiznet
xilinx net: xilinx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 12:43:15 -05:00
xircom
xscale net: ixp4xx_eth: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:54 -08:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c net: fealnx: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-13 20:50:42 -08:00
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c lantiq_etop: pass struct device to DMA API functions 2019-02-12 12:09:23 -05:00
lantiq_xrx200.c net: lantiq: Do not use eth_change_mtu() 2019-02-24 17:35:42 -08:00
Makefile
netx-eth.c