<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/net/forcedeth.c, branch v2.6.29</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>net: forcedeth: Fix wake-on-lan regression</title>
<updated>2009-02-16T08:13:20+00:00</updated>
<author>
<name>Tobias Diedrich</name>
<email>ranma+kernel@tdiedrich.de</email>
</author>
<published>2009-02-16T08:13:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=34edaa88324004baf4884fb0388f86059d9c4878'/>
<id>34edaa88324004baf4884fb0388f86059d9c4878</id>
<content type='text'>
Commit f55c21fd9a92a444e55ad1ca4e4732d56661bf2e ("forcedeth: call
restore mac addr in nv_shutdown path"), which was introduced to fix
the regression tracked at
http://bugzilla.kernel.org/show_bug.cgi?id=11358 causes the
wake-on-lan mac to be reversed in the shutdown path.  Apparently the
forcedeth situation is rather messy in that the mac we need to
writeback for a subsequent modprobe to work is exactly the reverse of
what is needed for proper wake-on-lan.

The following patch explains the situation in the comments and
makes the call to nv_restore_mac_addr() conditional (only called if
we are not really going for poweroff).

Tobias Diedrich wrote:
&gt; Hmm, I had not tried WOL for some time.
&gt; With 2.6.29-rc3 is see the following behaviour:
&gt; 
&gt; State            WOL Behaviour
&gt; ------------------------------
&gt; shutdown         reversed MAC
&gt; disk/shutdown    reversed MAC
&gt; disk/platform    OK
&gt; 
&gt; Apparently nv_restore_mac_addr() restores the MAC in the wrong order
&gt; for WOL (at least for my PCI_DEVICE_ID_NVIDIA_NVENET_15).  platform
&gt; works, because the MAC is not touched in the nv_suspend() path.
&gt; 
&gt; A possible fix might be to only call nv_restore_mac_addr() if
&gt; system_state != SYSTEM_POWER_OFF.

With the following patch:
shutdown         OK
disk/shutdown    OK
disk/platform    OK
kexec            OK

Signed-off-by: Tobias Diedrich &lt;ranma+kernel@tdiedrich.de&gt;
Tested-by: Philipp Matthias Hahn &lt;pmhahn@titan.lahn.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit f55c21fd9a92a444e55ad1ca4e4732d56661bf2e ("forcedeth: call
restore mac addr in nv_shutdown path"), which was introduced to fix
the regression tracked at
http://bugzilla.kernel.org/show_bug.cgi?id=11358 causes the
wake-on-lan mac to be reversed in the shutdown path.  Apparently the
forcedeth situation is rather messy in that the mac we need to
writeback for a subsequent modprobe to work is exactly the reverse of
what is needed for proper wake-on-lan.

The following patch explains the situation in the comments and
makes the call to nv_restore_mac_addr() conditional (only called if
we are not really going for poweroff).

Tobias Diedrich wrote:
&gt; Hmm, I had not tried WOL for some time.
&gt; With 2.6.29-rc3 is see the following behaviour:
&gt; 
&gt; State            WOL Behaviour
&gt; ------------------------------
&gt; shutdown         reversed MAC
&gt; disk/shutdown    reversed MAC
&gt; disk/platform    OK
&gt; 
&gt; Apparently nv_restore_mac_addr() restores the MAC in the wrong order
&gt; for WOL (at least for my PCI_DEVICE_ID_NVIDIA_NVENET_15).  platform
&gt; works, because the MAC is not touched in the nv_suspend() path.
&gt; 
&gt; A possible fix might be to only call nv_restore_mac_addr() if
&gt; system_state != SYSTEM_POWER_OFF.

With the following patch:
shutdown         OK
disk/shutdown    OK
disk/platform    OK
kexec            OK

Signed-off-by: Tobias Diedrich &lt;ranma+kernel@tdiedrich.de&gt;
Tested-by: Philipp Matthias Hahn &lt;pmhahn@titan.lahn.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>forcedeth: napi schedule lock fix</title>
<updated>2009-01-11T08:11:28+00:00</updated>
<author>
<name>Ayaz Abdulla</name>
<email>aabdulla@nvidia.com</email>
</author>
<published>2009-01-11T08:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=eb10a781824ca63c4e484c4642a19b3370980792'/>
<id>eb10a781824ca63c4e484c4642a19b3370980792</id>
<content type='text'>
This patch fixes a potential race condition between scheduling napi and
completing napi poll. The call to netif_rx_schedule should be under
protection of the lock (as is the completion), otherwise, interrupts
could be masked off.

Signed-off-by: Ayaz Abdulla &lt;aabdulla@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a potential race condition between scheduling napi and
completing napi poll. The call to netif_rx_schedule should be under
protection of the lock (as is the completion), otherwise, interrupts
could be masked off.

Signed-off-by: Ayaz Abdulla &lt;aabdulla@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>forcedeth: remove mgmt unit for mcp79 chipset</title>
<updated>2009-01-11T08:07:36+00:00</updated>
<author>
<name>Ayaz Abdulla</name>
<email>aabdulla@nvidia.com</email>
</author>
<published>2009-01-10T06:40:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a7ee2f73f3ce90d73736de1cf432339c35a3faf2'/>
<id>a7ee2f73f3ce90d73736de1cf432339c35a3faf2</id>
<content type='text'>
This patch removes the feature flag for mgmt unit as it is not used for
this chipset.

Signed-off-by: Ayaz Abdulla &lt;aabdulla@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes the feature flag for mgmt unit as it is not used for
this chipset.

Signed-off-by: Ayaz Abdulla &lt;aabdulla@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>forcedeth: version bump and copyright</title>
<updated>2009-01-11T08:07:33+00:00</updated>
<author>
<name>Ayaz Abdulla</name>
<email>aabdulla@nvidia.com</email>
</author>
<published>2009-01-09T11:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f1405d32e392f2f5f80f4687fe186305de300bf6'/>
<id>f1405d32e392f2f5f80f4687fe186305de300bf6</id>
<content type='text'>
This patch bumps up the version number and adds current year to copyright.

Signed-off-by: Ayaz Abdulla &lt;aabdulla@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch bumps up the version number and adds current year to copyright.

Signed-off-by: Ayaz Abdulla &lt;aabdulla@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>forcedeth: xmit lock fix</title>
<updated>2009-01-11T08:07:32+00:00</updated>
<author>
<name>Ayaz Abdulla</name>
<email>aabdulla@nvidia.com</email>
</author>
<published>2009-01-09T11:03:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=001eb84bbf7205f8cc541a75364a6a0892b5d0a2'/>
<id>001eb84bbf7205f8cc541a75364a6a0892b5d0a2</id>
<content type='text'>
This patch fixes a potential race condition between xmit thread and xmit
completion thread. The calculation of empty tx descriptors is not
performed under the lock. This could cause it to set the stop flag while
the completion thread finishes all tx's. This will result in the tx
queue in stopped state and no one to wake it up.

Signed-off-by: Ayaz Abdulla &lt;aabdulla@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a potential race condition between xmit thread and xmit
completion thread. The calculation of empty tx descriptors is not
performed under the lock. This could cause it to set the stop flag while
the completion thread finishes all tx's. This will result in the tx
queue in stopped state and no one to wake it up.

Signed-off-by: Ayaz Abdulla &lt;aabdulla@nvidia.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>forcedeth: don't poll NV event 36</title>
<updated>2008-12-26T02:07:50+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes@sipsolutions.net</email>
</author>
<published>2008-12-26T02:07:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=36994a0a7004fd4777cd93a4b658b5f84bf4c93e'/>
<id>36994a0a7004fd4777cd93a4b658b5f84bf4c93e</id>
<content type='text'>
Polling doesn't seem to be necessary on my hardware, at
least I haven't seen any bad effects testing it a while.
Remove the polling so the CPU doesn't have to wake up a
hundred times per second.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Polling doesn't seem to be necessary on my hardware, at
least I haven't seen any bad effects testing it a while.
Remove the polling so the CPU doesn't have to wake up a
hundred times per second.

Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Remove unused netdev arg from some NAPI interfaces.</title>
<updated>2008-12-23T04:43:12+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2008-12-23T04:43:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=908a7a16b852ffd618a9127be8d62432182d81b4'/>
<id>908a7a16b852ffd618a9127be8d62432182d81b4</id>
<content type='text'>
When the napi api was changed to separate its 1:1 binding to the net_device
struct, the netif_rx_[prep|schedule|complete] api failed to remove the now
vestigual net_device structure parameter.  This patch cleans up that api by
properly removing it..

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the napi api was changed to separate its 1:1 binding to the net_device
struct, the netif_rx_[prep|schedule|complete] api failed to remove the now
vestigual net_device structure parameter.  This patch cleans up that api by
properly removing it..

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdevice: Kill netdev-&gt;priv</title>
<updated>2008-12-08T09:14:16+00:00</updated>
<author>
<name>Wang Chen</name>
<email>wangchen@cn.fujitsu.com</email>
</author>
<published>2008-12-08T09:14:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b74ca3a896b9ab5f952bc440154758e708c48884'/>
<id>b74ca3a896b9ab5f952bc440154758e708c48884</id>
<content type='text'>
This is the last shoot of this series.
After I removing all directly reference of netdev-&gt;priv, I am killing
"priv" of "struct net_device" and fixing relative comments/docs.

Anyone will not be allowed to reference netdev-&gt;priv directly.
If you want to reference the memory of private data, use netdev_priv()
instead.
If the private data is not allocted when alloc_netdev(), use
netdev-&gt;ml_priv to point that memory after you creating that private
data.

Signed-off-by: Wang Chen &lt;wangchen@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the last shoot of this series.
After I removing all directly reference of netdev-&gt;priv, I am killing
"priv" of "struct net_device" and fixing relative comments/docs.

Anyone will not be allowed to reference netdev-&gt;priv directly.
If you want to reference the memory of private data, use netdev_priv()
instead.
If the private data is not allocted when alloc_netdev(), use
netdev-&gt;ml_priv to point that memory after you creating that private
data.

Signed-off-by: Wang Chen &lt;wangchen@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>forcedeth: power down phy when interface is down</title>
<updated>2008-12-04T05:06:42+00:00</updated>
<author>
<name>Ed Swierk</name>
<email>eswierk@arastra.com</email>
</author>
<published>2008-12-01T12:24:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cb52deba12f27af90a46d2f8667a64888118a888'/>
<id>cb52deba12f27af90a46d2f8667a64888118a888</id>
<content type='text'>
Bring the physical link down when the interface is down by placing the PHY
in power-down state, unless WOL is enabled.  This mirrors the behavior of
other drivers including e1000 and tg3.

Without the patch, ifconfig down leaves the physical link up, which confuses
datacenter users who expect the link lights both on the NIC and the switch to
go out when they bring an interface down.

Furthermore, even though the phy is powered on, autonegotiation stops working,
so a normally gigabit link might suddenly become 100 Mbit half-duplex when the
interface goes down, and become gigabit when it comes up again.

Ayaz said:

  I would not include this patch until further testing is performed.  NVIDIA
  MCP chips use 3rd party PHY vendors.  By powering down the phy, it could
  have adverse affects on certain phys.

Arthur Jones said:

  I just ran across this patch.  Tested on a Marvell 88E1121R (GigE PHY)
  and works great.  This is a very important feature for me.

Signed-off-by: Ed Swierk &lt;eswierk@arastra.com&gt;
Tested-by: Arthur Jones &lt;ajones@riverbed.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bring the physical link down when the interface is down by placing the PHY
in power-down state, unless WOL is enabled.  This mirrors the behavior of
other drivers including e1000 and tg3.

Without the patch, ifconfig down leaves the physical link up, which confuses
datacenter users who expect the link lights both on the NIC and the switch to
go out when they bring an interface down.

Furthermore, even though the phy is powered on, autonegotiation stops working,
so a normally gigabit link might suddenly become 100 Mbit half-duplex when the
interface goes down, and become gigabit when it comes up again.

Ayaz said:

  I would not include this patch until further testing is performed.  NVIDIA
  MCP chips use 3rd party PHY vendors.  By powering down the phy, it could
  have adverse affects on certain phys.

Arthur Jones said:

  I just ran across this patch.  Tested on a Marvell 88E1121R (GigE PHY)
  and works great.  This is a very important feature for me.

Signed-off-by: Ed Swierk &lt;eswierk@arastra.com&gt;
Tested-by: Arthur Jones &lt;ajones@riverbed.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netdev: add more functions to netdevice ops</title>
<updated>2008-11-21T04:14:53+00:00</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2008-11-21T04:14:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=008298231abbeb91bc7be9e8b078607b816d1a4a'/>
<id>008298231abbeb91bc7be9e8b078607b816d1a4a</id>
<content type='text'>
This patch moves neigh_setup and hard_start_xmit into the network device ops
structure. For bisection, fix all the previously converted drivers as well.
Bonding driver took the biggest hit on this.

Added a prefetch of the hard_start_xmit in the fast path to try and reduce
any impact this would have.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch moves neigh_setup and hard_start_xmit into the network device ops
structure. For bisection, fix all the previously converted drivers as well.
Bonding driver took the biggest hit on this.

Added a prefetch of the hard_start_xmit in the fast path to try and reduce
any impact this would have.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
