[PATCH v2 3/3] tty: hvc: hvc_write() fix break condition

2018-09-08 Thread Nicholas Piggin
Commit 550ddadcc758 ("tty: hvc: hvc_write() may sleep") broke the termination condition in case the driver stops accepting characters. This can result in unnecessary polling of the busy driver. Restore it by testing the hvc_push return code. Tested-by: Matteo Croce Tested-by: Jason Gunthorpe

[PATCH v2 2/3] tty: hvc: hvc_poll() fix read loop batching

2018-09-08 Thread Nicholas Piggin
Commit ec97eaad1383 ("tty: hvc: hvc_poll() break hv read loop") removes get_chars batching entirely, which slows down large console operations like paste -- virtio console "feels worse than a 9600 baud serial line," reports Matteo. This adds back batching in a more latency friendly way. If the

[PATCH v2 1/3] tty: hvc: hvc_poll() fix read loop hang

2018-09-08 Thread Nicholas Piggin
Commit ec97eaad1383 ("tty: hvc: hvc_poll() break hv read loop") causes the virtio console to hang at times (e.g., if you paste a bunch of characters to it. The reason is that get_chars must return 0 before we can be sure the driver will kick or poll input again, but this change only scheduled a

[PATCH v2 0/3] tty: hvc: latency break regression fixes

2018-09-08 Thread Nicholas Piggin
Re-sending this one with the used-uinitialized warning in patch 3 fixed. Greg these patches are needed to fix regressions in this merge window, please consider them for your tty tree. Thanks, Nick Nicholas Piggin (3): tty: hvc: hvc_poll() fix read loop hang tty: hvc: hvc_poll() fix read

Re: [PATCH net] powerpc: use big endian to hash len and proto in csum_ipv6_magic

2018-09-08 Thread LEROY Christophe
Xin Long a écrit : The function csum_ipv6_magic doesn't convert len and proto to big endian before doing ipv6 csum hash, which is not consistent with RFC and other arches. Jianlin found it when ICMPv6 packets from other hosts were dropped in the powerpc64 system. This patch is to fix it by

[PATCH net] powerpc: use big endian to hash len and proto in csum_ipv6_magic

2018-09-08 Thread Xin Long
The function csum_ipv6_magic doesn't convert len and proto to big endian before doing ipv6 csum hash, which is not consistent with RFC and other arches. Jianlin found it when ICMPv6 packets from other hosts were dropped in the powerpc64 system. This patch is to fix it by using instruction