Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752867AbcLLTXa (ORCPT ); Mon, 12 Dec 2016 14:23:30 -0500 Received: from mga01.intel.com ([192.55.52.88]:52522 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbcLLTX2 (ORCPT ); Mon, 12 Dec 2016 14:23:28 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,338,1477983600"; d="scan'208";a="17136407" Date: Mon, 12 Dec 2016 21:21:13 +0200 From: Mika Westerberg To: Andy Shevchenko Cc: Tin Huynh , Jarkko Nikula , Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Loc Ho , Thang Nguyen , Phong Vo , patches@apm.com Subject: Re: [PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI Message-ID: <20161212192113.GA1460@lahna.fi.intel.com> References: <1481531810-31695-1-git-send-email-tnhuynh@apm.com> <1481569373.7188.48.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1481569373.7188.48.camel@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 726 Lines: 18 On Mon, Dec 12, 2016 at 09:02:53PM +0200, Andy Shevchenko wrote: > > + tx_fifo_depth = ((param1 >> 16) & 0xff) + 1; > > + rx_fifo_depth = ((param1 >> 8)??& 0xff) + 1; > > + if (!dev->tx_fifo_depth) { > > + dev->tx_fifo_depth = tx_fifo_depth; > > + dev->rx_fifo_depth = rx_fifo_depth; > > + } else if (tx_fifo_depth) { > > + dev->tx_fifo_depth = min_t(u32, dev->tx_fifo_depth, > > + tx_fifo_depth); > > + dev->rx_fifo_depth = min_t(u32, dev->rx_fifo_depth, > > + rx_fifo_depth); > > + } > > So, let's clarify here: > Is it possible to have an IP without parameter block enabled? I mean to > read something arbitrary (or zeroes, or all-ones) from param1. Yes and it is Intel IP. Haswell IIRC and it returned zeroes.