Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3471495imu; Sun, 11 Nov 2018 15:52:45 -0800 (PST) X-Google-Smtp-Source: AJdET5egDA15b0FtKpQ55Vws1pecQIy2meKcvRYIJYV2xLfLRi/vvLT1Jujwf3FrxXYxatVJhD+9 X-Received: by 2002:a63:ec13:: with SMTP id j19mr1461879pgh.6.1541980365138; Sun, 11 Nov 2018 15:52:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980365; cv=none; d=google.com; s=arc-20160816; b=AOqsxRo9KxBpc9wM3pG4oJ7lCV+DB1RQ97Z8XKKEsFS2XD2VjxMOLsoVrSt41DLnPZ XxXZfsMOQsItr/t4e+KOD8++ANIWeJI+uurTGlv/S4cdqvhR/czsSfAqsuyl0y2xJHxK S1IgyhZs/z7fpwzEqHUujsuRrGRwUVl7y5j9xEreCmbJrGt112oIl1M5Lrfov5kBKaAU Gz0qtbAzeX4/pPRCQfDnjcw82k8li4QtWcE3+x3fp4N2+nKEYU3dvh23IaF1870oJJhm rrw0ayS37XuaUxBvGt5+84VYfBGQ0svsMEXvnM20TD8VjSaO/KA704W65C4WgAE6Uajx A6ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l6L3TL6/jirhyLYHKMSBBepH+/PTomswS4pkZM6hW/k=; b=d5EVK+swsAiz9UcIlj9bt+cb0OxIw70Z3jIol6G0K6nokS98GKSbt/11ndarM6Pi9x 56ZdM3Hyx5bYhfZ3d4beg7SJmao6wsMOmu+klkZcfgxu3xk44OlYvcY8ar567trIMrC7 qwlveXoK65U5rS+yjvAeKs/sZ6wu5WtHfRF8xqEcEwjSR4w2A0K1Xi/7gcJKVZVih0Wj t/LfEWZr28+HfDHYRQz/vBUvdg22ADnYWQlL6bvj+7TccJiRtNS1bVojTEnEsL7WHxpP c72RvNMNFx3MrS6Fd1QIJHF7M3wDHhi8HgCs7paP+Kc29TgAsZy1vrb0GjG6s1Rn+L/A Eh1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uJuQ4NtY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j20si14903963pgh.224.2018.11.11.15.52.30; Sun, 11 Nov 2018 15:52:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uJuQ4NtY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732838AbeKLIS3 (ORCPT + 99 others); Mon, 12 Nov 2018 03:18:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:37302 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732819AbeKLIS2 (ORCPT ); Mon, 12 Nov 2018 03:18:28 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3F848216FD; Sun, 11 Nov 2018 22:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975312; bh=TXottl/zsKW6hI7fEC2zsRchQQHof+lmZx5td19/3Qc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uJuQ4NtYhSWQUM2+FRsA8j50ZYyM5rw2I56zVqRBwrYyS2q8wh670/REUlIErwpGG QPdgd4jCBUhcbv5aeJn27pjuqrcXgP5eCFRgqzqQTE4E1r2mtiep6zrrbwESLGTbiB /C9OTUR5lesXiYGi82mqHRfkCvLN0SzY9oEK6yBU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mauro Carvalho Chehab Subject: [PATCH 4.19 294/361] Revert "media: dvbsky: use just one mutex for serializing device R/W ops" Date: Sun, 11 Nov 2018 14:20:41 -0800 Message-Id: <20181111221656.930514575@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mauro Carvalho Chehab commit 9afc82194de9a1ce298f0d77d7d779d585bf962c upstream. As pointed at: https://bugzilla.kernel.org/show_bug.cgi?id=199323 This patch causes a bad effect on RPi. I suspect that the root cause is at the USB out of tree RPi driver, with uses high priority interrupts instead of normal ones. Anyway, as this patch is mostly a cleanup, better to revert it. This reverts commit 7d95fb746c4eece67308f1642a666ea1ebdbd2cc. Cc: stable@vger.kernel.org # For Kernel 4.18 Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/dvb-usb-v2/dvbsky.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) --- a/drivers/media/usb/dvb-usb-v2/dvbsky.c +++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c @@ -31,6 +31,7 @@ MODULE_PARM_DESC(disable_rc, "Disable in DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); struct dvbsky_state { + struct mutex stream_mutex; u8 ibuf[DVBSKY_BUF_LEN]; u8 obuf[DVBSKY_BUF_LEN]; u8 last_lock; @@ -67,17 +68,18 @@ static int dvbsky_usb_generic_rw(struct static int dvbsky_stream_ctrl(struct dvb_usb_device *d, u8 onoff) { + struct dvbsky_state *state = d_to_priv(d); int ret; - static u8 obuf_pre[3] = { 0x37, 0, 0 }; - static u8 obuf_post[3] = { 0x36, 3, 0 }; + u8 obuf_pre[3] = { 0x37, 0, 0 }; + u8 obuf_post[3] = { 0x36, 3, 0 }; - mutex_lock(&d->usb_mutex); - ret = dvb_usbv2_generic_rw_locked(d, obuf_pre, 3, NULL, 0); + mutex_lock(&state->stream_mutex); + ret = dvbsky_usb_generic_rw(d, obuf_pre, 3, NULL, 0); if (!ret && onoff) { msleep(20); - ret = dvb_usbv2_generic_rw_locked(d, obuf_post, 3, NULL, 0); + ret = dvbsky_usb_generic_rw(d, obuf_post, 3, NULL, 0); } - mutex_unlock(&d->usb_mutex); + mutex_unlock(&state->stream_mutex); return ret; } @@ -606,6 +608,8 @@ static int dvbsky_init(struct dvb_usb_de if (ret) return ret; */ + mutex_init(&state->stream_mutex); + state->last_lock = 0; return 0;