From: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
To: james.harper@bendigoit.com.au
Cc: xen-devel@lists.xensource.com
Subject: Re: bug in usbback
Date: Tue, 28 Jul 2009 18:32:06 +0900 [thread overview]
Message-ID: <4A6EC596.8010105@jp.fujitsu.com> (raw)
In-Reply-To: <AEC6C66638C05B468B556EA548C1A77D016DDEC9@trantor>
Hi,
James Harper wrote:
>>> So maybe "port-N=S" would become "port-N=GGS", where S is the
> current
>>> 'speed' value, and "GG" is a change counter. As an example:
>>>
>>> 1. port-1=000
>>> 2. <hot plug>
>>> 3. port-1=013
>>> 4. <hot unplug>
>>> 5. port-1=020
>>> 6. <hot plug>
>>> 7. port-1=033
>> I don't think it's a good idea.
>>
>> If disconnection happened, the urb transfer is sure to make an error,
>> and usbfront can detect this error without counter.
>
> Is it a good idea for the usb device driver running in the frontend to
> detect an unplug->replug event by getting error codes? It could report a
> device failure in that case rather than figuring out that the device has
> been unplugged and replugged.
USB device driver (aka function driver) detects plug/unplug event by
probe/disconnect callbacks. These callbacks and URB transfer error
callback are different.
Disconnection causes the transfer error, or disconnection is detected
and the transfer is canceled. Normally, after canceling the transfer,
the device is re-initialized (if the device is still present).
In any case, it might be another problem that reports the disconnection
event as an error.
>> Furthermore, usbfront only emulates the roothub ports' virtual status
>> by the value of port-N's speed, and, even if the counter value is
> wrong,
>> this value cannot be associated to the rootport's status.
>
> The last digit of the counter still represents the port virtual status.
> Only the first two digits increment. As per my previous email, the
> format of the port-N xenstore entry would become 'GGS' where GG is the
> counter value and 'S' is the status, as it is now.
I mean "roothub ports' virtual status" as port status that is emulated
in usbfront roothub part. How do you associate the error of the counter
to wPortChange bit field?
(See struct rhport_status in usbfront.h and usbfront_hub.c)
>> As I mentioned, if notifications by xenbus has the problem, I prefer
>> using RING.
>>
>
> The problem with the ring method is that there has to be an outstanding
> ring request sent by the frontend in order for the backend to be able to
> notify the frontend. I think that would add unnecessary overhead.
>
I believe the method of no "reconfiguring mismatch" happening is better
than correcting the mismatch. It's necessary overhead.
Regards,
Noboru
next prev parent reply other threads:[~2009-07-28 9:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-25 10:01 bug in usbback James Harper
2009-07-25 10:12 ` Keir Fraser
2009-07-26 1:26 ` James Harper
2009-07-27 5:13 ` Noboru Iwamatsu
2009-07-27 9:16 ` James Harper
2009-07-28 2:41 ` Noboru Iwamatsu
2009-07-28 4:32 ` James Harper
2009-07-28 9:32 ` Noboru Iwamatsu [this message]
2009-07-27 1:18 ` Noboru Iwamatsu
2009-07-27 1:23 ` James Harper
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=4A6EC596.8010105@jp.fujitsu.com \
--to=n_iwamatsu@jp.fujitsu.com \
--cc=james.harper@bendigoit.com.au \
--cc=xen-devel@lists.xensource.com \
/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.