lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081023192056.49656653@hyperion.delvare>
Date:	Thu, 23 Oct 2008 19:20:56 +0200
From:	Jean Delvare <khali@...ux-fr.org>
To:	lsorense@...lub.uwaterloo.ca (Lennart Sorensen)
Cc:	linux-kernel@...r.kernel.org, ben-linux@...ff.org,
	Len Sorensen <lsorense@...lub.uwaterloo.ca>
Subject: Re: scx200_i2c driver fails to detect any i2c devices in 2.6.26

Hi Lennart,

On Thu, 23 Oct 2008 12:54:19 -0400, Lennart Sorensen wrote:
> In 2.6.18, the scx200_i2c driver was working just fine.  Now while
> moving to 2.6.26 I find that the bus no longer locates any devices when
> drivers are loaded, even though i2cdetect has no problem locating
> devices on the bus.
> 
> After some searching, I discovered that the scx200_i2c driver doesn't
> have a .class parameter filled in, even though every other i2c driver
> does.  A small patch adding the .class parameter fixes the problem.

Correct. Not sure how we missed this for years.

> Not sure if it should be I2C_CLASS_ALL or I2C_CLASS_HWMON, or even
> I2C_CLASS_HWMON | I2C_CLASS_SPD (in current git tree).  Using
> I2C_CLASS_ALL works for me and works with my lm75, m41t81 and spd
> eeprom in 2.6.26.

I2C_CLASS_HWMON | I2C_CLASS_SPD please. I2C_CLASS_ALL is almost never
what people want, and actually I'm thinking of removing it to prevent
developers from getting it wrong.

> 
> --- a/drivers/i2c/busses/scx200_i2c.c	2008-07-13 17:51:29.000000000 -0400
> +++ b/drivers/i2c/busses/scx200_i2c.c	2008-10-23 12:41:02.000000000 -0400
> @@ -81,6 +81,7 @@
>  
>  static struct i2c_adapter scx200_i2c_ops = {
>  	.owner		   = THIS_MODULE,
> +	.class             = I2C_CLASS_ALL,
>  	.id		   = I2C_HW_B_SCX200,
>  	.algo_data	   = &scx200_i2c_data,
>  	.name	= "NatSemi SCx200 I2C",
> 


-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ