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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080514215818.GH28241@solarflare.com>
Date:	Wed, 14 May 2008 22:58:20 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Jean Delvare <khali@...ux-fr.org>
Cc:	Jeff Garzik <jgarzik@...hat.com>, netdev@...r.kernel.org,
	Linux I2C <i2c@...sensors.org>,
	linux-net-drivers@...arflare.com
Subject: Re: SFC driver implements its own I2C support

Jean Delvare wrote:
> Hi Ben, hi Jeff,

Please use the address linux-net-drivers@...arflare.com, as listed in
MAINTAINERS, which goes to everyone working on the sfc driver here.

> My attention was brought to the drivers/net/sfc/i2c-direct.c file which
> appeared recently in the Linux kernel. Apparently this is a custom
> implementation of I2C support, including software bit-banging. All this
> is already available in the Linux kernel in:
>   drivers/i2c/i2c-core.c
>   drivers/i2c/algos/i2c-algo-bit.c
> So it really doesn't make sense to duplicate the code in the sfc
> network driver.
>
> Can you please get rid of this custom I2C implementation and use the
> standard one?

We intend to do so, but may not be able to do it before 2.6.26.

> It should be really easy, all you have to do is include
> <linux/i2c.h> and <linux/i2c-algo-bit.h>, pack your SDA and SCL get/set
> functions in a struct i2c_algo_bit_data, and call i2c_bit_add_bus() on
> it. See drivers/video/intelfb/intelfb_i2c.c (or any framebuffer driver
> with I2C/DDC support) for an example.

I have made a start on this, and it looked like it would be a bit more
difficult than that.  But then perhaps I was doing more work than I
really needed to.

Also, see comments from the original author of our I2C code in
<http://thread.gmane.org/gmane.linux.kernel.commits.head/145999/focus=92866>.

> Using the standard I2C implementation will give you access to all the
> i2c debugging tools, user-space access to the I2C bus if needed, and
> compatibility with all the Linux i2c device drivers, including hardware
> monitoring and GPIO drivers which apparently the SFC hardware uses.

Right.  But the most immediate requirement is that we be able to
configure I2C devices from the sfc driver.  Most of our reference
designs require that as part of their initialisation.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ