Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3622150pxb; Mon, 24 Jan 2022 13:43:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQySQKygkaP3bvk/fFPdcDRr3+aqmDdp9DVeAUuB8b6jes67jOUMW7b8obFmpFGzO6vuQx X-Received: by 2002:a17:90a:dc86:: with SMTP id j6mr317058pjv.52.1643060624910; Mon, 24 Jan 2022 13:43:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643060624; cv=none; d=google.com; s=arc-20160816; b=T0v2AkPkLp3iEA3MCI3qLaMrA3bsjVzFIQVGn117vCnjDeemVZm4JCFkiiZZAQFHg7 o8LTE7k0qgOxC3Tq/Z+BoKPCUC8LTJagrc6Yexy3K6hekhSPKO5bkmekMoC0WGcSR4fi J9B/g7wVsTKuKNGr1PDNfjNL1MA69K/s2bMukvZNS+PQBLy1z8BkNiSPh6q/ZODsidTJ cqw0+iuNXGJBovFZSzUg7rKkH2+x+vgwzhwSCq23267wMlGebLm8lzLxd1KS9fLo+DH9 BrgpwJ+WQCo/fQLbJY4LGmV6zKo8510AnBy+DUQVNclyJjk1yBiSANJqS/UN9WgbYD/p zQvg== 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=IWle+Pe/m/m+iYLGvJ4TLnj/OZqiO8VDzTsGpUB+7MnFesKkd69FFZV6jasvtMhJWb m9doJrlMVEGjE2w0kNC4yBdD5BPUpVgOuWMGVP6PqzB4GHQKTfT8OCeMwwUyQnSGzfRo /yueZGrjkpyt4TfRW2J7aAWhDrAyK9RAt9xrm7ARq8EFac94bU1Su9Pfcvmuyje6hWgv YLo4rTjTQSmz1ae8EiSNRRpS1WmvVgXSsm40HmIETvQ5JUm9yBMKm1hXW1lgL4J2YVvr SyPVVK/OhQeoFiExbTF2Xu8KtksqB0Bxzq/jc/q1jvZgKHQu1uxNZBa8n6TTviS4e2M3 p4IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aiKx61+v; 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 q4si12225825pla.518.2022.01.24.13.43.25; Mon, 24 Jan 2022 13:43: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=aiKx61+v; 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 S1451994AbiAXVXy (ORCPT + 99 others); Mon, 24 Jan 2022 16:23:54 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:49742 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443357AbiAXU4o (ORCPT ); Mon, 24 Jan 2022 15:56:44 -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 46EDE60B11; Mon, 24 Jan 2022 20:56:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E1D2C340E5; Mon, 24 Jan 2022 20:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057803; bh=PSnOz8+2zdvBrxOTMHC/DW/3Ey4OxIgreWCpGuumD1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aiKx61+vY1wQd9xuXoPDZN9nNrnAUhJeUdWY+S5LzZaH4gNFiMRXTG3bfjFNeUVi9 K/W8zIWUOFZSuKcr4KN2bv9yVGNnQJ5rcR+AkJPiMLC0DYZEkL5gtYOdm4QmNdZN3a 6SQjzVpDfPYhkWBFFtxlftkaQVmJ3fJEnXKLGUeM= 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.16 0052/1039] media: pvrusb2: fix control-message timeouts Date: Mon, 24 Jan 2022 19:30:41 +0100 Message-Id: <20220124184126.884775655@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@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);