Skip to content

Commit a941594

Browse files
tiwaigregkh
authored andcommitted
media: go7007: Fix URB type for interrupt handling
[ Upstream commit a3ea410 ] Josef reported that his old-and-good Plextor ConvertX M402U video converter spews lots of WARNINGs on the recent kernels, and it turned out that the device uses a bulk endpoint for interrupt handling just like 2250 board. For fixing it, generalize the check with the proper verification of the endpoint instead of hard-coded board type check. Fixes: 7e5219d ("[media] go7007: Fix 2250 urb type") Reported-and-tested-by: Josef Möllers <josef.moellers@suse.com> BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1162583 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206427 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 657e50f commit a941594

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/media/usb/go7007/go7007-usb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
10441044
struct go7007_usb *usb;
10451045
const struct go7007_usb_board *board;
10461046
struct usb_device *usbdev = interface_to_usbdev(intf);
1047+
struct usb_host_endpoint *ep;
10471048
unsigned num_i2c_devs;
10481049
char *name;
10491050
int video_pipe, i, v_urb_len;
@@ -1140,7 +1141,8 @@ static int go7007_usb_probe(struct usb_interface *intf,
11401141
if (usb->intr_urb->transfer_buffer == NULL)
11411142
goto allocfail;
11421143

1143-
if (go->board_id == GO7007_BOARDID_SENSORAY_2250)
1144+
ep = usb->usbdev->ep_in[4];
1145+
if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK)
11441146
usb_fill_bulk_urb(usb->intr_urb, usb->usbdev,
11451147
usb_rcvbulkpipe(usb->usbdev, 4),
11461148
usb->intr_urb->transfer_buffer, 2*sizeof(u16),

0 commit comments

Comments
 (0)