Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3643221pxb; Mon, 24 Jan 2022 14:14:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxB1La5BNZI9gsNh321gE44JYH3BpKlRn602yv6N2OIIReudoyrlntN6bblX50UNzASBp2r X-Received: by 2002:a17:90a:f485:: with SMTP id bx5mr424675pjb.46.1643062484096; Mon, 24 Jan 2022 14:14:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643062484; cv=none; d=google.com; s=arc-20160816; b=svknbaV+tAsDQjCFZvv7RK7GPY8M/1I7WdGagrsNZ3wSyPa/AK+kz7U9AjKarTNOvd Zd1PygehRCyjSNDf0Z8rwg/OBm3UCuXk/YrRlIccyNAz37PCjKJn4Dp8rTULMal45D10 l+d1G9b/PBP53R+MLIutka80HMHjO3T8Z8ezIVJY1uVvBb+mPxE2DgB/vGwQutOE0z7/ aNZ90QFiQ7tsbCMNbr1uKaAouOC88BDJkaSDFnghXExGiX8t1h4rjUgVsNXevbhbdAQJ Bj0qm2OIPrFkErGs2s2ef3e3wCSImRGFVPTLlmQODav+eMcrGtkRFOgDStnOAiO/gHN0 ApOw== 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=HYz2UKZZWgdUK1hgEiVgdX0MmMbfW6sDW3GbP2AzLhI=; b=hnCZQIVrR5akFq7p5BQDIUeCahbMpWCXCRPqr402kG+ml2aLlWFcQ57fgAUbHUDuZY m/5ldDMFH0PTSCqUgi6KWY3d67kD7n9GsZRVOhvB9YCS/K82JckvNZXxufxai/gHfAIs CRA+7JFzau7PdgR1EOufDS8GgreOivkCJBvU+aYjxE5nuvpCzCcG2MRcLWFXQQZQ7AZN FQd8k5wrDUv/UONdu7sbcyApxMX35Eopk8RA6nwZA+q/GS/w7ZWgbm+0QiSfF8MyBWab hJg3QhRswC4mVNVe8iolI9n37U0N2GB4wFc0kl/Qbuhg8x7QjjPQJAui51rrL8g7l1F3 4dlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="zT/AZwEc"; 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 s193si14666696pgs.318.2022.01.24.14.14.26; Mon, 24 Jan 2022 14:14:44 -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="zT/AZwEc"; 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 S1579254AbiAXWFN (ORCPT + 99 others); Mon, 24 Jan 2022 17:05:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1449775AbiAXVQ7 (ORCPT ); Mon, 24 Jan 2022 16:16:59 -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 4B408C09F4BD; Mon, 24 Jan 2022 12:12:07 -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 DD38E61368; Mon, 24 Jan 2022 20:12:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9976FC340E5; Mon, 24 Jan 2022 20:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055126; bh=PSnOz8+2zdvBrxOTMHC/DW/3Ey4OxIgreWCpGuumD1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zT/AZwEcU4loj1CCEnluBLL2rXG8buQCZg+z7mU00YynQkcCKjvlap2eQkwZChNzW 6p/aI4dtsRp/Qmiqz/577JJ17lHUkH6yN/3yh6l8k142VYotP7MXtkx7F0Xmxgp+kQ XK9nEG3yzLfw1IRfJQ1t28bXNNXs76mtOYF01YfQ= 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.15 050/846] media: pvrusb2: fix control-message timeouts Date: Mon, 24 Jan 2022 19:32:47 +0100 Message-Id: <20220124184102.679166775@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 @@ -1467,7 +1467,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"); @@ -1605,7 +1605,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; @@ -3438,7 +3438,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; } @@ -3977,7 +3977,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);