Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9039571pxu; Mon, 28 Dec 2020 05:09:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwaHNieOwcGJ520SHbxUrH0heiI4UaErKD8jiq2A1GMNz/6mXQtdpZkcQU5EMeUQ1Y70L+t X-Received: by 2002:aa7:c4c2:: with SMTP id p2mr42363065edr.63.1609160954436; Mon, 28 Dec 2020 05:09:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609160954; cv=none; d=google.com; s=arc-20160816; b=iz5Bx6TnO2P5ZPyxmt8wWhV8otDkjy4Ne3q9Xsmr5d5j//NpuALpWPFwCSLpNjCLDq ZU2f3gFyXrOl013WecCHYapEyob5LrlSabGisPc+YYR3i6eCf28Z5EBe3tXtzQkZAIgp ocS6jClk2sOm9YXF9pP7EPfGlB2mGjg5zSl1lSfqTGV3V1brHgeZTjdXLsscyjqk9yQe NpNgM1AsW0SuQTDLD6QTgPqFjl7Rqn7MAOysvbimvIwZHGVQG6p0IHEVmQs2OlhDXO2d LDz5jWFxgawgI0MWTAebMA1gzeWR+FVNfcH2GTIXodpehaBqRYxs6c9nusrc+7sLEO6O zi0A== 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=1fVoECufGgLgQEwCar7oddyY401QibcTkRUl9NCSZ70=; b=uczNOKN3GqhlSZoCw5uj3njYM+XGrR+L80TazWEudKyFKNgfGvT7W7sC3gryX8i2Z/ w8FbajlfD9jcgjqOOgIG9BcTVmIm1qjg5UZyGicQMylH3X68PIvnc38+TwdI84WJTLbk QnFnuEkJnbV8qgxXt6X+VS8ThktUzOAYbhhQ0tS+qW6qgqFtECsoQIBEaOMTEoJSW80Q yseQMxOw9TakwTcjy6oqeCOUhcl5hq3T4N2KpkS1J4rnELIKkayulUL60MEUtXYEOrVB p2h0fVAj5gLU83UQJklqv0ycpleZ/fvXcm/Q8zYAvKnVkiI+p0IT2Vx26mGZNpTSbeds MC3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EANO5BIP; 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 k14si19661963edj.608.2020.12.28.05.08.51; Mon, 28 Dec 2020 05:09:14 -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=EANO5BIP; 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 S1729616AbgL1NGB (ORCPT + 99 others); Mon, 28 Dec 2020 08:06:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:33720 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729390AbgL1NFv (ORCPT ); Mon, 28 Dec 2020 08:05:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A8B122B3A; Mon, 28 Dec 2020 13:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160710; bh=vZLDLd/hTUPshAafKNY7RcLwYleHWBITfHEg2udMb1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EANO5BIPbO6pCFN+5jCgkK7GBeMpVx11bVcVyT5MUvr9Zog06jxT4YczcmYb8vQ10 1qis3uS9kBKQ/bCPI/LvZ5qykdgZRacaFzljWuaJwyoyKKC5px5yZpOD1+kqMaYWXk wnhbWa6+zu8rSIV2RAhQKyKaJW9vQdDRSAGV0Xlw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 4.9 144/175] USB: serial: mos7720: fix parallel-port state restore Date: Mon, 28 Dec 2020 13:49:57 +0100 Message-Id: <20201228124900.226664728@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 975323ab8f116667676c30ca3502a6757bd89e8d upstream. The parallel-port restore operations is called when a driver claims the port and is supposed to restore the provided state (e.g. saved when releasing the port). Fixes: b69578df7e98 ("USB: usbserial: mos7720: add support for parallel port on moschip 7715") Cc: stable # 2.6.35 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/mos7720.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -640,6 +640,8 @@ static void parport_mos7715_restore_stat spin_unlock(&release_lock); return; } + mos_parport->shadowDCR = s->u.pc.ctr; + mos_parport->shadowECR = s->u.pc.ecr; write_parport_reg_nonblock(mos_parport, MOS7720_DCR, mos_parport->shadowDCR); write_parport_reg_nonblock(mos_parport, MOS7720_ECR,