Hi Wolfgang,

Wolfgang Grandegger schrieb:
> Hi Mathias
>> +static void esd_usb2_tx_done_msg(struct esd_usb2_net *net,
>> +                             struct esd_usb2_msg *msg)
>> +{
>> +    struct net_device_stats *stats = &net->netdev->stats;
>> +
>> +    if (!netif_device_present(net->netdev))
>> +            return;
>> +
>> +    if (msg->msg.txdone.status == 0) {
>> +            stats->tx_packets++;
>> +            stats->tx_bytes += msg->msg.txdone.hnd & 0xf;
>> +    }
>> +}
>> [...]
>> +
>> +    netdev->trans_start = jiffies;
>> +
>> +    can_get_echo_skb(netdev, context->echo_index);
> 
> This functions is called when the USB transfer has completed, right?
> can_get_echo_skb() should be called when the TX done notification
> arrives (in esd_usb2_tx_done_msg). This is *wrong* in the ems_usb driver
> as well and should be fixed.
> Wolfgang.

The ems_usb driver increments the tx_packets and tx_bytes before the 
call to can_get_echo_skb. Is there anything more to do? I don't see a 
need of a fix in ems_usb or am I wrong?

Markus

_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to