summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2014-06-18 14:21:24 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-28 08:05:59 -0700
commit71dd984cd40c7baf1c61a2b515f7f1a811ff87f3 (patch)
treefdb595e6dfb59d405944a4fb03bde0727492fbaa /net/core
parent73035bc31e9d63e6e4004bb31d4534e9c755ac30 (diff)
downloadlinux-stable-71dd984cd40c7baf1c61a2b515f7f1a811ff87f3.tar.gz
linux-stable-71dd984cd40c7baf1c61a2b515f7f1a811ff87f3.tar.bz2
linux-stable-71dd984cd40c7baf1c61a2b515f7f1a811ff87f3.zip
net: huawei_cdc_ncm: increase command buffer size
[ Upstream commit 3acc74619b0175b7a154cf8dc54813f6faf97aa9 ] Messages from the modem exceeding 256 bytes cause communication failure. The WDM protocol is strictly "read on demand", meaning that we only poll for unread data after receiving a notification from the modem. Since we have no way to know how much data the modem has to send, we must make sure that the buffer we provide is "big enough". Message truncation does not work. Truncated messages are left unread until the modem has another message to send. Which often won't happen until the userspace application has given up waiting for the final part of the last message, and therefore sends another command. With a proper CDC WDM function there is a descriptor telling us which buffer size the modem uses. But with this vendor specific implementation there is no known way to calculate the exact "big enough" number. It is an unknown property of the modem firmware. Experience has shown that 256 is too small. The discussion of this failure ended up concluding that 512 might be too small as well. So 1024 seems like a reasonable value for now. Fixes: 41c47d8cfd68 ("net: huawei_cdc_ncm: Introduce the huawei_cdc_ncm driver") Cc: Enrico Mioso <mrkiko.rs@gmail.com> Reported-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-By: Enrico Mioso <mrkiko.rs@gmail.com> Tested-by: Dan Williams <dcbw@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions