From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH 2/3] tmp/tpm_crb: fix Intel PTT hw bug during idle state Date: Wed, 7 Sep 2016 10:17:44 -0600 Message-ID: <20160907161744.GB4791@obsidianresearch.com> References: <1473247953-24617-1-git-send-email-tomas.winkler@intel.com> <1473247953-24617-3-git-send-email-tomas.winkler@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1473247953-24617-3-git-send-email-tomas.winkler-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Tomas Winkler Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Wed, Sep 07, 2016 at 02:32:32PM +0300, Tomas Winkler wrote: > INIT_LIST_HEAD(&resources); > - ret = acpi_dev_get_resources(device, &resources, crb_check_resource, > - &io_res); > + ret = acpi_dev_get_resources(device, &resources, > + crb_check_resource, &io_res); Do not randomly reflow unrelated text in patches > + /* > + * PTT HW bug w/a: wake up the device to access > + * possibly not retained registers. > + */ > + ret = __crb_cmd_ready(dev, priv); > + if (ret) > + return ret; > + > + pa_high = ioread32(&priv->cca->cmd_pa_high); > + pa_low = ioread32(&priv->cca->cmd_pa_low); > + cmd_pa = ((u64)pa_high << 32) | pa_low; Why change from the original hunk? - cmd_pa = ((u64) ioread32(&priv->cca->cmd_pa_high) << 32) | - (u64) ioread32(&priv->cca->cmd_pa_low); > priv->rsp = priv->cmd; > + > +out: > + __crb_go_idle(dev, priv); > return 0; Nope on the return 0.. return ret I guess? Jason ------------------------------------------------------------------------------