netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <kernel@teksavvy.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/net/usb/asix:  resync from vendor's copy
Date: Wed, 09 Nov 2011 11:47:33 -0500	[thread overview]
Message-ID: <4EBAAEA5.1060408@teksavvy.com> (raw)
In-Reply-To: <1320856444.18929.78.camel@deadeye>

On 11-11-09 11:34 AM, Ben Hutchings wrote:
> On Wed, 2011-11-09 at 11:25 -0500, Mark Lord wrote:
>> On 11-11-02 04:42 PM, Ben Hutchings wrote:
>>> On Wed, 2011-11-02 at 15:36 -0400, Mark Lord wrote:
>>> [...]
>>>> First cut (for review) at updating the in-kernel asix usb/network driver
>>>> from the latest vendor GPL version of the driver, obtained from here:
>>>>
>>>>   http://www.asix.com.tw/download.php?sub=searchresult&PItemID=84&download=driver
>> ..
>>>> --- linux-3.0/drivers/net/usb/asix.c	2011-10-12 17:59:03.000000000 -0400
>>>> +++ linux/drivers/net/usb/asix.c	2011-11-01 19:00:50.051289683 -0400
>>> [...]
>> ...
>>>> +	.set_tx_csum		= ax88772b_set_tx_csum,
>>>> +	.get_tx_csum		= ax88772b_get_tx_csum,
>>>> +	.get_rx_csum		= ax88772b_get_rx_csum,
>>>> +	.set_rx_csum		= ax88772b_set_rx_csum,
>>>> +};
>>>
>>> The various ethtool operations for offload flags are being (or have
>>> been) removed.  The driver must set net_device::hw_features and
>>> implement net_device_ops::ndo_set_features instead.
>>
>> Okay, I see what to do for the rx_csum stuff, based on other drivers.
>>
>> But is there anything to replace the tx_csum stuff,
>> or should I just remove it entirely without a substitute?
> 
> If TX checksum offload only needs to be requested in TX descriptors and
> not in a configuration register, then you don't need to do anything when
> it's enabled or disabled.

It's in a config register too.  But I've now just noticed "NETIF_F_HW_CSUM",
which seems to be what I was missing earlier.

So I can now treat the tx_csums similarly to the rx_csums again.

Note:  I'm looking at smsc95xx.c and smsc75xx.c for examples,
and they both have the same problem I'll have here:

How to update the csum settings atomically.
A spinlock is no good, because config register access is over USB.

Is it safe to use a mutex in set_features, or can that be invoked
from atomic code?  Or perhaps just not worry about it, since its only
an issue when somebody plays with two instances of ethtool simultaneously
on the same device?

Thanks for your help.

  reply	other threads:[~2011-11-09 16:47 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26 23:36 asix usb network driver: nfg Mark Lord
2011-10-26 23:40 ` David Miller
2011-10-27  1:23   ` Mark Lord
2011-10-27  2:17     ` David Miller
2011-10-27 18:48       ` Mark Lord
2011-11-02 19:36       ` [PATCH] drivers/net/usb/asix: resync from vendor's copy Mark Lord
2011-11-02 19:48         ` Mark Lord
2011-11-02 20:42         ` Ben Hutchings
2011-11-02 22:44           ` Mark Lord
2011-11-09 16:25           ` Mark Lord
2011-11-09 16:34             ` Ben Hutchings
2011-11-09 16:47               ` Mark Lord [this message]
2011-11-09 16:57                 ` Mark Lord
2011-11-09 17:20                   ` Mark Lord
2011-11-09 17:31                     ` Ben Hutchings
2011-11-09 17:40                       ` Mark Lord
2011-11-09 17:48                         ` Ben Hutchings
2011-11-09 18:22                           ` Mark Lord
2011-12-05 14:41                           ` Mark Lord
2011-12-05 15:18                             ` Ben Hutchings
2011-12-06 12:44                               ` Mark Lord
2011-12-06 17:45                                 ` Ben Hutchings
2011-12-07 16:21                                   ` Mark Lord
2011-12-07 16:27                                     ` Ben Hutchings
2011-12-07 16:59                                       ` Mark Lord
2011-12-07 17:03                                         ` Ben Hutchings
2011-11-07 16:09         ` Michal Marek
2011-11-09 17:31         ` [PATCH v2] " Mark Lord
2011-11-09 17:41           ` Mark Lord
2011-11-09 17:43           ` Mark Lord
2011-11-09 17:47           ` Ben Hutchings
2011-11-09 18:27             ` Mark Lord
2011-11-09 17:49           ` [PATCH v3] " Mark Lord
2011-11-10 14:01           ` [PATCH v2] " Mark Lord
2011-11-10 16:54             ` Grant Grundler
2011-11-10 20:17               ` Mark Lord

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EBAAEA5.1060408@teksavvy.com \
    --to=kernel@teksavvy.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).