Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3558089pxb; Mon, 24 Jan 2022 12:10:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsn2ZPZuO88KzkxoPL+chVzlNzxWL6Sqepw2ViAVtkp0Hb+n7n+sQ9AU+LjhL825ixy+C2 X-Received: by 2002:a05:6a00:21ca:b0:4ca:5088:9b68 with SMTP id t10-20020a056a0021ca00b004ca50889b68mr2366005pfj.63.1643055055232; Mon, 24 Jan 2022 12:10:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643055055; cv=none; d=google.com; s=arc-20160816; b=LwmqARsp41F7Vo3uUE/TjltMoIgyJyixZKAW+/qDTHCADOF3knPXoJO3tG5V52HoyL ZaT9ACMkriCB70PSIPig2hN6qjAiOzJO444Gk442Yn4QiBv+LWJZk1HFVNDphAr5PjsY PysyGwJCRSlgnFUBaD3On1zRfB6w82Dxab+NyzNqaae59VaacFrM307CVD1FEM2kJTt2 X5kOdFRONCh2572GJq3l+RmwVxwsEyOI7Ra8XCe7gBjYcjNhm8H77awxb6TzspoykW/H ZYC2201rF1kHa3zXMaJcQCL2V/aYu2/SCdArObfafUNQiRXMFwaQk/MoN6+hTGuQj+gJ ck2Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PF6rEoR8qO6lJHOc0wAat4mKJOUjOcBwZoEuto8P93s=; b=e9okbq9OxoIBGAPOztJFMxtXtG6iVxSxoodDDYTS8HFBg+9SuoeYwnW2ipPHjPwtHy 9EAkKI5wDtbX8mOM7qIBO4T8lWdqgxKmeIpCuFtnEgMRD3pXV3nV+wzsVl6JzGS7b3Tb DXwl263x7SqOXkXy/8kWspzlD3p/PnOA0rz9cMhnY1reERwDvjGdZQ/i4T+mGnssSqLv /nS7vHqlxRyDfDndAWbh1APHHwMXVY49aTe152ospVK0oL3Jh4NqWsVjcgH2BYRf1ae2 dWt4886IPa9Yl/iT2UX4p52sI68+/tpJnJ7WoeNItRltBlFXYYfdh/j01NSCvtacWq3t avTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0i6+GDM4; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q10si14991875pgs.421.2022.01.24.12.10.42; Mon, 24 Jan 2022 12:10:55 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=0i6+GDM4; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344015AbiAXTMj (ORCPT + 99 others); Mon, 24 Jan 2022 14:12:39 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:33876 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344077AbiAXTDl (ORCPT ); Mon, 24 Jan 2022 14:03:41 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0833E609EE; Mon, 24 Jan 2022 19:03:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8678C340E5; Mon, 24 Jan 2022 19:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051019; bh=S7Bor6nMftAccTraRKBR6ZDsxiNHuWT8eVG+H98iHlE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0i6+GDM4WC8Y4yDiuB+acAlZzV1lxoZfdnS2QLSzwR4oJLIBgfKYkQe+lEVrm7NFI QbqMHUHvVa6+mSBlb1xPSY68bX8OHvmiBTaAfOyny/b3EM6RD4DdupHsgrqQnhOfnw CCdfjChvMSf7H4KH1G/jH89hnHozQd1hNwSUXGDE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 4.14 028/186] media: pvrusb2: fix control-message timeouts Date: Mon, 24 Jan 2022 19:41:43 +0100 Message-Id: <20220124183938.025757876@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit b82bf9b9dc305d7d3d93eab106d70dbf2171b43e upstream. USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Fixes: d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18") Cc: stable@vger.kernel.org # 2.6.18 Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c @@ -1476,7 +1476,7 @@ static int pvr2_upload_firmware1(struct for (address = 0; address < fwsize; address += 0x800) { memcpy(fw_ptr, fw_entry->data + address, 0x800); ret += usb_control_msg(hdw->usb_dev, pipe, 0xa0, 0x40, address, - 0, fw_ptr, 0x800, HZ); + 0, fw_ptr, 0x800, 1000); } trace_firmware("Upload done, releasing device's CPU"); @@ -1614,7 +1614,7 @@ int pvr2_upload_firmware2(struct pvr2_hd ((u32 *)fw_ptr)[icnt] = swab32(((u32 *)fw_ptr)[icnt]); ret |= usb_bulk_msg(hdw->usb_dev, pipe, fw_ptr,bcnt, - &actual_length, HZ); + &actual_length, 1000); ret |= (actual_length != bcnt); if (ret) break; fw_done += bcnt; @@ -3433,7 +3433,7 @@ void pvr2_hdw_cpufw_set_enabled(struct p 0xa0,0xc0, address,0, hdw->fw_buffer+address, - 0x800,HZ); + 0x800,1000); if (ret < 0) break; } @@ -3961,7 +3961,7 @@ void pvr2_hdw_cpureset_assert(struct pvr /* Write the CPUCS register on the 8051. The lsb of the register is the reset bit; a 1 asserts reset while a 0 clears it. */ pipe = usb_sndctrlpipe(hdw->usb_dev, 0); - ret = usb_control_msg(hdw->usb_dev,pipe,0xa0,0x40,0xe600,0,da,1,HZ); + ret = usb_control_msg(hdw->usb_dev,pipe,0xa0,0x40,0xe600,0,da,1,1000); if (ret < 0) { pvr2_trace(PVR2_TRACE_ERROR_LEGS, "cpureset_assert(%d) error=%d",val,ret);