All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] media: fix zero-length USB control requests
@ 2021-05-31  9:44 Johan Hovold
  2021-05-31  9:44 ` [PATCH v2 1/3] media: gspca/gl860: fix zero-length " Johan Hovold
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johan Hovold @ 2021-05-31  9:44 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Hans Verkuil, linux-media, linux-usb, linux-kernel,
	Eero Lehtinen, Johan Hovold

The direction of the pipe argument must match the request-type direction
bit or control requests may fail depending on the host-controller-driver
implementation.
    
Control transfers without a data stage are treated as OUT requests by
the USB stack and should be using usb_sndctrlpipe(). Failing to do so
will now trigger a warning.

This series fixes the three media drivers that got this wrong.

Johan

Changes in v2
 - keep the rtl28xxu zero-length read request which is needed for
   proper type detection (Eero)


Johan Hovold (3):
  media: gspca/gl860: fix zero-length control requests
  media: gspca/sunplus: fix zero-length control requests
  media: rtl28xxu: fix zero-length control request

 drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 11 ++++++++++-
 drivers/media/usb/gspca/gl860/gl860.c   |  4 ++--
 drivers/media/usb/gspca/sunplus.c       |  8 ++++++--
 3 files changed, 18 insertions(+), 5 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2021-05-31  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31  9:44 [PATCH v2 0/3] media: fix zero-length USB control requests Johan Hovold
2021-05-31  9:44 ` [PATCH v2 1/3] media: gspca/gl860: fix zero-length " Johan Hovold
2021-05-31  9:44 ` [PATCH v2 2/3] media: gspca/sunplus: " Johan Hovold
2021-05-31  9:44 ` [PATCH v2 3/3] media: rtl28xxu: fix zero-length control request 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.