media: uvcvideo: Shorten the transfer size non compliance message
Subsystems (2)
PATCH 1/1 media: uvcvideo: Shorten the transfer size non compliance message
This message is much longer than others and doesn't fit even in a 160 column window when printed, despite providing little real information.
Also replace 'transmission' with 'transfer' because that's the actual name and 'max packet' with 'limit' because it isn't same thing with isochronus endpoints. Remove cryptic abbreviations like 'ep'.
---
By the way, this hack doesn't help much in the opposite case:
dwMaxPayloadTransferSize is right, but EP descriptors are a mess.
But no harm in trying, I guess.
I can live with it either way.
drivers/media/usb/uvc/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/uvc/uvc_video.c +1 -1
@@ -266,7 +266,7 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream,if (stream->intf->num_altsetting >1 && ctrl->dwMaxPayloadTransferSize > stream->maxpsize) {dev_warn_ratelimited (&stream->intf->dev, -"UVC non compliance: the max payload transmission size (%u) exceeds the size of the ep max packet (%u). Using the max size.\n" , +"UVC non compliance: Reducing max payload transfer size (%u) to fit endpoint limit (%u).\n" , ctrl->dwMaxPayloadTransferSize, stream->maxpsize); ctrl->dwMaxPayloadTransferSize = stream->maxpsize;
Signature · 1 line
2.48.1
Hi Michal
I like the new writing :)
Quoted 8 lines · Michal Pecio
This message is much longer than others and doesn't fit even in a 160 column window when printed, despite providing little real information.
Also replace 'transmission' with 'transfer' because that's the actual name and 'max packet' with 'limit' because it isn't same thing with isochronus endpoints. Remove cryptic abbreviations like 'ep'.
Quoted 27 lines
Signed-off-by Michal Pecio <[email protected]>---
By the way, this hack doesn't help much in the opposite case:
dwMaxPayloadTransferSize is right, but EP descriptors are a mess.But no harm in trying, I guess.
I can live with it either way.drivers/media/usb/uvc/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/usb/uvc/uvc_video.c +1
-2@@ -266,7 +266,7 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream,if (stream->intf->num_altsetting >1 && ctrl->dwMaxPayloadTransferSize > stream->maxpsize) {dev_warn_ratelimited (&stream->intf->dev, -"UVC non compliance: the max payload transmission size (%u) exceeds the size of the ep max packet (%u). Using the max size.\n" , +"UVC non compliance: Reducing max payload transfer size (%u) to fit endpoint limit (%u).\n" , ctrl->dwMaxPayloadTransferSize, stream->maxpsize); ctrl->dwMaxPayloadTransferSize = stream->maxpsize; --
Quoted 2 lines
2.48.1
--
Ricardo Ribalda
Quoted 6 lines · Ricardo Ribalda
Hi Michal
I like the new writing :)
Quoted 1 line · Michal Pecio
Quoted 8 lines
Quoted 7 lines
This message is much longer than others and doesn't fit even in a 160 column window when printed, despite providing little real information.
Also replace 'transmission' with 'transfer' because that's the actual name and 'max packet' with 'limit' because it isn't same thing with isochronus endpoints. Remove cryptic abbreviations like 'ep'.
Reviewed-by Ricardo Ribalda <[email protected]>
Thank you.
On second thought, I'm not sure if those brackets look good here:
[ 2410.688715] uvcvideo 11-1:1.1: UVC non compliance: Reducing max payload transfer size (32764) to fit endpoint limit (20480).
but I sent the patch already. If you think it would be better without them, please feel free to tweak the patch or ask for v2. If not, meh.
Regards,
Michal
Quoted 16 lines · Michal Pecio
Quoted 6 lines · Ricardo Ribalda
Hi Michal
I like the new writing :)
Quoted 1 line · Michal Pecio
Quoted 8 lines
Quoted 7 lines
This message is much longer than others and doesn't fit even in a 160 column window when printed, despite providing little real information.
Also replace 'transmission' with 'transfer' because that's the actual name and 'max packet' with 'limit' because it isn't same thing with isochronus endpoints. Remove cryptic abbreviations like 'ep'.
Reviewed-by Ricardo Ribalda <[email protected]>
Quoted 8 lines
Thank you.
On second thought, I'm not sure if those brackets look good here:
[ 2410.688715] uvcvideo 11-1:1.1: UVC non compliance: Reducing max payload transfer size (32764) to fit endpoint limit (20480).but I sent the patch already. If you think it would be better without them, please feel free to tweak the patch or ask for v2. If not, meh.
I like th enew message.
Signature · 3 lines
Regards, Laurent Pinchart
Laurent Pinchart
maintainerQuoted 7 lines · Michal Pecio
This message is much longer than others and doesn't fit even in a 160 column window when printed, despite providing little real information.
Also replace 'transmission' with 'transfer' because that's the actual name and 'max packet' with 'limit' because it isn't same thing with isochronus endpoints. Remove cryptic abbreviations like 'ep'.
Quoted 5 lines
Signed-off-by Michal Pecio <[email protected]>---
By the way, this hack doesn't help much in the opposite case:
dwMaxPayloadTransferSize is right, but EP descriptors are a mess.
Have you encountered such devices ?
Quoted 19 lines
But no harm in trying, I guess.
I can live with it either way.drivers/media/usb/uvc/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/usb/uvc/uvc_video.c +1
-1@@ -266,7 +266,7 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream,if (stream->intf->num_altsetting >1 && ctrl->dwMaxPayloadTransferSize > stream->maxpsize) {dev_warn_ratelimited (&stream->intf->dev, -"UVC non compliance: the max payload transmission size (%u) exceeds the size of the ep max packet (%u). Using the max size.\n" , +"UVC non compliance: Reducing max payload transfer size (%u) to fit endpoint limit (%u).\n" , ctrl->dwMaxPayloadTransferSize, stream->maxpsize); ctrl->dwMaxPayloadTransferSize = stream->maxpsize;
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 8 lines · Laurent Pinchart
Quoted 7 lines · Michal Pecio
This message is much longer than others and doesn't fit even in a 160 column window when printed, despite providing little real information.
Also replace 'transmission' with 'transfer' because that's the actual name and 'max packet' with 'limit' because it isn't same thing with isochronus endpoints. Remove cryptic abbreviations like 'ep'.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Michal Pecio <[email protected]>---
By the way, this hack doesn't help much in the opposite case:
dwMaxPayloadTransferSize is right, but EP descriptors are a mess.Have you encountered such devices ?
Yes, it sometimes reports bad 'mult' in EP descriptors, which leaves them with insufficient BW for some video modes. Can be fixed with the usual "turn it off, turn it on again".
I frankly haven't bothered trying what would happen if I override mult in USB core and I think it would be crazy to send that upstream anyway.
Before that patch, it would simply fail with "no fast enough alt setting" and -EIO or some such seen by userspace. Now it produces truncated frames. But also nothing worse than that, so it's fine.
Regards,
Michal