Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3547574pxb; Mon, 24 Jan 2022 11:57:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwitrSY2g66aSEy+rRVwWTQvNNzm6Jq8QWOJhhx3Tx8Vrpm6/DmpPvk3lb3+/AzM0Jc57+ X-Received: by 2002:a17:902:d4ca:b0:14b:5c6d:fc16 with SMTP id o10-20020a170902d4ca00b0014b5c6dfc16mr4249569plg.24.1643054245638; Mon, 24 Jan 2022 11:57:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054245; cv=none; d=google.com; s=arc-20160816; b=0zhIQkS+RzkjzdJP6+eUz1wSbDIvHa4daG7Zv+T3D4dvYdST5oJy9TSqvQXZn+CD8P dy+c35bKdbcJkrVHfFZat/yMoDYnBWXSEVFRqnvpbG8sI5JjzKl0BKLUn20B0RmUEG1i iKqZPcBkIM79ex9lNliuo1+uRLkM/GtDjPjA73suhNbT78KSlKesIlFeh221/NlrlsQR Hc1h0vOyz41IzKDUVfUr6/93D4XJneb/WHWHBRO8687jhNsD17QPKLei/bawmMMldJhM LRmetAJ877x9AXzfSYL0buLy29/zo3qLr6jZABTzCk+auvDQzErmd+qvwbV8w9ncrfmx pKbQ== 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=KYV/dbLRxHxD1hbBujeYFbCNrRGsdoD4Tcu/eg/plmU=; b=i+qVQ1IK0E58ynxk586hgf1r8Rbip8gsv3tA4PufJzb0uVtXmXT7f9JQLGKTT7s8r7 G3/pZ3thYDE9q4C63BCF4oU7i086LOOiHd+J0xLVxgFRZnkDJbaEBtqe3riiVi0SiZDL gDJX9TFzWxGA7x8TY3Srp+DT2+Agttg4OrbvSlASQ83YwyQigqsRj+le6ZfeVlRLryK+ 2o/lz9tbMP2xbQFZwJmth3AvhRLsJzCdB/PVDyPDxdkOnNXUdkML92ytXJlHjVLUVYDI ZirWdrjU4tBm+2CsCjjf6Rje1j++1WufZv4pKNROB7jlcMSFcFYbLKzrtuolVEEldIb+ lNQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iy+++X7Z; 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 v7si14422358plo.89.2022.01.24.11.57.13; Mon, 24 Jan 2022 11:57:25 -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=iy+++X7Z; 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 S245379AbiAXSve (ORCPT + 99 others); Mon, 24 Jan 2022 13:51:34 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:49164 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245683AbiAXSuY (ORCPT ); Mon, 24 Jan 2022 13:50:24 -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 8D926614D4; Mon, 24 Jan 2022 18:50:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6417BC340E5; Mon, 24 Jan 2022 18:50:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050224; bh=ZCLq4ueO8BEDL+z2nWwbk/NGy+MQ8q+TZbhlMK+G2fY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iy+++X7Z8lbw9IaJNUxtZDCR6PLOf65x/9Zo4norIPChsV9KZyTD33R5R9Qv86/Ez sw8j8fLw/uDH4ejAKylJtWVXdZofG5CQwmof8yBfEfHhQ6u/b1ABHMuK7Fdzu1DZnK juncWqPL2lEXM6xGBTJzFAP5jSnRE/hRqkUzkpRU= 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.4 016/114] media: pvrusb2: fix control-message timeouts Date: Mon, 24 Jan 2022 19:41:51 +0100 Message-Id: <20220124183927.614206819@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183927.095545464@linuxfoundation.org> References: <20220124183927.095545464@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 @@ -1488,7 +1488,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"); @@ -1627,7 +1627,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; @@ -3491,7 +3491,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; } @@ -4017,7 +4017,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);