Discussion:
"config x has an invalid interface number: y but max is z"
Bjørn Mork
2013-01-17 18:11:55 UTC
Permalink
I'm wondering about the usefulness and correctness of some of the
warnings we print.

Some vendors obviously allocate fixed interface numbers for specific
functions and present configurations with large "holes" in the interfac=
e
numbers. This example was just posted on the NM list, and I have some
devices like this myself:

usb 1-1.5: new high-speed USB device number 7 using ehci_hcd
usb 1-1.5: config 1 has an invalid interface number: 8 but max is 3
usb 1-1.5: config 1 has no interface number 1
usb 1-1.5: config 2 has an invalid interface number: 12 but max is 1
usb 1-1.5: config 2 has an invalid interface number: 13 but max is 1
usb 1-1.5: config 2 has an invalid interface number: 13 but max is 1
usb 1-1.5: config 2 has no interface number 0
usb 1-1.5: config 2 has no interface number 1

Is this useful to anyone? I expect it is just log noise to most users,
and some are probably confused and think there is something wrong here.
At least when they are having some unrelated problem with the device.

Should we just drop those warnings?



Bj=C3=B8rn
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Bjørn Mork
2013-01-17 18:32:51 UTC
Permalink
Post by Bjørn Mork
I'm wondering about the usefulness and correctness of some of the
warnings we print.
OK, I went looking for the spec background and found this in=20
"Universal Serial Bus Specification Revision 2.0" section
"9.2.3 Configuration":

"Interfaces are numbered from zero to one less than the number of con=
current interfaces
supported by the configuration."

So I guess the warnings are correct. Given that the non-sequentional
numbers are used and work just fine, I still question the usefulness
though. There are ~15 lines of code in drivers/usb/core/config.c just
for printing these warnings...


Bj=C3=B8rn
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Alan Stern
2013-01-17 18:40:28 UTC
Permalink
Post by Bjørn Mork
I'm wondering about the usefulness and correctness of some of the
warnings we print.
The warnings are correct. How useful they are is another matter...
Post by Bjørn Mork
Some vendors obviously allocate fixed interface numbers for specific
functions and present configurations with large "holes" in the interf=
ace
Post by Bjørn Mork
numbers.
Doing so violates the USB spec. Section 9.2.3 says: "Interfaces are=20
numbered from zero to one less than the number of concurrent interfaces
supported by the configuration." These devices probably could not pass=
=20
the USB-CV tests.
Post by Bjørn Mork
This example was just posted on the NM list, and I have some
=20
usb 1-1.5: new high-speed USB device number 7 using ehci_hcd
usb 1-1.5: config 1 has an invalid interface number: 8 but max is 3
usb 1-1.5: config 1 has no interface number 1
usb 1-1.5: config 2 has an invalid interface number: 12 but max is 1
usb 1-1.5: config 2 has an invalid interface number: 13 but max is 1
usb 1-1.5: config 2 has an invalid interface number: 13 but max is 1
usb 1-1.5: config 2 has no interface number 0
usb 1-1.5: config 2 has no interface number 1
=20
Is this useful to anyone?
In theory it would be useful to somebody developing firmware for a USB=20
device. If only such people would test their firmwares under Linux...
Post by Bjørn Mork
I expect it is just log noise to most users,
and some are probably confused and think there is something wrong her=
e.
Post by Bjørn Mork
At least when they are having some unrelated problem with the device.
=20
Should we just drop those warnings?
No opinion.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Peter Stuge
2013-01-17 18:55:02 UTC
Permalink
Post by Alan Stern
Post by Bjørn Mork
Is this useful to anyone?
In theory it would be useful to somebody developing firmware for a USB
device. If only such people would test their firmwares under Linux...
Some do. Maybe it's only hobbyists, but I think it may change, and I
think it's very good to warn about things which are wrong.
Post by Alan Stern
Post by Bjørn Mork
Should we just drop those warnings?
No opinion.
I think they should stay.


//Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Bjørn Mork
2013-01-17 20:52:12 UTC
Permalink
Post by Bjørn Mork
Is this useful to anyone?
=20
In theory it would be useful to somebody developing firmware for a U=
SB=20
device. If only such people would test their firmwares under Linux.=
=2E.
Some do. Maybe it's only hobbyists, but I think it may change,=20
The example I posted actually originates from a device with vendor
Linux support. I am pretty sure that some firmware engineer there has
tested the device with Linux and ignored those warnings.
and I
think it's very good to warn about things which are wrong.
I agree in principle, as long as the warning is good for something. In
this case it is not. There is absolutely zilch you and I can do about
the issue, and it does not cause any problems we need to be aware of
either.
Post by Bjørn Mork
Should we just drop those warnings?
=20
No opinion.
I think they should stay.
OK, but how about demoting them to debug messages instead of warnings?


Bj=C3=B8rn
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Alan Stern
2013-01-18 16:24:49 UTC
Permalink
Post by Bjørn Mork
Post by Bjørn Mork
Is this useful to anyone?
=20
In theory it would be useful to somebody developing firmware for a=
USB=20
Post by Bjørn Mork
device. If only such people would test their firmwares under Linu=
x...
Post by Bjørn Mork
Some do. Maybe it's only hobbyists, but I think it may change,=20
=20
The example I posted actually originates from a device with vendor
Linux support. I am pretty sure that some firmware engineer there ha=
s
Post by Bjørn Mork
tested the device with Linux and ignored those warnings.
=20
and I
think it's very good to warn about things which are wrong.
=20
I agree in principle, as long as the warning is good for something. =
In
Post by Bjørn Mork
this case it is not. There is absolutely zilch you and I can do abou=
t
Post by Bjørn Mork
the issue, and it does not cause any problems we need to be aware of
either.
=20
Post by Bjørn Mork
Should we just drop those warnings?
=20
No opinion.
I think they should stay.
=20
OK, but how about demoting them to debug messages instead of warnings=
?

If you want to make that change, I don't mind.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Peter Stuge
2013-01-18 16:27:44 UTC
Permalink
Post by Alan Stern
Post by Bjørn Mork
Post by Peter Stuge
Post by Alan Stern
Post by Bjørn Mork
Should we just drop those warnings?
No opinion.
I think they should stay.
OK, but how about demoting them to debug messages instead of warnings?
If you want to make that change, I don't mind.
I prefer that they stay visible by default, because it increases the
likelyhood that someone will actually notice them.

Clearly the people who stand to benefit from these messages aren't
actively looking to find problems with their USB device.


//Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-***@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Loading...