Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3563985pxb; Mon, 24 Jan 2022 12:18:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxpZ45xKGVyVvZJcJZnWY9N3dFDoCRIA7Cbx/vJx0iNwfg0MPeokHFnTlyV6nePyMb6aTu X-Received: by 2002:a17:903:120d:b0:149:ab6c:75d4 with SMTP id l13-20020a170903120d00b00149ab6c75d4mr16094575plh.3.1643055437209; Mon, 24 Jan 2022 12:17:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643055437; cv=none; d=google.com; s=arc-20160816; b=OGjAWPuddYwkT2ifgKGbkfO5Q9UJ1H4uwl2+OLOTtDXRk00Ukoj4oJppCUYpOY9J5B V11yK3DtrvogDddA2Ynf2KtFE3YZss40ACpNDxoTI/NJLWCRmOESwHI/n5I86PAK/9Kx FnPV/weUyFTTYVrGhPy7C8lgkfQBQ+AQz+KN1jwn+6U26x/+KrsFF3FMDf+2Z5rKhlbA +xB+Le/tlF1QD3gDVj2avW+ToE0GyuRihyNlSB/x1hrbda0ouBIX5rWnYanjJK4FgFs4 OXQ9ZK5oHfzKipjw0zk6aclgTHS92n2rc6GpAXJmDyi9F9yF/+OHVD87gVIk6GYEqMHc WYTA== 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=FN3S/ot9Rc3RGtIFwMyCka7YlDxOVS3ziFODskk9O1s=; b=HIGIopXi0MlRq35qprHJ7GpiKylqdJKvlEqageokjUo3rfQjwkWy9qaU8W/s6IUZij S7gXGGFM87j/coesnan6iYZs/2ro/xZJM2tnmcDDXkzheikahhmhni1z/BFiwklBPRv4 RjxlEli/Zkr9+maI9v5IBQl9ajartR0+QLVIQ8qRLxZnP+FBkF3PTCbvvpTVcwIeqVub wZ5JuUt2u5Rd8h/KAuhDvwG570BF+1FWJj68+rZp/oaafcOY/ZFYSuuOozpEQNrDlASh 9Aho8lN2Z7moei1BNkyx1/8il4VFal+xVYy37bEWiOfGeZnu9z7TUQ9rYMMdp4uJDiDC h4xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vTH4Beeb; 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 k15si18752272pga.245.2022.01.24.12.17.04; Mon, 24 Jan 2022 12:17:17 -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=vTH4Beeb; 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 S1348833AbiAXTTq (ORCPT + 99 others); Mon, 24 Jan 2022 14:19:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345898AbiAXTLj (ORCPT ); Mon, 24 Jan 2022 14:11:39 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C0E5C061A0F; Mon, 24 Jan 2022 11:03:22 -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 ams.source.kernel.org (Postfix) with ESMTPS id 40C7FB8119D; Mon, 24 Jan 2022 19:03:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 543AEC340E7; Mon, 24 Jan 2022 19:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051001; bh=mzhVvtZbKKTuMHdTT/tTcCrIaSXjHW7htVq1Q5kYpyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vTH4Beebbo25udXVnOH09t9pAYXqjEvScI/9qnKCXCwg7K9z8hGchJGT3LWsDReiX 21SNRytawUdMHOtnh4lvr/sCGxULFejk6u59TsKWg6ogYd+IF5LlONIs4cs/uOtqtO 5zvKZpUuNvpn2jEa3MDhmv1v0HJyMSrofR0vPd18= 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 022/186] media: mceusb: fix control-message timeouts Date: Mon, 24 Jan 2022 19:41:37 +0100 Message-Id: <20220124183937.834475984@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 16394e998cbb050730536bdf7e89f5a70efbd974 upstream. USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Fixes: 66e89522aff7 ("V4L/DVB: IR: add mceusb IR receiver driver") Cc: stable@vger.kernel.org # 2.6.36 Signed-off-by: Johan Hovold Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/rc/mceusb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c @@ -1124,7 +1124,7 @@ static void mceusb_gen1_init(struct mceu */ ret = usb_control_msg(ir->usbdev, usb_rcvctrlpipe(ir->usbdev, 0), USB_REQ_SET_ADDRESS, USB_TYPE_VENDOR, 0, 0, - data, USB_CTRL_MSG_SZ, HZ * 3); + data, USB_CTRL_MSG_SZ, 3000); dev_dbg(dev, "set address - ret = %d", ret); dev_dbg(dev, "set address - data[0] = %d, data[1] = %d", data[0], data[1]); @@ -1132,20 +1132,20 @@ static void mceusb_gen1_init(struct mceu /* set feature: bit rate 38400 bps */ ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0), USB_REQ_SET_FEATURE, USB_TYPE_VENDOR, - 0xc04e, 0x0000, NULL, 0, HZ * 3); + 0xc04e, 0x0000, NULL, 0, 3000); dev_dbg(dev, "set feature - ret = %d", ret); /* bRequest 4: set char length to 8 bits */ ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0), 4, USB_TYPE_VENDOR, - 0x0808, 0x0000, NULL, 0, HZ * 3); + 0x0808, 0x0000, NULL, 0, 3000); dev_dbg(dev, "set char length - retB = %d", ret); /* bRequest 2: set handshaking to use DTR/DSR */ ret = usb_control_msg(ir->usbdev, usb_sndctrlpipe(ir->usbdev, 0), 2, USB_TYPE_VENDOR, - 0x0000, 0x0100, NULL, 0, HZ * 3); + 0x0000, 0x0100, NULL, 0, 3000); dev_dbg(dev, "set handshake - retC = %d", ret); /* device resume */