kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: mnarasimha786@gmail.com (Narasimha M)
To: kernelnewbies@lists.kernelnewbies.org
Subject: USB device debugging
Date: Wed, 25 May 2016 16:21:07 +0530	[thread overview]
Message-ID: <CAL0PPtLWDSDB0G5ffRXeP1V7zXprqHp_QY-M7QmSPZH_mUiQ2Q@mail.gmail.com> (raw)
In-Reply-To: <87a8jephuz.fsf@nemi.mork.no>

I am able to see the corrupted data in rx_complete itself. What are
the possibilities for the data corruption in rx_complete. Any fixes to
resolve this. And from where the data in rx_submit generates

On Wed, May 25, 2016 at 3:41 PM, Bj?rn Mork <bjorn@mork.no> wrote:
> Narasimha M <mnarasimha786@gmail.com> writes:
>
>> Thanks for explanation. Here data is getting corrupted before it comes
>> to the usbnet itself, so after it reaches to usbnet and go through
>> network stack, it is failing in tcp checksum and packet is getting
>> dropped. Same driver is working with linux-3.10.20 but not working
>> with linux-2.6.32.Not able to find the exact function in driver which
>> sends receive packet to usbnet, not able to proceed further. Please
>> suggest some pointers to proceed further.
>
> This is no surprise.  There is no "send receive packet to usbnet".
>
> usbnet allocates a receive buffer and hands it to the USB host
> controller. This happens in rx_submit().  The host controller calls the
> rx_complete() callback when it gets data from the device.  This callback
> will trigger further handling in the usbnet_bh() tasklet, calling
> rx_process().  This again calls the minidriver specific rx_fixup()
> callback if there is any, which is GobiNet's only chance of inspecting
> and possibly modifying the buffer.  But normally it will not touch the
> buffer, since there is no fixup necessary for Gobi devices in 802.3 mode
> (they transmit plain ethernet packets). rx_process() ends up calling
> usbnet_skb_return() which hands the buffer over the the networking stack
> using netif_rx().
>
> So, if we ignore the possible firmware bug workarounds in rx_fixup(),
> then nothing ever touches the receive buffer in usbnet. It's just a
> handle being passed around.
>
> Note that I don't remember, or care, what 2.6.32 might have done. It's too
> outdated to be relevant.  But the usbnet design is much older and
> haven't changed drastically, so I assume most of the above is valid
> there too.
>
>
> Bj?rn



-- 
Narasimha

  reply	other threads:[~2016-05-25 10:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24  7:39 USB device debugging Narasimha M
2016-05-24  7:59 ` Carlo Caione
2016-05-24  8:18   ` Narasimha M
2016-05-24 14:46     ` Greg KH
2016-05-24 17:00       ` Bjørn Mork
2016-05-25  9:00         ` Narasimha M
2016-05-25 10:11           ` Bjørn Mork
2016-05-25 10:51             ` Narasimha M [this message]
2016-05-25 11:06               ` Bjørn Mork
2016-05-25 11:29                 ` Narasimha M
2016-05-25 12:01                   ` Bjørn Mork
2016-05-25 12:37                     ` Narasimha M
2016-05-25 12:56                       ` Bjørn Mork
2016-05-25 15:24                         ` Narasimha M
2016-05-25 15:42                           ` Narasimha M
2016-05-25 18:20                             ` Greg KH
2016-05-26  5:31                               ` Narasimha M
2016-05-26  5:51                                 ` Greg KH
2016-05-26  6:23             ` Narasimha M

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=CAL0PPtLWDSDB0G5ffRXeP1V7zXprqHp_QY-M7QmSPZH_mUiQ2Q@mail.gmail.com \
    --to=mnarasimha786@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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).