<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/net/ethernet/freescale/fman, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/net/ethernet/freescale/fman?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/net/ethernet/freescale/fman?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-11-05T02:33:38Z</updated>
<entry>
<title>net: fman: Unregister ethernet device on removal</title>
<updated>2022-11-05T02:33:38Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-11-03T18:28:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b7cbc6740bd6ad5d43345a2504f7e4beff0d709f'/>
<id>urn:sha1:b7cbc6740bd6ad5d43345a2504f7e4beff0d709f</id>
<content type='text'>
When the mac device gets removed, it leaves behind the ethernet device.
This will result in a segfault next time the ethernet device accesses
mac_dev. Remove the ethernet device when we get removed to prevent
this. This is not completely reversible, since some resources aren't
cleaned up properly, but that can be addressed later.

Fixes: 3933961682a3 ("fsl/fman: Add FMan MAC driver")
Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Link: https://lore.kernel.org/r/20221103182831.2248833-1-sean.anderson@seco.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: fman: Use physical address for userspace interfaces</title>
<updated>2022-10-24T09:45:14Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-10-20T15:50:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c99f0f7e68376dda5df8db7950cd6b67e73c6d3c'/>
<id>urn:sha1:c99f0f7e68376dda5df8db7950cd6b67e73c6d3c</id>
<content type='text'>
Before 262f2b782e25 ("net: fman: Map the base address once"), the
physical address of the MAC was exposed to userspace in two places: via
sysfs and via SIOCGIFMAP. While this is not best practice, it is an
external ABI which is in use by userspace software.

The aforementioned commit inadvertently modified these addresses and
made them virtual. This constitutes and ABI break.  Additionally, it
leaks the kernel's memory layout to userspace. Partially revert that
commit, reintroducing the resource back into struct mac_device, while
keeping the intended changes (the rework of the address mapping).

Fixes: 262f2b782e25 ("net: fman: Map the base address once")
Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Acked-by: Madalin Bucur &lt;madalin.bucur@oss.nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: dpaa: Adjust queue depth on rate change</title>
<updated>2022-09-05T13:27:39Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-09-02T21:57:36Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ef2a8d5478b9ad653c318bdbb4f6e7f46c90f90b'/>
<id>urn:sha1:ef2a8d5478b9ad653c318bdbb4f6e7f46c90f90b</id>
<content type='text'>
Instead of setting the queue depth once during probe, adjust it on the
fly whenever we configure the link. This is a bit unusal, since usually
the DPAA driver calls into the FMAN driver, but here we do the opposite.
We need to add a netdev to struct mac_device for this, but it will soon
live in the phylink config.

I haven't tested this extensively, but it doesn't seem to break
anything. We could possibly optimize this a bit by keeping track of the
last rate, but for now we just update every time. 10GEC probably doesn't
need to call into this at all, but I've added it for consistency.

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fman: Change return type of disable to void</title>
<updated>2022-09-05T13:27:39Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-09-02T21:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=901bdff2f529d8a33d9a2b88caa7bfb9fad14c52'/>
<id>urn:sha1:901bdff2f529d8a33d9a2b88caa7bfb9fad14c52</id>
<content type='text'>
When disabling, there is nothing we can do about errors. In fact, the
only error which can occur is misuse of the API. Just warn in the mac
driver instead.

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fman: Clean up error handling</title>
<updated>2022-09-05T13:27:39Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-09-02T21:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aedbeb4e597e9f6202d36e249f1027138a764a67'/>
<id>urn:sha1:aedbeb4e597e9f6202d36e249f1027138a764a67</id>
<content type='text'>
This removes the _return label, since something like

	err = -EFOO;
	goto _return;

can be replaced by the briefer

	return -EFOO;

Additionally, this skips going to _return_of_node_put when dev_node has
already been put (preventing a double put).

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fman: Specify type of mac_dev for exception_cb</title>
<updated>2022-09-05T13:27:39Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-09-02T21:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=5b6acb554065e9e0a8e93f17573afeae1e121844'/>
<id>urn:sha1:5b6acb554065e9e0a8e93f17573afeae1e121844</id>
<content type='text'>
Instead of using a void pointer for mac_dev, specify its type
explicitly.

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fman: Use mac_dev for some params</title>
<updated>2022-09-05T13:27:39Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-09-02T21:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=19c788b144e2751a221fd64c6db6ce1b98506c0d'/>
<id>urn:sha1:19c788b144e2751a221fd64c6db6ce1b98506c0d</id>
<content type='text'>
Some params are already present in mac_dev. Use them directly instead of
passing them through params.

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fman: Pass params directly to mac init</title>
<updated>2022-09-05T13:27:39Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-09-02T21:57:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c6b7b1b515080aaa1e1e72328c758478dc32d82a'/>
<id>urn:sha1:c6b7b1b515080aaa1e1e72328c758478dc32d82a</id>
<content type='text'>
Instead of having the mac init functions call back into the fman core to
get their params, just pass them directly to the init functions.

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fman: Map the base address once</title>
<updated>2022-09-05T13:27:39Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-09-02T21:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=262f2b782e255b7959b6b8fdfd9347558a7003a2'/>
<id>urn:sha1:262f2b782e255b7959b6b8fdfd9347558a7003a2</id>
<content type='text'>
We don't need to remap the base address from the resource twice (once in
mac_probe() and again in set_fman_mac_params()). We still need the
resource to get the end address, but we can use a single function call
to get both at once.

While we're at it, use platform_get_mem_or_io and devm_request_resource
to map the resource. I think this is the more "correct" way to do things
here, since we use the pdev resource, instead of creating a new one.
It's still a bit tricky, since we need to ensure that the resource is a
child of the fman region when it gets requested.

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: fman: Remove internal_phy_node from params</title>
<updated>2022-09-05T13:27:39Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@seco.com</email>
</author>
<published>2022-09-02T21:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=45fa34bfaa52737b3d1c77ad31044c8fd4f4698a'/>
<id>urn:sha1:45fa34bfaa52737b3d1c77ad31044c8fd4f4698a</id>
<content type='text'>
This member was used to pass the phy node between mac_probe and the
mac-specific initialization function. But now that the phy node is
gotten in the initialization function, this parameter does not serve a
purpose. Remove it, and do the grabbing of the node/grabbing of the phy
in the same place.

Signed-off-by: Sean Anderson &lt;sean.anderson@seco.com&gt;
Acked-by: Camelia Groza &lt;camelia.groza@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
