summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hip04_eth.c
Commit message (Collapse)AuthorAgeFilesLines
* hip04_eth: fix missing error handle for build_skb failedwangweidong2016-01-131-1/+4
| | | | | | | | when build_skb failed, we should goto refill the buffer. Signed-off-by: Weidong Wang <wangweidong1@huawei.com> Acked-by: Ding Tainhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: hisilicon: fix handling platform_get_irq resultAndrzej Hajda2015-09-271-1/+1
| | | | | | | | | | | | The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: Drop owner assignment from platform_driverKrzysztof Kozlowski2015-07-111-1/+0Star
| | | | | | | | platform_driver does not need to set an owner because platform_driver_register() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hisilicon: Replace put_page(virt_to_head_page()) with skb_free_frag()Alexander Duyck2015-05-121-1/+1
| | | | | Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: hip04: Make tx coalesce timer actually workThomas Gleixner2015-04-151-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | The code sets the expiry value of the timer to a relative value and starts it with hrtimer_start_expires. That's fine, but that only works once. The timer is started in relative mode, so the expiry value gets overwritten with the absolut expiry time (now + expiry). So once the timer expired, a new call to hrtimer_start_expires results in an immidiately expired timer, because the expiry value is already in the past. Use the proper mechanisms to (re)start the timer in the intended way. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: dingtianhong <dingtianhong@huawei.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Zhangfei Gao <zhangfei.gao@linaro.org> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: netdev@vger.kernel.org Acked-by: Ding Tianhong <dingtianhong@huawei.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: hip04: add missing MODULE_LICENSEArnd Bergmann2015-02-031-0/+1
| | | | | | | | | | | | | | The hip04 ethernet driver causes a new compile-time warning when built as a loadable module: WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/hisilicon/hip04_eth.o see include/linux/module.h for more information This adds the license as "GPL", which matches the header of the file. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* hisilicon: add some missing curly bracesDan Carpenter2015-01-291-1/+2
| | | | | | | | The if block was supposed to have curly braces. In the current code we complain about dropped rx packets when we shouldn't. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: hisilicon: new hip04 ethernet driverdingtianhong2015-01-141-0/+969
Support Hisilicon hip04 ethernet driver, including 100M / 1000M controller. The controller has no tx done interrupt, reclaim xmitted buffer in the poll. v13: Fix the problem of alignment parameters for function and checkpatch warming. v12: According Alex's suggestion, modify the changelog and add MODULE_DEVICE_TABLE for hip04 ethernet. v11: Add ethtool support for tx coalecse getting and setting, the xmit_more is not supported for this patch, but I think it could work for hip04, will support it later after some tests for performance better. Here are some performance test results by ping and iperf(add tx_coalesce_frames/users), it looks that the performance and latency is more better by tx_coalesce_frames/usecs. - Before: $ ping 192.168.1.1 ... === 192.168.1.1 ping statistics === 24 packets transmitted, 24 received, 0% packet loss, time 22999ms rtt min/avg/max/mdev = 0.180/0.202/0.403/0.043 ms $ iperf -c 192.168.1.1 ... [ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 115 MBytes 945 Mbits/sec - After: $ ping 192.168.1.1 ... === 192.168.1.1 ping statistics === 24 packets transmitted, 24 received, 0% packet loss, time 22999ms rtt min/avg/max/mdev = 0.178/0.190/0.380/0.041 ms $ iperf -c 192.168.1.1 ... [ ID] Interval Transfer Bandwidth [ 3] 0.0- 1.0 sec 115 MBytes 965 Mbits/sec v10: According David Miller and Arnd Bergmann's suggestion, add some modification for v9 version - drop the workqueue - batch cleanup based on tx_coalesce_frames/usecs for better throughput - use a reasonable default tx timeout (200us, could be shorted based on measurements) with a range timer - fix napi poll function return value - use a lockless queue for cleanup Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>