Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3586440pxb; Mon, 24 Jan 2022 12:53:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEzu94iz1lZixxiowwYbkUDSR+UxEkjCDUPP0FKy/2e2rDzIa5bW5b+EAfFBAyN+MwPgLJ X-Received: by 2002:a17:90b:1648:: with SMTP id il8mr112142pjb.227.1643057617592; Mon, 24 Jan 2022 12:53:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643057617; cv=none; d=google.com; s=arc-20160816; b=MSYlRljp/F5/6BrS7v6UvEB3bn/w4vQusRxH7seVd8UGEI6LKX4cNyTljhlU7Qhaq1 GPiQky/h0xWgYIZ/TkfD6zkz/F70a9TUu0ImDbxce8+AC4vk8nAlrJVrdP3s9vLja2OO nnoJBHJoWR1V7duHvnafyA2SbfWqRqwtrSNiq2rkOGgryPG0Z3fOffRJYcl1SCVxPTLg qpkPzaY6DzZm70YmXv1PJjvg9JDoAQ3xpAvqTxqxsci7TqM2FZufPl6/Xu4lp5ds6U8B wx5FBMdZ9KJR85nDxsPPpH3286/B5zj0yZ48DDjlCJPP6+2NjSFjeYnlavUo/WEkWtsW zKuQ== 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=1dsg5o1dqk3kkEYvO8VeLolU0Sp73smeoBekoRsVLmU=; b=hGM6/gXc4ahRSmZzLONgnTMtePbfoC/JOoOQU+gSnmpTdwn9HduzTo2Mf1/n6VnYFg yKUIqivRQfut/toh2dw5xsKhqjpHDSNu1BJbs77cl+eJuWl/AieeUT542WuKS6d3MuKe aDK4L/ucvik+kbuMApOP0ko4VqbaePB8c1vGKFTZmkTvQm+ui3eZFABd9v2JAt7IICd+ 3N4aPJZH2aAQQ8zb3THwSn6FzWJiPBZzrOav+DCKtsQh9gWlJJtmRtsQA6j3VaO0lPho FrgKdWo5lcKZLqFMlWlkN+l6y7vf4Tr0om+KSJsUZEYp3iS82AhY53+8PN2Pizc04n+x ocJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NmGxnUIH; 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 ik8si13163595plb.390.2022.01.24.12.53.25; Mon, 24 Jan 2022 12:53:37 -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=NmGxnUIH; 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 S1379075AbiAXUKR (ORCPT + 99 others); Mon, 24 Jan 2022 15:10:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348424AbiAXTwj (ORCPT ); Mon, 24 Jan 2022 14:52:39 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26D99C0617BD; Mon, 24 Jan 2022 11:25:29 -0800 (PST) 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 B8D5F61483; Mon, 24 Jan 2022 19:25:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA75AC340E5; Mon, 24 Jan 2022 19:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052328; bh=x8ZQ3S8zIVTHi8vfagOrUccfQLdVTDvY8UlvC4IZUdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NmGxnUIHU4ZFabSU6Fxs0F4D6n0+HkeXqnqA5x2SYESg956U6mf+uV9U56oLZ/Mce 1XjAesKJxykWAFGi8tupqjHlsaobsZ/EA1i10CZwoKcgtwEEQByN6ILq5xTwazwNtR fevI2ejUtVHe/SKhMNr7LMtnXTgPrVnAPFK+nfJ4= 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 5.4 022/320] media: pvrusb2: fix control-message timeouts Date: Mon, 24 Jan 2022 19:40:06 +0100 Message-Id: <20220124183954.505885405@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@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 @@ -1468,7 +1468,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"); @@ -1606,7 +1606,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; @@ -3439,7 +3439,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; } @@ -3978,7 +3978,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);