All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Nychis <gnychis@cmu.edu>
To: linux-kernel@vger.kernel.org
Subject: help finding entry point of USB data in the kernel, not drivers/usb/core/devio.c?
Date: Tue, 30 Sep 2008 01:04:26 -0400	[thread overview]
Message-ID: <48E1B35A.1040103@cmu.edu> (raw)

Hi all,

I am trying to find the entry point of USB data in the kernel.  I have a 
USB device and I would like to find the latency between the time the 
data enters the kernel, and I read it in userspace.  My first goal is to 
find where it actually enters the kernel.

The host device driver obtains a URB and reads the data from urb->buffer.

 From digging around the kernel code, I had assumed the entry point for 
all USB data was in drivers/usb/core/devio.c::usbdev_read() ... but it 
seems as though that is not the case.

Right after the device is locked in this function, I added a simple 
printk:   printk("Reading %d bytes\n", nbytes); // Line 135

Then around line 154 after it reads the usb device descriptor, I added:
     if(temp_desc.idVendor==0xfffe && temp_desc.idProduct==0x0002) {
       printk("...Data from USRP\n");
     }

That gives me an idea that the data is coming from the device I am 
looking for.

But, it seems as though this method is only related to control 
information to/from the USB device?  Whenever I start my application, I 
get about 1614 total bytes read from my first printout, and I see only 
one of my second printout messages.  Whereas, I am reading a total of 
about 8MB from the USB device over the period of time.  So I think I am 
completely missing my actual data entry point.

Additionally, lsusb generates this same exact amount 1614 total bytes of 
data... so it seems to be control related to me.

I'd greatly appreciate any guidance.

Thanks!
George

             reply	other threads:[~2008-09-30  5:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-30  5:04 George Nychis [this message]
2008-09-30  5:12 ` help finding entry point of USB data in the kernel, not drivers/usb/core/devio.c? Greg KH
2008-09-30  5:22   ` George Nychis

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=48E1B35A.1040103@cmu.edu \
    --to=gnychis@cmu.edu \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.