<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/net/ethernet/sfc/mcdi.h, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2015-07-22T05:21:32Z</updated>
<entry>
<title>sfc: add output flag decoding to efx_mcdi_set_workaround</title>
<updated>2015-07-22T05:21:32Z</updated>
<author>
<name>Daniel Pieczko</name>
<email>dpieczko@solarflare.com</email>
</author>
<published>2015-07-21T14:09:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=34ccfe6f8abd9ce7ea70e68f130cc6618737269f'/>
<id>urn:sha1:34ccfe6f8abd9ce7ea70e68f130cc6618737269f</id>
<content type='text'>
The initial use of this will be to check a flag reporting if an FLR was
performed on other functions when enabling cascaded multicast filters.

Signed-off-by: Edward Cree &lt;ecree@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sfc: add sysfs entry to control MCDI tracing</title>
<updated>2015-05-27T17:54:51Z</updated>
<author>
<name>Edward Cree</name>
<email>ecree@solarflare.com</email>
</author>
<published>2015-05-27T12:14:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e7fef9b45ae188066bb6eb3dde8310d33c2f7d5e'/>
<id>urn:sha1:e7fef9b45ae188066bb6eb3dde8310d33c2f7d5e</id>
<content type='text'>
MCDI tracing is enabled per-function with a sysfs file
    /sys/class/net/&lt;NET_DEV&gt;/device/mcdi_logging

Signed-off-by: Edward Cree &lt;ecree@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sfc: add tracing of MCDI commands</title>
<updated>2015-05-27T17:54:51Z</updated>
<author>
<name>Edward Cree</name>
<email>ecree@solarflare.com</email>
</author>
<published>2015-05-27T12:13:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=75aba2a52d955e6721b798600b115c9d73d8995c'/>
<id>urn:sha1:75aba2a52d955e6721b798600b115c9d73d8995c</id>
<content type='text'>
MCDI tracing is conditional on CONFIG_SFC_MCDI_LOGGING, which is enabled
 by default.

Each MCDI command will produce a console line like
    sfc dom:bus:dev:fn ifname: MCDI RPC REQ: xxxxxxxx [yyyyyyyy...]
where xxxxxxxx etc. are the raw MCDI payload in 32-bit hex chunks.
The response will then produce a similar line with "RESP" instead of "REQ",
 and containing the MCDI response payload (if any).

Signed-off-by: Edward Cree &lt;ecree@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sfc: Initialise MCDI buffers to 0 on declaration.</title>
<updated>2015-05-21T22:43:53Z</updated>
<author>
<name>Jon Cooper</name>
<email>jcooper@solarflare.com</email>
</author>
<published>2015-05-20T10:10:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aa09a3da70a45a5030034b8ec8a8b945da44ebd4'/>
<id>urn:sha1:aa09a3da70a45a5030034b8ec8a8b945da44ebd4</id>
<content type='text'>
In order to avoid MC bugs the flags field needs to be set to 0.
Instead of explicitly clearing out the flags individually, a
better way to do this is to memset the MCDI_BUF to 0.

Signed-off-by: Shradha Shah &lt;sshah@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sfc: Cope with permissions enforcement added to firmware for SR-IOV</title>
<updated>2015-05-09T20:16:48Z</updated>
<author>
<name>Edward Cree</name>
<email>ecree@solarflare.com</email>
</author>
<published>2015-05-05T23:59:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=267d9d73872966c4e7d0271fed314d8ace65e895'/>
<id>urn:sha1:267d9d73872966c4e7d0271fed314d8ace65e895</id>
<content type='text'>
* Accept EPERM in some simple cases, the following cases are handled:
1) efx_mcdi_read_assertion()
Unprivileged PCI functions aren't allowed to GET_ASSERTS.
We return success as it's up to the primary PF to deal with asserts.
2) efx_mcdi_mon_probe() in efx_ef10_probe()
Unprivileged PCI functions aren't allowed to read sensor info, and
worrying about sensor data is the primary PF's job.
3) phy_op-&gt;reconfigure() in efx_init_port() and efx_reset_up()
Unprivileged functions aren't allowed to MC_CMD_SET_LINK, they just have
to accept the settings (including flow-control, which is what
efx_init_port() is worried about) they've been given.
4) Fallback to GET_WORKAROUNDS in efx_ef10_probe()
Unprivileged PCI functions aren't allowed to set workarounds. So if
efx_mcdi_set_workaround() fails EPERM, use efx_mcdi_get_workarounds()
to find out if workaround_35388 is enabled.
5) If DRV_ATTACH gets EPERM, try without specifying fw-variant
Unprivileged PCI functions have to use a FIRMWARE_ID of 0xffffffff
(MC_CMD_FW_DONT_CARE).
6) Don't try to exit_assertion unless one had fired
Previously we called efx_mcdi_exit_assertion even if
efx_mcdi_read_assertion had received MC_CMD_GET_ASSERTS_FLAGS_NO_FAILS.
This is unnecessary, and the resulting MC_CMD_REBOOT, even if the
AFTER_ASSERTION flag made it a no-op, would fail EPERM for unprivileged
PCI functions.
So make efx_mcdi_read_assertion return whether an assert happened, and only
call efx_mcdi_exit_assertion if it has.

Signed-off-by: Shradha Shah &lt;sshah@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sfc:On MCDI timeout, issue an FLR (and mark MCDI to fail-fast)</title>
<updated>2014-04-16T18:33:57Z</updated>
<author>
<name>Edward Cree</name>
<email>ecree@solarflare.com</email>
</author>
<published>2014-04-16T18:27:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e283546c0465dd3026bc94f7b1a9de7f6b8969ec'/>
<id>urn:sha1:e283546c0465dd3026bc94f7b1a9de7f6b8969ec</id>
<content type='text'>
When an MCDI command times out (whether or not we find it
completed when we poll), call efx_mcdi_abandon(), which tells
all subsequent MCDI calls to fail-fast, and queues up an FLR.

Because an FLR doesn't lead to receiving any reboot even from
the MC (unlike most other types of reset), we have to call
efx_ef10_reset_mc_allocations.
In efx_start_all(), if a reset (of any kind) is pending, we
bail out.
Without this, attempts to reconfigure (e.g. change mtu) can
cause driver/mc state inconsistency if the first MCDI call
triggers an FLR.

For similar reasons, on EF10, in
efx_reset_down(method=RESET_TYPE_MCDI_TIMEOUT), set the number
of active queues to zero before calling efx_stop_all().
And, on farch, in efx_reset_up(method=RESET_TYPE_MCDI_TIMEOUT),
set active_queues and flushes pending &amp; outstanding to zero.

efx_mcdi_mode_{poll,event}() should not take us out of fail-fast
 mode. Instead, this is done by efx_mcdi_reset() after the FLR
completes.

The new FLR reset_type RESET_TYPE_MCDI_TIMEOUT doesn't really
fit into the hierarchy of reset 'scopes' whereby efx_reset()
decides some resets subsume others.  Thus, it uses separate logic.

Also, fixed up some inconsistency around RESET_TYPE_MC_BIST,
which was in the wrong place in that hierarchy.

Signed-off-by: Shradha Shah &lt;sshah@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sfc: Store flags from MC_CMD_DRV_ATTACH for later use</title>
<updated>2013-12-12T22:07:03Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2013-10-16T17:32:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8349f7f610263a2b469feb0eb07583ad0742e7ba'/>
<id>urn:sha1:8349f7f610263a2b469feb0eb07583ad0742e7ba</id>
<content type='text'>
Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
</content>
</entry>
<entry>
<title>sfc: Log all unexpected MCDI errors</title>
<updated>2013-12-12T22:06:56Z</updated>
<author>
<name>Edward Cree</name>
<email>ecree@solarflare.com</email>
</author>
<published>2013-05-31T17:36:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1e0b8120b2aef503f480b0e0182d7a7304acfb3d'/>
<id>urn:sha1:1e0b8120b2aef503f480b0e0182d7a7304acfb3d</id>
<content type='text'>
Split each of efx_mcdi_rpc, efx_mcdi_rpc_finish, and efx_mcdi_rpc_async into
a normal and a _quiet version; made the former log MCDI errors with
netif_err (and include the raw MCDI error code), and the latter never log
them at all.  Changed various callers; any where some errors are expected
(but others are not) call the _quiet version and then if necessary log the
MCDI error themselves.  Said logging is done by new efx_mcdi_display_error.

Callers of efx_mcdi_rpc*_quiet functions which may want to log the error
need to ensure that their outbuf is big enough to hold an MCDI error; to
this end, they now use MCDI_DECLARE_BUF_OUT_OR_ERR, which always allocates
at least 8 bytes.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
</content>
</entry>
<entry>
<title>sfc: Correct RX dropped count for drops while interface is down</title>
<updated>2013-12-12T22:06:51Z</updated>
<author>
<name>Jon Cooper</name>
<email>jcooper@solarflare.com</email>
</author>
<published>2013-09-30T16:36:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f8f3b5ae3ea45ef6b00b471fed0fc90552a3c4af'/>
<id>urn:sha1:f8f3b5ae3ea45ef6b00b471fed0fc90552a3c4af</id>
<content type='text'>
We don't directly control RX ingress on Siena or any later
controllers, and so we cannot prevent packets from entering the RX
datapath while the RX queues are not set up.  This results in
the hardware incrementing RX_NODESC_DROP_CNT, but it's not an
error and we should not include it in error stats.

When bringing an interface up or down, pull (or wait for) stats and
count the number of packets that were dropped while the interface was
down.  Subtract this from the reported RX dropped count.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
</content>
</entry>
<entry>
<title>sfc: Convert to use hwmon_device_register_with_groups</title>
<updated>2013-11-29T21:26:16Z</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2013-11-28T02:54:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=85493e6dd42dcaf0eaf0a19f12f1295e35cc3b7f'/>
<id>urn:sha1:85493e6dd42dcaf0eaf0a19f12f1295e35cc3b7f</id>
<content type='text'>
Simplify the code. Avoid race conditions caused by attributes
being created after hwmon device registration. Implicitly
(through hwmon API) add mandatory 'name' sysfs attribute.

Reviewed-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
