From: "Tanya Brokhman" <tlinder@codeaurora.org>
To: 'Alan Stern' <stern@rowland.harvard.edu>, 'Felipe Balbi' <balbi@ti.com>
Cc: 'Sarah Sharp' <sarah.a.sharp@linux.intel.com>,
greg@kroah.com, linux-usb@vger.kernel.org,
linux-arm-msm@vger.kernel.org, ablay@codeaurora.org,
'open list' <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v12 7/8] usb: Adding SuperSpeed support to dummy_hcd
Date: Tue, 24 May 2011 08:53:15 +0300 [thread overview]
Message-ID: <00ed01cc19d6$e1fef520$a5fcdf60$@org> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1105231710590.2020-100000@iolanthe.rowland.org>
> >
> > With Tatyana's patches, if we load a USB2 g_zero to dummy_hcd,
> enumeration
> > will fail where it shouldn't. This has been my whole point ;-) Maybe
> I wasn't
> > clear enough.
>
> I guess not. I thought Tatyana said she was working to fix that bug...
This bug is fixed with the module parameter. When dummy_hcd is loaded it
registers 2 root hubs: HS & SS but unless the is_super_speed parameter is
true, the device will be connected to the HS hub. This way when loading HS
g_zero it enumerates under HS root hub successfully.
Note that if load SS gadget without setting is_super_speed=true for dummy
hcd, it will also enumerate under HS hub! This is basically a way to test
that SS devices are backward compatible.
> > >> What about the case where SuperSpeed enumeration
> > >> fails and you have to fall back to high speed?
> > >
> > > If SuperSpeed enumeration fails, say because the device doesn't
> have
> > > any SuperSpeed descriptors, xhci-hcd doesn't fall back to high
> speed,
> > > does it? dummy-hcd should behave the same way.
> >
> > it should at least. Isn't that what happens between EHCI/OHCI ? HS
> Chirp
> > sequencing fails, then we fall back to FullSpeed.
>
> That's a failure in initialization, not a failure in enumeration.
>
> There are two reasons why the HS chirp might fail: the device doesn't
> support high speed operation or hardware errors prevent the chirp from
> working. With dummy-hcd there are no hardware errors (because there's
> no hardware).
>
> As for whether or not the device supports high-speed or SuperSpeed
> operation, that's determined by the usb_gadget_driver->speed field. If
> the field doesn't specify SuperSpeed then dummy-hcd should connect the
> gadget to the USB-2 root hub rather than the USB-3 root hub. Isn't
> that what Tatyana's patch does? It contains a line saying:
>
> dum->gadget.speed = driver->speed;
You're right. This is exactly what is done with a small update: if
is_super_speed=false the gadget will connect to a USB2 root hub even if
driver->speed=USB_SPEED_SUPER. In that case dum->gadget.speed will be set to
USB_SPEED_HIGH. The code that sets this now is:
if (mod_data.is_super_speed)
dum->gadget.speed = driver->speed;
else
dum->gadget.speed = min((u8)USB_SPEED_HIGH,
(u8)driver->speed);
if (dum->gadget.speed < driver->speed)
dev_dbg(udc_dev(dum), "This device can perform faster if"
" you connect it to a "
"SupeSpeed port...\n");
> > >> It seems like you really
> > >> need to handle both speeds and the speed fall back parameter in
> the same
> > >> driver. Isn't there some other gadget driver that has a fall back
> to
> > >> full or low speed when high speed enumeration fails?
> > >
> > > That's a property of the gadget driver, not the UDC driver. dummy-
> hcd
> > > is a UDC driver (and an HCD too).
> >
> > USB3.0 dummy_hcd should still enumerate USB2.0 gadget drivers.
>
> Yes, certainly it should. If it doesn't, that's a bug, not a design
> error.
>
This version of dummy_hcd enumerates HS devices without any issues.
Best regards,
Tanya Brokhman
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next prev parent reply other threads:[~2011-05-24 5:51 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 6:41 [PATCH v12 0/8] usb gadget: Add SuperSpeed support to the Gadget Framework Tatyana Brokhman
[not found] ` <1306132882-9668-1-git-send-email-tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-23 6:41 ` [PATCH/RESEND v12 1/8] usb: Add usb_endpoint_descriptor to be part of the struct usb_ep Tatyana Brokhman
2011-05-23 6:41 ` [PATCH v12 4/8] usb:gadget: Add SuperSpeed support to the Gadget Framework Tatyana Brokhman
2011-05-23 12:31 ` Sebastian Andrzej Siewior
2011-05-23 22:18 ` Mike Frysinger
2011-05-24 5:10 ` Tanya Brokhman
2011-05-24 5:14 ` Mike Frysinger
2011-05-24 5:37 ` Tanya Brokhman
2011-05-24 17:12 ` Mike Frysinger
2011-05-23 6:41 ` [PATCH v12 2/8] usb: Configure endpoint according to gadget speed Tatyana Brokhman
2011-05-23 6:41 ` [PATCH/RESEND v12 3/8] usb: Modify existing gadget drivers to use config_ep_by_speed() instead of ep_choose Tatyana Brokhman
2011-05-23 6:41 ` [PATCH/RESEND v12 5/8] usb: Add streams support to the gadget framework Tatyana Brokhman
2011-05-23 6:41 ` [PATCH v12 6/8] usb:dummy_hcd: use the shared_hcd infrastructure Tatyana Brokhman
2011-05-23 6:41 ` [PATCH v12 7/8] usb: Adding SuperSpeed support to dummy_hcd Tatyana Brokhman
[not found] ` <1306132882-9668-8-git-send-email-tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-23 7:05 ` Felipe Balbi
2011-05-23 7:20 ` Tanya Brokhman
2011-05-23 7:21 ` Felipe Balbi
2011-05-23 8:18 ` Tanya Brokhman
2011-05-23 8:32 ` Felipe Balbi
2011-05-23 9:16 ` Tanya Brokhman
2011-05-23 14:22 ` Alan Stern
2011-05-23 16:08 ` Sarah Sharp
2011-05-23 16:28 ` Alan Stern
2011-05-23 21:06 ` Felipe Balbi
[not found] ` <BD27AEAC-1E6D-480C-9E18-A970B992AD75-l0cyMroinI0@public.gmane.org>
2011-05-23 21:21 ` Alan Stern
2011-05-24 5:53 ` Tanya Brokhman [this message]
2011-05-24 10:18 ` Felipe Balbi
2011-05-24 10:31 ` Tanya Brokhman
2011-05-24 10:33 ` Felipe Balbi
2011-05-24 10:43 ` Tanya Brokhman
2011-05-24 14:20 ` Alan Stern
2011-05-25 4:46 ` Tanya Brokhman
2011-05-25 9:21 ` Felipe Balbi
[not found] ` <20110525092124.GI14556-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-05-25 9:26 ` Tanya Brokhman
2011-05-25 9:27 ` Felipe Balbi
2011-05-25 9:43 ` Tanya Brokhman
2011-05-25 9:49 ` Felipe Balbi
2011-05-25 10:03 ` Tanya Brokhman
2011-05-25 10:29 ` Felipe Balbi
2011-05-25 10:52 ` Tanya Brokhman
2011-05-25 11:23 ` Felipe Balbi
2011-05-25 11:33 ` Tanya Brokhman
2011-05-25 12:42 ` Felipe Balbi
2011-05-25 14:23 ` Alan Stern
2011-05-25 14:39 ` Alan Stern
2011-05-28 11:05 ` Tanya Brokhman
2011-05-28 14:15 ` Alan Stern
2011-06-07 10:33 ` Felipe Balbi
2011-05-25 17:07 ` Brokhman Tatyana
2011-05-25 17:29 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1105251316170.1987-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2011-05-25 18:13 ` Brokhman Tatyana
2011-05-25 18:59 ` Alan Stern
2011-05-26 6:51 ` Tanya Brokhman
2011-05-26 14:31 ` Alan Stern
2011-05-26 16:15 ` Brokhman Tatyana
2011-05-25 9:20 ` Felipe Balbi
2011-05-23 15:55 ` Sarah Sharp
[not found] ` <20110523072142.GK3095-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-05-23 14:20 ` Alan Stern
[not found] ` <20110523070556.GJ3095-UiBtZHVXSwEVvW8u9ZQWYwjfymiNCTlR@public.gmane.org>
2011-05-23 14:18 ` Alan Stern
2011-05-23 6:41 ` [PATCH v12 8/8] usb:gadget: coding style fixes Tatyana Brokhman
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='00ed01cc19d6$e1fef520$a5fcdf60$@org' \
--to=tlinder@codeaurora.org \
--cc=ablay@codeaurora.org \
--cc=balbi@ti.com \
--cc=greg@kroah.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/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).