All of lore.kernel.org
 help / color / mirror / Atom feed
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 11:41:58 +0900	[thread overview]
Message-ID: <4A6E6576.1020109@jp.fujitsu.com> (raw)
In-Reply-To: <AEC6C66638C05B468B556EA548C1A77D016DDE9E@trantor>

Hi,

>> Do you think it's good idea that the method for the notification
>> of hotplug is switched from xenbus to RING (like pv network's
> rx_ring)?
> 
> I like the idea of having the port states in the xenstore. It is a low
> speed and (mostly) relatively infrequently changing thing so I think
> keeping it in xenstore is appropriate.
> 
> I think the problem could be solved by simply including a port change
> counter for each port, either as part of the existing port-N value or as
> an additional 'port-N-generation' field. The backend would just
> increment that every time there is a plug or unplug event, and the
> frontend could compare the value to what it was last time to see if the
> port had changed.
> 
> 
> 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.

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.

As I mentioned, if notifications by xenbus has the problem, I prefer 
using RING.


Regards,
Noboru

  reply	other threads:[~2009-07-28  2:41 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 [this message]
2009-07-28  4:32           ` James Harper
2009-07-28  9:32             ` Noboru Iwamatsu
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=4A6E6576.1020109@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.