Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9103485pxu; Mon, 28 Dec 2020 06:43:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSaw5TSS9zqwsWpHiJZJlPsMoHW/5dqK2TUe2YjuG6BSKj5ZzFIZkJLrE1bdJbbvPFebjC X-Received: by 2002:a50:f61b:: with SMTP id c27mr42242719edn.61.1609166610151; Mon, 28 Dec 2020 06:43:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609166610; cv=none; d=google.com; s=arc-20160816; b=sBe2ikM1XA1RiFeVnjq9qFdqUsupTRguH4n10Yu+ee4UzTSvPSfCyUFeRpCWlHsUO7 ly2CX8k15Wh0tOGMUB6uQADxqztmoaCSc/of1wlotJoFaAZ2kDfrO72SIzHjCA/InYxL VfRrOn/RQkVgyAt8KWRmab4u2oVDkf1Mnr5UUM7D5dGUjTxwzIBPcg0Atkzt9HwCjKpp SHhR+1YRgYrlVlBUtDRBRYX92NT21rXBRADG1X2+g9YKRau+hYwFQJHcAAqT0kumvaNK VII8uQkfSEXTlWVMRbs8BkMEP/npmqrYYAIadU3DN1OZRBab0wn24gj4+jh8Kug+51xO ti3Q== 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=v7qArSfzVc79CF/zuup+c1ZhK01pVEHvADHP02Q+s2Y=; b=jjDrvPW7EGWyFjRT0bFaKX1SmP8RLx7y3Qw9pEUIcKO0Beja9QGmI7XneG3Iqg/I18 jfJLjl4I3LPaWW4zOpY/iiHUW6L3ZtWpfvNEpLkzE+QgHczlTlLeFm2vPHn+5lQBVnRb 3vb44UNhy7QDhlNo+bSp3k8Ko52ga9iBsCU5Kg500nG681QiNkTvHNN81Rgxa124b7Z8 j+33zuU1wzpjYydSTikl8mZ83gwVZLh0vZuPp/E/4bnzirEgacMG+zI6VymnHOoBDBTZ yRG5ktMmWGkB0qX3vHFRXkVN8PqR+LPpTTf8stl+Jihb1hsjR3SqshL+X7KcRE5eBZAn gudQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jrEATqG9; 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 v18si20111511edd.267.2020.12.28.06.43.07; Mon, 28 Dec 2020 06:43:30 -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=jrEATqG9; 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 S2502355AbgL1O2Y (ORCPT + 99 others); Mon, 28 Dec 2020 09:28:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:36252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502267AbgL1O2W (ORCPT ); Mon, 28 Dec 2020 09:28:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 47EC120791; Mon, 28 Dec 2020 14:27:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165661; bh=BaovzRybQQNmu8QtHnrumSPcmboTSMQiOgnMfkF7NkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jrEATqG9yBL3adxR2gC76FBcA4sLLrGWTlrd3tPt3DPUcYi67b4rpf2Tpa397r6SO 1Xj3BzCkzUKvz0+FZrQSdmVSDpIlpShC6wmYQyUXFkqUAz+nJVF7NLQFHD4fOlX0Hw GANclvZRjz4y2eizaCVJGL+H8bJ/68RHEunrvpeI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 5.10 579/717] USB: serial: mos7720: fix parallel-port state restore Date: Mon, 28 Dec 2020 13:49:37 +0100 Message-Id: <20201228125048.651943321@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 @@ -639,6 +639,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,