From: zzc Date: Wed, 24 May 2017 00:49:08 +0000 (+0800) Subject: net: usb: modify rx_urb_size size for dm9601 X-Git-Tag: release-20171130_firefly~4^2~528 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f1c3909db231b8d6e81f06cc2c3535aa718e168a;p=firefly-linux-kernel-4.4.55.git net: usb: modify rx_urb_size size for dm9601 fix error: [ 103.825058] DWC_OTG Transfer buffer length less than actual buffer lengthactual_length 1536 , buffer_length 1522 urb->complete rx_complete+0x0/0x1cc [ 103.839742] skbuff: skb_over_panic: text:ffffff80086e1f74 len:1536 put:1536 head:ffffffc06118da80 data:ffffffc06118dac2 tail:0x642 end:0x640 dev:eth0 [ 103.839960] ------------[ cut here ]------------ [ 103.839989] kernel BUG at net/core/skbuff.c:104! [ 103.840027] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 104.008320] read channel() error: -110 [ 104.218321] read channel() error: -110 [ 104.428304] read channel() error: -110 [ 104.638314] read channel() error: -110 [ 104.848296] read channel() error: -110 [ 105.058314] read channel() error: -110 [ 105.268303] read channel() error: -110 [ 105.280141] Modules linked in: pvrsrvkm(O) [ 105.284297] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 4.4.66 #26 [ 105.291524] Hardware name: Rockchip rk3368 p9 board (DT) [ 105.296850] task: ffffff8009165090 ti: ffffff8009150000 task.ti: ffffff8009150000 [ 105.304352] PC is at skb_panic+0x4c/0x50 [ 105.308290] LR is at skb_panic+0x4c/0x50 [ 105.312227] pc : [] lr : [] pstate: 604001c5 [ 105.319624] sp : ffffffc07db5b890 [ 105.322948] x29: ffffffc07db5b8a0 x28: 0000000000000002 [ 105.328296] x27: ffffff80095805ec x26: ffffff80095805e8 [ 105.333643] x25: 0000000000000002 x24: 0000000000000002 [ 105.338988] x23: ffffff80095805e0 x22: ffffffc06114fb00 [ 105.344335] x21: 0000000000000000 x20: ffffffc047837b40 [ 105.349683] x19: ffffffc0793ac800 x18: 0000000000000000 [ 105.355029] x17: 00000078da08d124 x16: ffffff80081f1438 [ 105.360376] x15: 000000000000000c x14: 636666666666663a [ 105.365723] x13: 6461656820363335 x12: 313a747570203633 [ 105.371071] x11: 35313a6e656c2034 x10: 3766316536383030 [ 105.376417] x9 : 386666666666663a x8 : 303a646e65203234 [ 105.381764] x7 : 000000000000000a x6 : 000000000000000d [ 105.387110] x5 : 0000000000000001 x4 : 0000000000000001 [ 105.392455] x3 : 0000000000000007 x2 : cb88537fdc8ba642 [ 105.397802] x1 : cb88537fdc8ba642 x0 : 0000000000000089 Change-Id: Ie11f20d62bec7d0d35b82d0bb5535d3c8d9213b9 Signed-off-by: zzc --- diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 0b4bdd39106b..5f861861398d 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c @@ -368,6 +368,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) * ethernet frames. */ dev->rx_urb_size = dev->net->mtu + ETH_HLEN + DM_RX_OVERHEAD + 1; + dev->rx_urb_size = (dev->rx_urb_size > 2048) ? dev->rx_urb_size : 2048; dev->mii.dev = dev->net; dev->mii.mdio_read = dm9601_mdio_read;