All of lore.kernel.org
 help / color / mirror / Atom feed
* Regression in 5.5.0-rc6 for FL2000 USB 3.0 to VGA adapter
@ 2020-01-18 23:52 Steve Markgraf
  2020-01-19 12:58 ` Greg KH
  2020-01-19 13:58 ` Johan Hovold
  0 siblings, 2 replies; 6+ messages in thread
From: Steve Markgraf @ 2020-01-18 23:52 UTC (permalink / raw)
  To: linux-usb; +Cc: johan

Hi list,

Commit 3e4f8e21c4f27bcf30a48486b9dcc269512b79ff "USB: core: fix check
for duplicate endpoints" is causing a regression with devices based on
the Fresco Logic FL2000 chip, i.e. it is totally unusable.

The issue was first reported on the osmocom-sdr mailing list [1] and I
can reproduce it on my machine with 5.5.0-rc6, with rc5 everything is
working fine. By reverting the commit mentioned above, it is working as
well.

When connecting the device with rc6, I see the following dmesg output:
https://steve-m.de/files/fl2000_dmesg.txt

The output of lsusb -v:
https://steve-m.de/files/fl2000_lsusb.txt

Output of the Windows tool "USB Device Tree Viewer":
https://steve-m.de/files/fl2000_usbtreeview.txt

Output of the USB-IF USB 3.0 Chapter 9 tests with a version from around
the time the FL2000 was released to market (passing):
https://steve-m.de/files/fl2000_chapter9.html

By looking at the lsusb output, it almost seems like a descriptor
parsing issue, that now causes trouble after introducing the duplicate
endpoint testing.

Regards,
Steve

[1] https://lists.osmocom.org/pipermail/osmocom-sdr/2020-January/002025.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regression in 5.5.0-rc6 for FL2000 USB 3.0 to VGA adapter
  2020-01-18 23:52 Regression in 5.5.0-rc6 for FL2000 USB 3.0 to VGA adapter Steve Markgraf
@ 2020-01-19 12:58 ` Greg KH
  2020-01-19 12:59   ` Greg KH
  2020-01-19 13:58 ` Johan Hovold
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2020-01-19 12:58 UTC (permalink / raw)
  To: Johan Hovold, Alan Stern, Steve Markgraf; +Cc: linux-usb, johan

On Sun, Jan 19, 2020 at 12:52:40AM +0100, Steve Markgraf wrote:
> Hi list,
> 
> Commit 3e4f8e21c4f27bcf30a48486b9dcc269512b79ff "USB: core: fix check
> for duplicate endpoints" is causing a regression with devices based on
> the Fresco Logic FL2000 chip, i.e. it is totally unusable.
> 
> The issue was first reported on the osmocom-sdr mailing list [1] and I
> can reproduce it on my machine with 5.5.0-rc6, with rc5 everything is
> working fine. By reverting the commit mentioned above, it is working as
> well.
> 
> When connecting the device with rc6, I see the following dmesg output:
> https://steve-m.de/files/fl2000_dmesg.txt
> 
> The output of lsusb -v:
> https://steve-m.de/files/fl2000_lsusb.txt
> 
> Output of the Windows tool "USB Device Tree Viewer":
> https://steve-m.de/files/fl2000_usbtreeview.txt
> 
> Output of the USB-IF USB 3.0 Chapter 9 tests with a version from around
> the time the FL2000 was released to market (passing):
> https://steve-m.de/files/fl2000_chapter9.html
> 
> By looking at the lsusb output, it almost seems like a descriptor
> parsing issue, that now causes trouble after introducing the duplicate
> endpoint testing.
> 
> Regards,
> Steve
> 
> [1] https://lists.osmocom.org/pipermail/osmocom-sdr/2020-January/002025.html

Odd, this should have been fixed with commit 3e4f8e21c4f2 ("USB: core:
fix check for duplicate endpoints") which is in 5.5-rc6.

Alan and Johan, any ideas?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regression in 5.5.0-rc6 for FL2000 USB 3.0 to VGA adapter
  2020-01-19 12:58 ` Greg KH
@ 2020-01-19 12:59   ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2020-01-19 12:59 UTC (permalink / raw)
  To: Johan Hovold, Alan Stern, Steve Markgraf; +Cc: linux-usb

On Sun, Jan 19, 2020 at 01:58:23PM +0100, Greg KH wrote:
> On Sun, Jan 19, 2020 at 12:52:40AM +0100, Steve Markgraf wrote:
> > Hi list,
> > 
> > Commit 3e4f8e21c4f27bcf30a48486b9dcc269512b79ff "USB: core: fix check
> > for duplicate endpoints" is causing a regression with devices based on
> > the Fresco Logic FL2000 chip, i.e. it is totally unusable.
> > 
> > The issue was first reported on the osmocom-sdr mailing list [1] and I
> > can reproduce it on my machine with 5.5.0-rc6, with rc5 everything is
> > working fine. By reverting the commit mentioned above, it is working as
> > well.
> > 
> > When connecting the device with rc6, I see the following dmesg output:
> > https://steve-m.de/files/fl2000_dmesg.txt
> > 
> > The output of lsusb -v:
> > https://steve-m.de/files/fl2000_lsusb.txt
> > 
> > Output of the Windows tool "USB Device Tree Viewer":
> > https://steve-m.de/files/fl2000_usbtreeview.txt
> > 
> > Output of the USB-IF USB 3.0 Chapter 9 tests with a version from around
> > the time the FL2000 was released to market (passing):
> > https://steve-m.de/files/fl2000_chapter9.html
> > 
> > By looking at the lsusb output, it almost seems like a descriptor
> > parsing issue, that now causes trouble after introducing the duplicate
> > endpoint testing.
> > 
> > Regards,
> > Steve
> > 
> > [1] https://lists.osmocom.org/pipermail/osmocom-sdr/2020-January/002025.html
> 
> Odd, this should have been fixed with commit 3e4f8e21c4f2 ("USB: core:
> fix check for duplicate endpoints") which is in 5.5-rc6.
> 
> Alan and Johan, any ideas?

Ugh, nevermind, I can read this better, it's the fix that is causing
problem, not that the fix should solve the problem...  Time for more
coffee...

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regression in 5.5.0-rc6 for FL2000 USB 3.0 to VGA adapter
  2020-01-18 23:52 Regression in 5.5.0-rc6 for FL2000 USB 3.0 to VGA adapter Steve Markgraf
  2020-01-19 12:58 ` Greg KH
@ 2020-01-19 13:58 ` Johan Hovold
  2020-01-19 14:48   ` Steve Markgraf
  1 sibling, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2020-01-19 13:58 UTC (permalink / raw)
  To: Steve Markgraf; +Cc: linux-usb, johan

On Sun, Jan 19, 2020 at 12:52:40AM +0100, Steve Markgraf wrote:
> Hi list,
> 
> Commit 3e4f8e21c4f27bcf30a48486b9dcc269512b79ff "USB: core: fix check
> for duplicate endpoints" is causing a regression with devices based on
> the Fresco Logic FL2000 chip, i.e. it is totally unusable.
>
> The issue was first reported on the osmocom-sdr mailing list [1] and I
> can reproduce it on my machine with 5.5.0-rc6, with rc5 everything is
> working fine. By reverting the commit mentioned above, it is working as
> well.

Thanks for the detailed report.

> When connecting the device with rc6, I see the following dmesg output:
> https://steve-m.de/files/fl2000_dmesg.txt
> 
> The output of lsusb -v:
> https://steve-m.de/files/fl2000_lsusb.txt
> 
> Output of the Windows tool "USB Device Tree Viewer":
> https://steve-m.de/files/fl2000_usbtreeview.txt
> 
> Output of the USB-IF USB 3.0 Chapter 9 tests with a version from around
> the time the FL2000 was released to market (passing):
> https://steve-m.de/files/fl2000_chapter9.html
> 
> By looking at the lsusb output, it almost seems like a descriptor
> parsing issue, that now causes trouble after introducing the duplicate
> endpoint testing.

Looks like you indeed have two interfaces (0 and 1) claiming the same
endpoints (0x01 and 0x81), so the new sanity check is working as
intended.

I just took a quick look at the libosmo-fl2k code and it appears that
you claim both interfaces but never set alternate setting 1 for
interface 0, which would enable those endpoints.

Could you see if that's all that's needed to get your application
working again?

Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regression in 5.5.0-rc6 for FL2000 USB 3.0 to VGA adapter
  2020-01-19 13:58 ` Johan Hovold
@ 2020-01-19 14:48   ` Steve Markgraf
  2020-01-19 15:15     ` Johan Hovold
  0 siblings, 1 reply; 6+ messages in thread
From: Steve Markgraf @ 2020-01-19 14:48 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-usb

Hi Johan,

On 19.01.20 14:58, Johan Hovold wrote:
> I just took a quick look at the libosmo-fl2k code and it appears that
> you claim both interfaces but never set alternate setting 1 for
> interface 0, which would enable those endpoints.
> 
> Could you see if that's all that's needed to get your application
> working again?

Yes, you are right, I had another look at it today and tried exactly
that, and it's working now with altsetting 1 of interface 0.
I will push a change to osmo-fl2k shortly.

There is also an out-of-tree kernel driver that makes use of this
device, and might even need interface 1, but I haven't verified this so
far:

https://github.com/FrescoLogic/FL2000

The question is if there are other devices out there where there are
duplicate endpoints on different interfaces. The spec clearly states
that this is forbidden, but the USBx0CV Chapter 9 tests do not test for
this and pass just fine, so I assume the FL2000 will not be the only
device in the market where this mistake has been made.

Regards,
Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Regression in 5.5.0-rc6 for FL2000 USB 3.0 to VGA adapter
  2020-01-19 14:48   ` Steve Markgraf
@ 2020-01-19 15:15     ` Johan Hovold
  0 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2020-01-19 15:15 UTC (permalink / raw)
  To: Steve Markgraf; +Cc: Johan Hovold, linux-usb

On Sun, Jan 19, 2020 at 03:48:32PM +0100, Steve Markgraf wrote:
> Hi Johan,
> 
> On 19.01.20 14:58, Johan Hovold wrote:
> > I just took a quick look at the libosmo-fl2k code and it appears that
> > you claim both interfaces but never set alternate setting 1 for
> > interface 0, which would enable those endpoints.
> > 
> > Could you see if that's all that's needed to get your application
> > working again?
> 
> Yes, you are right, I had another look at it today and tried exactly
> that, and it's working now with altsetting 1 of interface 0.
> I will push a change to osmo-fl2k shortly.

That's good to hear, thanks for confirming.

> There is also an out-of-tree kernel driver that makes use of this
> device, and might even need interface 1, but I haven't verified this so
> far:
> 
> https://github.com/FrescoLogic/FL2000

I'm afraid we don't care much about out-of-tree kernel drivers.

> The question is if there are other devices out there where there are
> duplicate endpoints on different interfaces. The spec clearly states
> that this is forbidden, but the USBx0CV Chapter 9 tests do not test for
> this and pass just fine, so I assume the FL2000 will not be the only
> device in the market where this mistake has been made.

That's a valid concern, but the problem is that USB core cannot really
handle such devices currently. If we get a flood of reports about this
we may have to reconsider how best to deal with them however.

Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-19 15:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-18 23:52 Regression in 5.5.0-rc6 for FL2000 USB 3.0 to VGA adapter Steve Markgraf
2020-01-19 12:58 ` Greg KH
2020-01-19 12:59   ` Greg KH
2020-01-19 13:58 ` Johan Hovold
2020-01-19 14:48   ` Steve Markgraf
2020-01-19 15:15     ` Johan Hovold

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.