Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp852703pxk; Thu, 17 Sep 2020 19:06:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMS3ZTFF2eBEOYE1Wr/rsrU77gGdHNBb/X/+DKh7+Ujn/O9CHITIQwEyg4tEJ/dgG+i1jn X-Received: by 2002:aa7:d458:: with SMTP id q24mr36844312edr.23.1600394810638; Thu, 17 Sep 2020 19:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600394810; cv=none; d=google.com; s=arc-20160816; b=FNe3Z57QNM5nrF9+AJXfyk8HCDlZI0kTHjrtuFq8xQsng82bU0m+5PNQVVwf7De59K cOaijuqStzdiNRsvJLPdPqwslPM8EkaSSxl7nFV2kGl4jONqR70inRW2Zjdlwfs1h4ma eKPq53jneTOKhMUKIZaZKjhs5sccAPhOgIKp5qi4It4TPrlY4bjXthgs0W2BvgZeO6Ae a0GvgMsW4tBNntc+W9/lUo4zDOXZ5t9nsxSJYp9YD7ql9ydiGNCsHlYKj0L0tatBMg+U DRskR9g1QjX8pJ2YayE2SNHqtYi5T+ZMcpscSIE0viX7cEt3nnO02F4kS1f8DNn4CPSy T8GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gqNvYBMyZ1xESlKS2Wss6btwVWII+qAIDjRsvZNdkU4=; b=dN8OR7kVNEpMsgoiLfrAEygmeieXkFMZW5twrIbDQxPhQCgO/ZR1x/3cNc0JMG0sRS HnL3Xr1Z+TB7uRCrRUsnM1vOmb8lPp4CY7Ch4T+5GYPpxpxekUD1hwA8N7pLP5K1Ogxr fLc8gMo3bn1NRZsAqk70yxMth7/mRQJDKs/MVRqQdtkCwK9kza/ILgGhS+04DhRjCUuK RPQwGpawbhzg3hHXngCrY2388hLAoSpJSUDr4PB+NCnlDvZ7tllY3Ey7V8w118uGc4T7 GI75IQKrGfS/GoH9wDV6X8CHXJAI6HMt9txB/DdKOKu6gdQm/5Qnx1afZR6L68cNwiTx AtaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=otjPKHc+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u2si1203581ejx.507.2020.09.17.19.06.27; Thu, 17 Sep 2020 19:06:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=otjPKHc+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727310AbgIRCEZ (ORCPT + 99 others); Thu, 17 Sep 2020 22:04:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:51530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727264AbgIRCET (ORCPT ); Thu, 17 Sep 2020 22:04:19 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03D3D2388D; Fri, 18 Sep 2020 02:04:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394653; bh=6Nq2HNEwR1KMNGLEz8HadXWVEGLF1X2YtNQ2rH4FjP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=otjPKHc+BSDp5kckWaxgE3N7vhvLAHEoXQUt8THgl0GSU8eQrPqtIYiMx59IWaLvh AWFlRmpqyyIkh5DZ7np1f8d3baj8DCta3HuwJdRRLs3cIG2C7GDggwP0uDVPvWTmdh Q31EA5xS+v8bpGrCYShIuI8vEIYkV/lQ97hyHO2c= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Takashi Iwai , =?UTF-8?q?Josef=20M=C3=B6llers?= , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.4 150/330] media: go7007: Fix URB type for interrupt handling Date: Thu, 17 Sep 2020 21:58:10 -0400 Message-Id: <20200918020110.2063155-150-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Takashi Iwai [ Upstream commit a3ea410cac41b19a5490aad7fe6d9a9a772e646e ] 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: 7e5219d18e93 ("[media] go7007: Fix 2250 urb type") Reported-and-tested-by: Josef Möllers 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/usb/go7007/go7007-usb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/go7007/go7007-usb.c b/drivers/media/usb/go7007/go7007-usb.c index ff2aa057c1fbc..f889c9d740cd1 100644 --- a/drivers/media/usb/go7007/go7007-usb.c +++ b/drivers/media/usb/go7007/go7007-usb.c @@ -1044,6 +1044,7 @@ static int go7007_usb_probe(struct usb_interface *intf, struct go7007_usb *usb; const struct go7007_usb_board *board; struct usb_device *usbdev = interface_to_usbdev(intf); + struct usb_host_endpoint *ep; unsigned num_i2c_devs; char *name; int video_pipe, i, v_urb_len; @@ -1140,7 +1141,8 @@ static int go7007_usb_probe(struct usb_interface *intf, if (usb->intr_urb->transfer_buffer == NULL) goto allocfail; - if (go->board_id == GO7007_BOARDID_SENSORAY_2250) + ep = usb->usbdev->ep_in[4]; + if (usb_endpoint_type(&ep->desc) == USB_ENDPOINT_XFER_BULK) usb_fill_bulk_urb(usb->intr_urb, usb->usbdev, usb_rcvbulkpipe(usb->usbdev, 4), usb->intr_urb->transfer_buffer, 2*sizeof(u16), -- 2.25.1