Skip to contentSkip to conversation

dm9601: Fix receive MTU

PATCH In review Peter Korsgaard 2 participants 3 messages Oct 1, 2007 – Oct 2, 2007

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm9601: Fix receive MTU

Please apply to 2.6.23.
---
dm9601 didn't take the ethernet header into account when calculating RX MTU, causing packets bigger than 1486 to fail.

---
 drivers/net/usb/dm9601.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/dm9601.c +1 -1
Index: linux-2.6.23-rc8/drivers/net/usb/dm9601.c
===================================================================
@@ -405,7 +405,7 @@
 	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 + DM_RX_OVERHEAD;
+	dev->rx_urb_size = dev->net->mtu + ETH_HLEN + DM_RX_OVERHEAD;
 
 	dev->mii.dev = dev->net;
 	dev->mii.mdio_read = dm9601_mdio_read;
Signature · 1 line
Bye, Peter Korsgaard
#1 lore raw
Quoted 15 lines · Peter Korsgaard

Please apply to 2.6.23.
---
dm9601 didn't take the ethernet header into account when calculating RX MTU, causing packets bigger than 1486 to fail.

---
 drivers/net/usb/dm9601.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.23-rc8/drivers/net/usb/dm9601.c
===================================================================

drivers/net/usb/dm9601.c line 408

Quoted 5 lines
drivers/net/usb/dm9601.c +1 -1
@@ -405,7 +405,7 @@
 	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 + DM_RX_OVERHEAD;
+	dev->rx_urb_size = dev->net->mtu + ETH_HLEN + DM_RX_OVERHEAD;

applied. in the future, please note (and avoid) a patch formatting error. As noted in #14 of Documentation/SubmittingPatches, any comments on the patch like "Please apply to 2.6.23" should go AFTER the patch description and "---" separator.

Without hand editing, the normal tools everybody uses for importing patches would delete your "dm9601 didn't take the ethernet header..." description, leaving only the "Please apply to 2.6.23." part and nothing else.

I did the hand-editing, but please try to follow the standard patch format in the future.

#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Jeff" == Jeff Garzik <[email protected]> writes:

Hi,

Jeff> applied. in the future, please note (and avoid) a patch formatting Jeff> error. As noted in #14 of Documentation/SubmittingPatches, any Jeff> comments on the patch like "Please apply to 2.6.23" should go AFTER Jeff> the patch description and "---" separator.

Sorry about that - And thanks!

Signature · 1 line
Bye, Peter Korsgaard