* [PATCH] net: usb: smsc75xx: fix mtu
@ 2012-04-15 21:38 Stephane Fillod
2012-04-17 3:54 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephane Fillod @ 2012-04-15 21:38 UTC (permalink / raw)
To: netdev; +Cc: steve.glendinning
Make smsc75xx recalculate the hard_mtu after adjusting the
hard_header_len.
Without this, usbnet adjusts the MTU down to 1492 bytes, and the host is
unable to receive standard 1500-byte frames from the device.
Inspired by same fix on cdc_eem 78fb72f7936c01d5b426c03a691eca082b03f2b9.
Tested on ARM/Omap3 with EVB-LAN7500-LC.
Signed-off-by: Stephane Fillod <fillods@users.sf.net>
---
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -1049,6 +1049,7 @@
dev->net->ethtool_ops = &smsc75xx_ethtool_ops;
dev->net->flags |= IFF_MULTICAST;
dev->net->hard_header_len += SMSC75XX_TX_OVERHEAD;
+ dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net: usb: smsc75xx: fix mtu
2012-04-15 21:38 [PATCH] net: usb: smsc75xx: fix mtu Stephane Fillod
@ 2012-04-17 3:54 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-04-17 3:54 UTC (permalink / raw)
To: fillods; +Cc: netdev, steve.glendinning
From: Stephane Fillod <fillods@users.sf.net>
Date: Sun, 15 Apr 2012 23:38:29 +0200
> Make smsc75xx recalculate the hard_mtu after adjusting the
> hard_header_len.
>
> Without this, usbnet adjusts the MTU down to 1492 bytes, and the host is
> unable to receive standard 1500-byte frames from the device.
>
> Inspired by same fix on cdc_eem 78fb72f7936c01d5b426c03a691eca082b03f2b9.
>
> Tested on ARM/Omap3 with EVB-LAN7500-LC.
>
> Signed-off-by: Stephane Fillod <fillods@users.sf.net>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-17 3:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-15 21:38 [PATCH] net: usb: smsc75xx: fix mtu Stephane Fillod
2012-04-17 3:54 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).