Commit b92eccf0 authored by Alessandro Rubini's avatar Alessandro Rubini

wr-nic: use a biffer MRU (receive size)

The MRU in hw includes stuff that is not included in dev->mtu, so
long packets were failing. Use a big RTU to be safe, and the OS will deal with
wrong packets.
parent 9e9ff6e5
......@@ -49,9 +49,14 @@ static int wrn_open(struct net_device *dev)
netif_start_queue(dev);
}
/* Set the MRU equal to the MTU */
/*
* Set the MRU bit enough, to avoid issues. We used dev-mtu,
* but this MRU includes OOB and stuff. So let's put it to 2kB,
* which is the maximum allowed, and le software deal with
* malformed packets
*/
val = readl(&ep->ep_regs->RFCR) & ~EP_RFCR_MRU_MASK;
writel (val | EP_RFCR_MRU_W(dev->mtu), &ep->ep_regs->RFCR);
writel (val | EP_RFCR_MRU_W(2048), &ep->ep_regs->RFCR);
/* Most drivers call platform_set_drvdata() but we don't need it */
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment