Skip to content

Commit

Permalink
dm9601: fix reception of full size ethernet frames on dm9620/dm9621a
Browse files Browse the repository at this point in the history
dm9620/dm9621a require room for 4 byte padding even in dm9601 (3 byte
header) mode.

Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Peter Korsgaard authored and David S. Miller committed Dec 18, 2013
1 parent 3b38789 commit 407900c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/usb/dm9601.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 407900c

Please sign in to comment.