From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Cannot read using USB Skeleton Driver
Date: Mon, 19 Sep 2011 06:46:49 -0700 [thread overview]
Message-ID: <20110919134649.GA28575@kroah.com> (raw)
In-Reply-To: <CAKRE6mt_Hxh84Rn=rfkd-sNCipKVdNxAwkv_SvrUP+jGRL7-Mg@mail.gmail.com>
On Mon, Sep 19, 2011 at 06:51:18PM +0530, Felix Varghese wrote:
> Oh I don't think I have customized it to the point of breaking it. I
> just modified the VID and PID to those of my device. And later, when I
> noticed where it was getting stuck, I changed the wait_for_completion
> to wait_for_completion_interruptible (in the code snippet quoted
> previously) so that I could recover with Ctrl-C instead of a reboot.
> And my hardware works fine with the usbserial driver you suggested (I
> can read/write to it from a simple terminal program). But, to develop
> a full-fledged driver, the skeleton driver seemed like a better
> starting point, which is I am still trying to get it working.
>
> The condition which causes the code to wait for eternity (from the
> line I quoted in one of my previous mails) seems to be: if
> (!dev->processed_urb)
> But I notice that this variable is not true even for the first read.
> So the code seems to wait for the completion of something that has not
> yet started. Also, I do not see this variable being explicitly set to
> false either, anywhere within the driver. I may be on the wrong track,
> but isn't this variable one that is used only within our driver? If
> so, what exactly is it used for, considering that it is only set to 1
> (never to 0) and is 0 initially?
You might be right and the code might be wrong, care to send a patch for
it correcting the issue?
thanks,
greg k-h
next prev parent reply other threads:[~2011-09-19 13:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 13:32 Cannot read using USB Skeleton Driver Felix Varghese
2011-09-16 7:01 ` Greg KH
2011-09-16 11:29 ` Felix Varghese
2011-09-16 14:31 ` Greg KH
2011-09-19 5:43 ` Felix Varghese
2011-09-19 12:38 ` Greg KH
2011-09-19 13:21 ` Felix Varghese
2011-09-19 13:46 ` Greg KH [this message]
2011-09-20 3:49 ` Felix Varghese
2011-09-21 13:29 ` Felix Varghese
2011-09-21 16:00 ` Greg KH
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=20110919134649.GA28575@kroah.com \
--to=greg@kroah.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).