[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1323277418.2728.35.camel@bwh-desktop>
Date: Wed, 7 Dec 2011 17:03:38 +0000
From: Ben Hutchings <bhutchings@...arflare.com>
To: Mark Lord <kernel@...savvy.com>
CC: David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/net/usb/asix: resync from vendor's copy
On Wed, 2011-12-07 at 11:59 -0500, Mark Lord wrote:
> On 11-12-07 11:27 AM, Ben Hutchings wrote:
> > On Wed, 2011-12-07 at 11:21 -0500, Mark Lord wrote:
> ..
> >> Heh.. my thinking side says to use the exact same protocol-specific flags
> >> in both "hw_features" and "features", and therefore check for those flags
> >> inside the "set_features()" function.
> >
> > Right.
>
>
> Thanks.
> Now now we have:
>
> static int ax88772b_set_features(struct net_device *netdev, u32 features)
> {
> struct usbnet *dev = netdev_priv(netdev);
> u16 tx_csum = 0, rx_csum = 0;
>
> if (features & NETIF_F_IP_CSUM)
> tx_csum |= AX_TXCOE_TCP | AX_TXCOE_UDP;
> if (features & NETIF_F_IPV6_CSUM)
> tx_csum |= AX_TXCOE_TCPV6 | AX_TXCOE_UDPV6;
> if (features & NETIF_F_RXCSUM)
> rx_csum = AX_RXCOE_DEF_CSUM;
> ax8817x_write_cmd(dev, AX_CMD_WRITE_TXCOE_CTL, tx_csum, 0, 0, NULL);
> ax8817x_write_cmd(dev, AX_CMD_WRITE_RXCOE_CTL, rx_csum, 0, 0, NULL);
> return 0;
> }
>
> static int ax88772b_bind(struct usbnet *dev, struct usb_interface *intf)
> {
> ...
>
> /* enable hardware checksums */
> dev->net->hw_features |=
> NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM;
> dev->net->features |=
> NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM;
> ax88772b_set_features(dev->net, dev->net->features);
> ...
> }
Not knowing the hardware, that looks plausible...
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists