linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Christian Fetzer <fetzer.ch@gmail.com>,
	linux-i2c@vger.kernel.org,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	galandilias@gmail.com, Thomas Brandon <tbrandonau@gmail.com>,
	Eddi De Pieri <eddi@depieri.net>
Subject: Re: [PATCH v3 4/5] i2c-piix4: Add support for multiplexed main adapter in SB800
Date: Fri, 22 Jan 2016 13:39:53 +0100	[thread overview]
Message-ID: <20160122133953.1945e36e@endymion.delvare> (raw)
In-Reply-To: <1447065942.31665.29.camel@linux.intel.com>

Sorry for the late reaction, but...

On Mon, 09 Nov 2015 12:45:42 +0200, Andy Shevchenko wrote:
> On Sat, 2015-11-07 at 12:35 +0100, Christian Fetzer wrote:
> (...)
> > @@ -129,10 +133,12 @@ static const struct dmi_system_id
> > piix4_dmi_ibm[] = {
> >  };
> >  
> >  /* SB800 globals */
> > +DEFINE_MUTEX(piix4_mutex_sb800);
> 
> Same question as for patch 3.

Noooooo!

The mutex is needed to ensure that only one of the 4 multiplexed SMBus
ports is used at any given time. i2c_piix4_adapdata is per i2c_adapter,
so if you move the mutex there you get one mutex per SMBus port, which
completely voids the point of having a mutex. A per-port mutex doesn't
protect anything, all it does is serialize the access to THAT port, but
i2c-core already takes care of this (thankfully.)

So moving this mutex to i2c_piix4_adapdata introduced a serious bug in
the driver, which needs to be fixed ASAP.

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2016-01-22 12:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07 11:35 [PATCH v3 0/5] Support multiplexed main SMBus interface on SB800 Christian Fetzer
2015-11-07 11:35 ` [PATCH v3 1/5] i2c-piix4: Optionally release smba in piix4_adap_remove Christian Fetzer
2015-11-09 11:24   ` Mika Westerberg
2015-11-07 11:35 ` [PATCH v3 2/5] i2c-piix4: Convert piix4_main_adapter to array Christian Fetzer
2015-11-07 11:35 ` [PATCH v3 3/5] i2c-piix4: Request base address index region once for SB800 Christian Fetzer
2015-11-09 10:40   ` Andy Shevchenko
2015-11-07 11:35 ` [PATCH v3 4/5] i2c-piix4: Add support for multiplexed main adapter in SB800 Christian Fetzer
2015-11-09 10:45   ` Andy Shevchenko
2016-01-22 12:39     ` Jean Delvare [this message]
2016-01-22 13:20       ` Andy Shevchenko
2015-11-07 11:35 ` [PATCH v3 5/5] i2c-piix4: Add adapter port name support for SB800 chipset Christian Fetzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160122133953.1945e36e@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=eddi@depieri.net \
    --cc=fetzer.ch@gmail.com \
    --cc=galandilias@gmail.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=tbrandonau@gmail.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).