Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1540575

Re: [PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI
Date 2016-12-12 20:40 +0100
Message-ID <sNEC6-8kr-15@gated-at.bofh.it> (permalink)
References <sNujn-22B-5@gated-at.bofh.it> <sNE93-8b3-27@gated-at.bofh.it> <sNEsq-8hm-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 2016-12-12 at 21:21 +0200, Mika Westerberg wrote:
> 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.

The "+ 1"  in the first set of tx_fifo_depth
makes the "else if" check unnecessary.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI Tin Huynh <tnhuynh@apm.com> - 2016-12-12 09:40 +0100
  Re: [PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-12-12 20:10 +0100
    Re: [PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-12-12 20:30 +0100
      Re: [PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI Joe Perches <joe@perches.com> - 2016-12-12 20:40 +0100
        Re: [PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI Mika Westerberg <mika.westerberg@linux.intel.com> - 2016-12-13 11:30 +0100
      Re: [PATCH V3] i2c: designware: fix wrong tx/rx fifo for ACPI Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-12-12 20:50 +0100

csiph-web