From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2 v2] usb: musb: Fix hub port number for SPLIT transactions
Date: Mon, 21 Dec 2015 21:27:01 +0100 [thread overview]
Message-ID: <201512212127.01731.marex@denx.de> (raw)
In-Reply-To: <5678540B.2070709@redhat.com>
On Monday, December 21, 2015 at 08:33:31 PM, Hans de Goede wrote:
> Hi,
>
> On 19-12-15 21:16, Stefan Br?ns wrote:
> > The ifdef'ed Linux kernel code uses the 1 based port number, whereas
> > U-Boot puts a 0 based port number into the register. The reason the 0
> > based port number apparently works can probably be taken from the USB
> > 2.0 spec:
> >
> > 8.4.2.2 Start-Split Transaction Token
> > ... The host must correctly set the port field for single and multiple TT
> > hub implementations. A single TT hub implementation *may ignore* the port
> > field.
> >
> > Actually, as far as I unterstand, a multi TT hub defaults to single TT
> > (bAlternateSetting: 0) until switched via SetInterface, so even "port 42"
> > would work.
> >
> > The change was verified by hardcoding the port number to a wrong value,
> > SPLIT transactions kept working (although using a DWC2 instead of MUSB).
> > Tested hubs are the RPi onboard SMC9514 and an external "05e3:0608
> > Genesys Logic, Inc. USB-2.0 4-Port HUB". The former is a multi TT hub,
> > the latter single TT only.
> >
> > Signed-off-by: Stefan Br?ns <stefan.bruens@rwth-aachen.de>
> > ---
> >
> > drivers/usb/musb-new/musb_host.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/musb-new/musb_host.c
> > b/drivers/usb/musb-new/musb_host.c index fc4ba62..5c028d4 100644
> > --- a/drivers/usb/musb-new/musb_host.c
> > +++ b/drivers/usb/musb-new/musb_host.c
> > @@ -2096,7 +2096,7 @@ int musb_urb_enqueue(
> >
> > uint8_t hubaddr = 0;
> > usb_find_usb2_hub_address_port(udev, &hubaddr,
&portnr)
> > qh->h_addr_reg = hubaddr;
> >
> > - qh->h_port_reg = portnr - 1;
> > + qh->h_port_reg = portnr;
> >
> > }
> >
> > #endif
> >
> > }
>
> This patch needs to be re-spun to apply on top of the compile fixed [patch
> 1/2] of this set. With that done this patch is:
>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> Tested-by: Hans de Goede <hdegoede@redhat.com>
OK, would you, Stefan, please resend the patchset with the necessary Reviewed-by
etc so I can pick it ? This thread is a chaos and I am lost.
Thanks!
Best regards,
Marek Vasut
next prev parent reply other threads:[~2015-12-21 20:27 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-13 4:17 [U-Boot] [PATCH 0/6] usb: dwc2: add SPLIT transaction support Stefan Brüns
2015-12-13 4:17 ` [U-Boot] [PATCH 1/6] usb: dwc2: avoid out of bounds access Stefan Brüns
2015-12-13 4:41 ` Marek Vasut
2015-12-16 2:58 ` Stephen Warren
2015-12-16 10:29 ` Marek Vasut
2015-12-17 1:44 ` Stefan Bruens
2015-12-13 4:17 ` [U-Boot] [PATCH 2/6] usb: dwc2: Handle NAK during CONTROL DATA and STATUS stage Stefan Brüns
2015-12-13 4:46 ` Marek Vasut
2015-12-16 3:07 ` Stephen Warren
2015-12-17 3:09 ` Stefan Bruens
2015-12-13 4:17 ` [U-Boot] [PATCH 3/6] usb: dwc2: determine TT hub address and port for split transactions Stefan Brüns
2015-12-13 4:43 ` Marek Vasut
2015-12-16 3:17 ` Stephen Warren
2015-12-17 3:16 ` Stefan Bruens
2015-12-18 1:11 ` [U-Boot] [PATCH] usb: Move determination of TT hub address/port into seperate function Stefan Brüns
2015-12-18 2:35 ` Marek Vasut
2015-12-18 10:00 ` Hans de Goede
2015-12-19 17:17 ` Stefan Bruens
2015-12-19 18:27 ` Hans de Goede
2015-12-19 20:16 ` [U-Boot] [PATCH 1/2 v2] " Stefan Brüns
2015-12-19 20:16 ` [U-Boot] [PATCH 2/2 v2] usb: musb: Fix hub port number for SPLIT transactions Stefan Brüns
2015-12-21 19:33 ` Hans de Goede
2015-12-21 20:27 ` Marek Vasut [this message]
2015-12-21 23:02 ` Stefan Bruens
2015-12-21 23:08 ` Marek Vasut
2015-12-19 20:26 ` [U-Boot] [PATCH 1/2 v3] usb: Move determination of TT hub address/port into seperate function Stefan Brüns
2015-12-20 19:12 ` Hans de Goede
2015-12-21 19:32 ` Hans de Goede
2015-12-13 4:17 ` [U-Boot] [PATCH 4/6] usb: dwc2: add helper function for setting SPLIT HC registers Stefan Brüns
2015-12-13 4:44 ` Marek Vasut
2015-12-16 3:19 ` Stephen Warren
2015-12-13 4:17 ` [U-Boot] [PATCH 5/6] usb: dwc2: add support for SPLIT transactions Stefan Brüns
2015-12-13 4:48 ` Marek Vasut
2015-12-16 3:36 ` Stephen Warren
2015-12-20 0:17 ` Stefan Bruens
2015-12-20 0:41 ` Marek Vasut
2015-12-13 4:17 ` [U-Boot] [PATCH 6/6] usb: dwc2: remove no longer used wait_for_chhltd() Stefan Brüns
2015-12-13 4:48 ` Marek Vasut
2015-12-16 3:36 ` Stephen Warren
2015-12-13 4:41 ` [U-Boot] [PATCH 0/6] usb: dwc2: add SPLIT transaction support Marek Vasut
2015-12-16 2:53 ` Stephen Warren
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=201512212127.01731.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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