<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/ethernet, branch v3.4.38</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/ethernet?h=v3.4.38</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/ethernet?h=v3.4.38'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-28T19:12:04Z</updated>
<entry>
<title>sfc: Only use TX push if a single descriptor is to be written</title>
<updated>2013-03-28T19:12:04Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2013-02-27T16:50:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=46a84dbc74f10d2f855758d809a0b21592bd2b8e'/>
<id>urn:sha1:46a84dbc74f10d2f855758d809a0b21592bd2b8e</id>
<content type='text'>
[ Upstream commit fae8563b25f73dc584a07bcda7a82750ff4f7672 ]

Using TX push when notifying the NIC of multiple new descriptors in
the ring will very occasionally cause the TX DMA engine to re-use an
old descriptor.  This can result in a duplicated or partly duplicated
packet (new headers with old data), or an IOMMU page fault.  This does
not happen when the pushed descriptor is the only one written.

TX push also provides little latency benefit when a packet requires
more than one descriptor.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sfc: Disable soft interrupt handling during efx_device_detach_sync()</title>
<updated>2013-03-28T19:12:01Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2013-03-05T01:03:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=70a3336df60074b29ac3b546d8fccfbcf7831e95'/>
<id>urn:sha1:70a3336df60074b29ac3b546d8fccfbcf7831e95</id>
<content type='text'>
[ Upstream commit 35205b211c8d17a8a0b5e8926cb7c73e9a7ef1ad ]

efx_device_detach_sync() locks all TX queues before marking the device
detached and thus disabling further TX scheduling.  But it can still
be interrupted by TX completions which then result in TX scheduling in
soft interrupt context.  This will deadlock when it tries to acquire
a TX queue lock that efx_device_detach_sync() already acquired.

To avoid deadlock, we must use netif_tx_{,un}lock_bh().

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sfc: Detach net device when stopping queues for reconfiguration</title>
<updated>2013-03-28T19:11:56Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2013-01-28T19:01:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bea3099eb4f3f73cc2c311d39ef374eb6aa06f88'/>
<id>urn:sha1:bea3099eb4f3f73cc2c311d39ef374eb6aa06f88</id>
<content type='text'>
[ Upstream commit 29c69a4882641285a854d6d03ca5adbba68c0034 ]

We must only ever stop TX queues when they are full or the net device
is not 'ready' so far as the net core, and specifically the watchdog,
is concerned.  Otherwise, the watchdog may fire *immediately* if no
packets have been added to the queue in the last 5 seconds.

The device is ready if all the following are true:

(a) It has a qdisc
(b) It is marked present
(c) It is running
(d) The link is reported up

(a) and (c) are normally true, and must not be changed by a driver.
(d) is under our control, but fake link changes may disturb userland.
This leaves (b).  We already mark the device absent during reset
and self-test, but we need to do the same during MTU changes and ring
reallocation.  We don't need to do this when the device is brought
down because then (c) is already false.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sfc: Fix efx_rx_buf_offset() in the presence of swiotlb</title>
<updated>2013-03-28T19:11:56Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2013-01-10T23:51:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4b8fd2aa494aff51404a4afa0fe36475fd419b76'/>
<id>urn:sha1:4b8fd2aa494aff51404a4afa0fe36475fd419b76</id>
<content type='text'>
[ Upstream commits b590ace09d51cd39744e0f7662c5e4a0d1b5d952 and
  c73e787a8db9117d59b5180baf83203a42ecadca ]

We assume that the mapping between DMA and virtual addresses is done
on whole pages, so we can find the page offset of an RX buffer using
the lower bits of the DMA address.  However, swiotlb maps in units of
2K, breaking this assumption.

Add an explicit page_offset field to struct efx_rx_buffer.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sfc: Properly sync RX DMA buffer when it is not the last in the page</title>
<updated>2013-03-28T19:11:56Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2012-12-20T18:48:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=56bed2f8e6061b65ce3f9f27df92ac2e1cc2e7e0'/>
<id>urn:sha1:56bed2f8e6061b65ce3f9f27df92ac2e1cc2e7e0</id>
<content type='text'>
[ Upstream commit 3a68f19d7afb80f548d016effbc6ed52643a8085 ]

We may currently allocate two RX DMA buffers to a page, and only unmap
the page when the second is completed.  We do not sync the first RX
buffer to be completed; this can result in packet loss or corruption
if the last RX buffer completed in a NAPI poll is the first in a page
and is not DMA-coherent.  (In the middle of a NAPI poll, we will
handle the following RX completion and unmap the page *before* looking
at the content of the first buffer.)

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
[bwh: Backported to 3.4: adjust context]
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sfc: Correctly initialise reset_method in siena_test_chip()</title>
<updated>2013-03-28T19:11:56Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2012-12-01T01:55:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=41ade8ee0d52f9e02d05cb1b1c376445d5ec3689'/>
<id>urn:sha1:41ade8ee0d52f9e02d05cb1b1c376445d5ec3689</id>
<content type='text'>
[ Upstream commit ef492f11efed9a6a1686bf914fb74468df59385c ]

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sfc: Avoid generating over-length MC_CMD_FLUSH_RX_QUEUES request</title>
<updated>2013-03-28T19:11:55Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2012-09-19T01:53:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2672f1c1e7d1e5132fc102fdcb98e44320c1e65b'/>
<id>urn:sha1:2672f1c1e7d1e5132fc102fdcb98e44320c1e65b</id>
<content type='text'>
[ Upstream commit 450783747f42dfa3883920acfad4acdd93ce69af ]

MCDI supports requests up to 252 bytes long, which is only enough to
pass 63 RX queue IDs to MC_CMD_FLUSH_RX_QUEUES.  However a VF may have
up to 64 RX queues, and if we try to flush them all we will generate
an over-length request and BUG() in efx_mcdi_copyin().  Currently
all VF drivers limit themselves to 32 RX queues, so reducing the
limit to 63 does no harm.

Also add a BUILD_BUG_ON in efx_mcdi_flush_rxqs() so we remember to
deal with the same problem there if EFX_MAX_CHANNELS is increased.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sfc: Disable VF queues during register self-test</title>
<updated>2013-03-28T19:11:55Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2012-07-04T02:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ab2c550664153268b7500355dfeab7d7f9c2de98'/>
<id>urn:sha1:ab2c550664153268b7500355dfeab7d7f9c2de98</id>
<content type='text'>
[ Upstream commit d4f2cecce138c34960c467d0ae38a6d4bcd6af7b ]

Currently VF queues and drivers may remain active during this test.
This could cause memory corruption or spurious test failures.
Therefore we reset the port/function before running these tests on
Siena.

On Falcon this doesn't work: we have to do some additional
initialisation before some blocks will work again.  So refactor the
reset/register-test sequence into an efx_nic_type method so
efx_selftest() doesn't have to consider such quirks.

In the process, fix another minor bug: Siena does not have an
'invisible' reset and the self-test currently fails to push the PHY
configuration after resetting.  Passing RESET_TYPE_ALL to
efx_reset_{down,up}() fixes this.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sfc: Fix timekeeping in efx_mcdi_poll()</title>
<updated>2013-03-28T19:11:55Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2012-12-01T02:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3ad735c406aa1b411dd55b354410f8751a9e16e5'/>
<id>urn:sha1:3ad735c406aa1b411dd55b354410f8751a9e16e5</id>
<content type='text'>
[ Upstream commit ebf98e797b4e26ad52ace1511a0b503ee60a6cd4 ]

efx_mcdi_poll() uses get_seconds() to read the current time and to
implement a polling timeout.  The use of this function was chosen
partly because it could easily be replaced in a co-sim environment
with a macro that read the simulated time.

Unfortunately the real get_seconds() returns the system time (real
time) which is subject to adjustment by e.g. ntpd.  If the system time
is adjusted forward during a polled MCDI operation, the effective
timeout can be shorter than the intended 10 seconds, resulting in a
spurious failure.  It is also possible for a backward adjustment to
delay detection of a areal failure.

Use jiffies instead, and change MCDI_RPC_TIMEOUT to be denominated in
jiffies.  Also correct rounding of the timeout: check time &gt; finish
(or rather time_after(time, finish)) and not time &gt;= finish.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>sfc: lock TX queues when calling netif_device_detach()</title>
<updated>2013-03-28T19:11:55Z</updated>
<author>
<name>Daniel Pieczko</name>
<email>dpieczko@solarflare.com</email>
</author>
<published>2012-10-17T12:21:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=54ad9a8b55456fc16e326f79f9038a213a2df4c4'/>
<id>urn:sha1:54ad9a8b55456fc16e326f79f9038a213a2df4c4</id>
<content type='text'>
[ Upstream commit c2f3b8e3a44b6fe9e36704e30157ebe1a88c08b1 ]

The assertion of netif_device_present() at the top of
efx_hard_start_xmit() may fail if we don't do this.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
[bwh: Backported to 3.4: adjust context]
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
