Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9046373pxu; Mon, 28 Dec 2020 05:19:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJys0VC2K8t2qSPAgbSsT50huiRjxs2YGdmw77hKI+v8mQCNaZ87lv8+TBGwI3Huq1LOhs4Y X-Received: by 2002:a17:906:b793:: with SMTP id dt19mr41465582ejb.120.1609161582004; Mon, 28 Dec 2020 05:19:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161581; cv=none; d=google.com; s=arc-20160816; b=GtXosA7noAtue9cbkZn2weTJlvBlvWYzJg7sEwJpkeUdUxMgKn15WdFV3Dgaie9scb hBK3YUtHr7SzcrCkTovWITLr7jD70C6D3MWSGTVwBnGFOh01oz7UwT84se/qvd97layt 6TYX4QN0WIJhbsqFhAi6jGrNMHZS/N6faKk+qkYZBMNtLL5gTEctjirmJsROK7Sk6IF8 e9eJ1BmObpOP9419Yfa2V6MXU7TqUEIaDvQeZZVzRdZrnwA4yoy3okXBTpKITVnFaX+5 eqcOrq+Q+d+7bmR2Sz5pnZe46bUfSFkbs7sSjN161NDp9rcSDFCEnYBVsVdimthf7K4/ ToIQ== 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=Q6DnWEkcgeaynOV6ChVs9u2JdUuhghwvCC//BRNzY6sy81zf2F+iGESrWM39WzW/EA rXyxhXX/JAecxmn4NvPB7iAGIzXaIUTJmB7Jt3TFTJ4RDhOK/vT4cdcBuJXo7SjxPyzU 5h2xQgCqAAmKj3x9nvkOywd4nWOwGl2qLW4ZFn+MIjRHCJZmQGvowc+SwVCNgtW1Ct9s AYL+S2eq4AjvLehHqh3YIiF6nJH1Q519J6hVSKK05x2zNSP+I3yCqpAOuRD1ZtLv+cqi 8knbg+O5e5if7NOIWgHIAnCZ2ucosVG5KHer729b/HPwKxBfuO/6CK727XvNrSim6Wnj avgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NPH0GL9G; 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 q5si17825471ejj.266.2020.12.28.05.19.17; Mon, 28 Dec 2020 05:19:41 -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=NPH0GL9G; 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 S1731551AbgL1NRZ (ORCPT + 99 others); Mon, 28 Dec 2020 08:17:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:45772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731541AbgL1NRT (ORCPT ); Mon, 28 Dec 2020 08:17:19 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 20FA222B40; Mon, 28 Dec 2020 13:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161398; bh=vZLDLd/hTUPshAafKNY7RcLwYleHWBITfHEg2udMb1U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NPH0GL9GY9EKCswUw5HVDlO1Gcd/CGvM43b0s/Hvtk+qoF4c9TWu7BdFS/5iOumqC W78z3Om4UXY+pN5yg4Dx/UMJ11q/3S2DT1fF5QzyMrennt1GPfWqUNQUMEkbP69fyg r/qXHQe49e68DdfIUFkhODN1AZm2dthRb0FjzDKA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold Subject: [PATCH 4.14 199/242] USB: serial: mos7720: fix parallel-port state restore Date: Mon, 28 Dec 2020 13:50:04 +0100 Message-Id: <20201228124914.471655253@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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,