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: <Y3JB2xrBOOa6MR+H@lunn.ch>
Date:   Mon, 14 Nov 2022 14:25:47 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Jiawen Wu <jiawenwu@...stnetic.com>
Cc:     'Mengyuan Lou' <mengyuanlou@...-swift.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/5] net: txgbe: Identify PHY and SFP module

> When ethernet driver does a reset to the hardware, like
> 'txgbe_reset_hw', the I2C configuration will be reset.  It needs to
> be reconfigured once. So how could I call the I2C function here? Can
> I treat the I2C driver as a lib?

The I2C driver will be embedded within your MAC driver. So you have
control over it.

How often do you need to call txgbe_reset_hw()?  Hopefully just once
early in the probe? So you can register the I2C bus master with the
I2C core after the reset.

If you need to use txgbe_reset_hw() at other times, you will need a
mutex or similar in .master_xfer function so you don't perform a reset
while an I2C transfer is happening, or start another transfer while a
reset is happening.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ