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: <1235788647.3576.4.camel@hashbaz.i.decadent.org.uk>
Date:	Sat, 28 Feb 2009 02:37:27 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org, gospo@...hat.com,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>
Subject: Re: [net-next PATCH 1/3] ixgbe: Add hardware specific
	initialization code for 82599 devices

On Fri, 2009-02-27 at 17:44 -0800, Jeff Kirsher wrote:
[...]
> diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
> index 77ec26f..14e9606 100644
> --- a/drivers/net/ixgbe/ixgbe_phy.c
> +++ b/drivers/net/ixgbe/ixgbe_phy.c
[...]
> @@ -688,6 +755,501 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
>  }
>  
>  /**
> + *  ixgbe_read_i2c_eeprom_generic - Reads 8 bit EEPROM word over I2C interface
> + *  @hw: pointer to hardware structure
> + *  @byte_offset: EEPROM byte offset to read
> + *  @eeprom_data: value read
> + *
> + *  Performs byte read operation to SFP module's EEPROM over I2C interface.
> + **/
> +s32 ixgbe_read_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset,
> +                                  u8 *eeprom_data)
> +{
> +	return hw->phy.ops.read_i2c_byte(hw, byte_offset,
> +	                                 IXGBE_I2C_EEPROM_DEV_ADDR,
> +	                                 eeprom_data);
> +}
> +
> +/**
> + *  ixgbe_write_i2c_eeprom_generic - Writes 8 bit EEPROM word over I2C interface
> + *  @hw: pointer to hardware structure
> + *  @byte_offset: EEPROM byte offset to write
> + *  @eeprom_data: value to write
> + *
> + *  Performs byte write operation to SFP module's EEPROM over I2C interface.
> + **/
> +s32 ixgbe_write_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset,
> +                                   u8 eeprom_data)
> +{
> +	return hw->phy.ops.write_i2c_byte(hw, byte_offset,
> +	                                  IXGBE_I2C_EEPROM_DEV_ADDR,
> +	                                  eeprom_data);
> +}
> +
> +/**
> + *  ixgbe_read_i2c_byte_generic - Reads 8 bit word over I2C
> + *  @hw: pointer to hardware structure
> + *  @byte_offset: byte offset to read
> + *  @data: value read
> + *
> + *  Performs byte read operation to SFP module's EEPROM over I2C interface at
> + *  a specified deivce address.
> + **/
[...]

You should be registering an I2C adapter and using the I2C bit-bang
algorithm for this.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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