Re: [PATCH v3 4/5] i2c-piix4: Add support for multiplexed main adapter in SB800

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux