summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPeter Korsgaard <peter@korsgaard.com>2013-12-16 11:35:33 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 12:24:22 -0800
commit1552c3d8e10d1113d55237f3dd0d65c0a3501632 (patch)
tree89cee2f4a8ca9fb42f5640716de505718019c9c8 /drivers
parent84395b85636ec02316b499c2e97185ffa83afc0e (diff)
downloadlinux-stable-1552c3d8e10d1113d55237f3dd0d65c0a3501632.tar.gz
linux-stable-1552c3d8e10d1113d55237f3dd0d65c0a3501632.tar.bz2
linux-stable-1552c3d8e10d1113d55237f3dd0d65c0a3501632.zip
dm9601: fix reception of full size ethernet frames on dm9620/dm9621a
commit 407900cfb54bdb2cfa228010b6697305f66b2948 upstream. dm9620/dm9621a require room for 4 byte padding even in dm9601 (3 byte header) mode. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/dm9601.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index c6867f926cff..732a926e3f51 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -364,7 +364,12 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
dev->net->ethtool_ops = &dm9601_ethtool_ops;
dev->net->hard_header_len += DM_TX_OVERHEAD;
dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
- dev->rx_urb_size = dev->net->mtu + ETH_HLEN + DM_RX_OVERHEAD;
+
+ /* dm9620/21a require room for 4 byte padding, even in dm9601
+ * mode, so we need +1 to be able to receive full size
+ * ethernet frames.
+ */
+ dev->rx_urb_size = dev->net->mtu + ETH_HLEN + DM_RX_OVERHEAD + 1;
dev->mii.dev = dev->net;
dev->mii.mdio_read = dm9601_mdio_read;