On 17/04/2021 01.07, Matthew Wilcox (Oracle) wrote:
> 32-bit architectures which expect 8-byte alignment for 8-byte integers
> and need 64-bit DMA addresses (arc, arm, mips, ppc) had their struct
> page inadvertently expanded in 2019. When the dma_addr_t was added,
> it forced the alignment of the
On 18/04/2021 23.26, Christophe JAILLET wrote:
> Improve 'create_workqueue', 'create_freezable_workqueue' and
> 'create_singlethread_workqueue' so that they accept a format
> specifier and a variable number of arguments.
>
> This will put these macros more in line with 'alloc_ordered_workqueue' an
Hi,
I noticed that gfar_of_init() has
if (of_device_is_compatible(np, "fsl,etsec2")) {
mode = MQ_MG_MODE;
poll_mode = GFAR_SQ_POLLING;
} else {
mode = SQ_SG_MODE;
poll_mode = GFAR_SQ_POLLING;
}
i.e., poll_mod
-qualified argument 1 was declared here
> 464 | char set_link_str[SET_LINK_STR_MAX_LEN] = {0};
>
> Rewrite this to avoid the nested sprintf and instead use separate
> buffers, which is simpler.
>
This looks much better. Thanks.
> Cc: Rasmus Villemoes
> Signed-off-by: Arnd Be
On 23/03/2021 13.56, Arnd Bergmann wrote:
> From: Arnd Bergmann
>
> With extra warnings enabled, gcc complains that snprintf should not
> take the same buffer as source and destination:
>
> drivers/net/ethernet/huawei/hinic/hinic_ethtool.c: In function
> 'hinic_set_settings_to_hw':
> drivers/ne
;ugeth_primary_info, sizeof(*ug_info), GFP_KERNEL);
> if (ug_info == NULL)
> return -ENOMEM;
> - memcpy(ug_info, &ugeth_primary_info, sizeof(*ug_info));
>
> ug_info->uf_info.ucc_num = ucc_num;
>
>
Ah, yes, of course, I should have used that.
Acked-by: Rasmus Villemoes
chdev API to offload MRP")
> Signed-off-by: Horatiu Vultur
Acked-by: Rasmus Villemoes
th the switchdev API")
> Fixes: fadd409136f0f2 ("bridge: switchdev: mrp: Implement MRP API for
> switchdev")
> Fixes: 2f1a11ae11d222 ("bridge: mrp: Add MRP interface.")
> Reported-by: Rasmus Villemoes
> Signed-off-by: Horatiu Vultur
> ---
Tested-by: Rasmus Villemoes
On 30/01/2021 04.01, Jakub Kicinski wrote:
> On Wed, 27 Jan 2021 21:52:37 +0100 Horatiu Vultur wrote:
>> This patch series extends MRP switchdev to allow the SW to have a better
>> understanding if the HW can implement the MRP functionality or it needs
>> to help the HW to run it. There are 3 cases
ias Waldekranz
Signed-off-by: Rasmus Villemoes
---
drivers/net/dsa/mv88e6xxx/chip.c| 2 +-
drivers/net/dsa/mv88e6xxx/global1.h | 2 --
drivers/net/dsa/mv88e6xxx/global1_vtu.c | 33 +++--
3 files changed, 5 insertions(+), 32 deletions(-)
diff --git a/drivers/net/
->handled stays false, so
the logic in switchdev_port_obj_notify() can propagate that
information.
Fixes: f30f0601eb93 ("switchdev: Add helpers to aid traversal through lower
devices")
Reviewed-by: Petr Machata
Signed-off-by: Rasmus Villemoes
---
v2: reword commit message to make it
On 19/01/2021 16.52, Andrew Lunn wrote:
> On Tue, Jan 19, 2021 at 09:32:40AM +0100, Horatiu Vultur wrote:
>> The 01/18/2021 21:27, Vladimir Oltean wrote:
>>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
>>> content is safe
>>>
>>> On Mon, Jan 18, 2021 at 09:20:36PM +0
Waldekranz
Tested-by: Tobias Waldekranz
Reviewed-by: Florian Fainelli
Signed-off-by: Rasmus Villemoes
---
drivers/net/dsa/mv88e6xxx/chip.c| 2 +-
drivers/net/dsa/mv88e6xxx/global1.h | 2 --
drivers/net/dsa/mv88e6xxx/global1_vtu.c | 36 ++---
3 files changed, 3
v2:
- resend now that the bug-fix patch (87fe04367d84, "net: dsa:
mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext") is in
net and also merged to net-next.
- include various tags in patch 1.
- add second similar patch for loadpurge.
Rasmus Villemoes (2):
net: dsa:
On 22/01/2021 10.05, Horatiu Vultur wrote:
> The 01/22/2021 00:43, Rasmus Villemoes wrote:
>>
>> It's not true that switchdev_port_obj_notify() only inspects the
>> ->handled field of "struct switchdev_notifier_port_obj_info" if
>> call_switchdev_block
hdev_port_obj_notify() can propagate that information.
Fixes: f30f0601eb93 ("switchdev: Add helpers to aid traversal through lower
devices")
Signed-off-by: Rasmus Villemoes
---
Resending with more folks on cc and a tentative fixes tag.
net/switchdev/switchdev.c | 23 +---
On 21/01/2021 22.23, Horatiu Vultur wrote:
> The 01/21/2021 21:40, Rasmus Villemoes wrote:
>
> It seems that is missing a Fixes tag, other than that it looks fine.
That would be these two I guess:
Fixes: 2801758391ba ("bridge: uapi: mrp: Extend MRP attributes for MRP
interc
v2: update commit log of the patch to include comments on 32 bit
alignment; include second patch moving the structs out of uapi.
Rasmus Villemoes (2):
net: mrp: fix definitions of MRP test packets
net: mrp: move struct definitions out of uapi
include/uapi/linux/mrp_bridge.h | 86
fact, most of these structs are unused in the kernel, so only keep
the few that are actually referenced in the kernel code, and move them
to the br_private_mrp.h header.
Signed-off-by: Rasmus Villemoes
---
include/uapi/linux/mrp_bridge.h | 86 -
net/bridge/br_pri
tibility issues.
Signed-off-by: Rasmus Villemoes
---
include/uapi/linux/mrp_bridge.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/mrp_bridge.h b/include/uapi/linux/mrp_bridge.h
index 6aeb13ef0b1e..d1d0cf65916d 100644
--- a/include/uapi/linux/mrp_br
On 20/01/2021 07.57, Christophe Leroy wrote:
>
>
> Le 19/01/2021 à 16:07, Rasmus Villemoes a écrit :
>> These fields are only used within ucc_geth_startup(), so they might as
>> well be local variables in that function rather than being stashed in
>> struct ucc_get
On 20/01/2021 08.17, Christophe Leroy wrote:
>
> Le 19/01/2021 à 16:07, Rasmus Villemoes a écrit :
>> The bd_mem_part member of ucc_geth_info always has the value
>> MEM_PART_SYSTEM, and AFAICT, there has never been any code setting it
>> to any other value. Moreover, mura
On 20/01/2021 08.02, Christophe Leroy wrote:
>
>> @@ -3715,25 +3713,23 @@ static int ucc_geth_probe(struct
>> platform_device* ofdev)
>> if ((ucc_num < 0) || (ucc_num > 7))
>> return -ENODEV;
>> - ug_info = &ugeth_info[ucc_num];
>> - if (ug_info == NULL) {
>> - if (ne
Allow passing const-qualified pointers without requiring a cast in the
caller.
Signed-off-by: Rasmus Villemoes
---
drivers/soc/fsl/qe/qe_common.c | 2 +-
include/soc/fsl/qe/qe.h| 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe_common.c b
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index be997b559577..74ee2ed2fbbb 100644
--- a/drivers/net
; address minor style issues; don't introduce
a use-after-free in patch "don't statically allocate eight
ucc_geth_info".
Rasmus Villemoes (17):
ethernet: ucc_geth: remove unused read of temoder field
soc: fsl: qe: make cpm_muram_offset take a const void* argument
soc: fsl: qe:
In theory, such a read-after-write might be required by the hardware,
but nothing in the data sheet suggests that to be the case. The name
test also suggests that it's some debug leftover.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 3 ---
1 file chang
fixes the
problems with using IS_ERR_VALUE() on a u32 as explained in commit
800cd6fb76f0 ("soc: fsl: qe: change return type of cpm_muram_alloc()
to s32").
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 21 +
drivers/net/ethernet
Reduce the code duplication a bit by moving the parsing of
rx-clock-name and the fallback handling to a helper function.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 80 ++-
1 file changed, 36 insertions(+), 44 deletions(-)
diff --git a
On 28/12/2020 23.24, Jakub Kicinski wrote:
> On Wed, 23 Dec 2020 15:45:32 +0100 Rasmus Villemoes wrote:
>> Wireshark says that the MRP test packets cannot be decoded - and the
>> reason for that is that there's a two-byte hole filled with garbage
>> between the &q
These macros both have the value 32, there's no point first
initializing align to a lower value.
If anything, one could throw in a
BUILD_BUG_ON(UCC_GETH_TX_BD_RING_ALIGNMENT < 4), but it's not worth it
- lots of code depends on named constants having sensible values.
Signed-o
This removes the explicit NULL checks, and allows us to stop storing
at least some of the _offset values separately.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 77 ++-
1 file changed, 33 insertions(+), 44 deletions(-)
diff --git a
a lot of dead code, this is also motivated by
wanting to clean up the "store result from kmalloc() in a u32" mess.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 108 ++
include/soc/fsl/qe/qe.h | 6 --
inc
These buffers have all just been handed out from qe_muram_alloc(), aka
cpm_muram_alloc(), and the helper cpm_muram_alloc_common() already
does
memset_io(cpm_muram_addr(start), 0, size);
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 19
k was dead code, as the
address of some static array element can obviously never be NULL.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 32 +--
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc
Add a helper that takes a virtual address rather than the muram
offset. This will be used in a couple of places to avoid having to
store both the offset and the virtual address, as well as removing
NULL checks from the callers.
Signed-off-by: Rasmus Villemoes
---
drivers/soc/fsl/qe/qe_common.c
ff-by: Rasmus Villemoes
---
drivers/soc/fsl/qe/qe_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c
index 0fbdc965c4cb..303cc2f5eb4a 100644
--- a/drivers/soc/fsl/qe/qe_common.c
+++ b/drivers/soc/f
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index 1e9d2f3f47a3..621a9e3e4b65 100644
--- a
The translation from the ucc_geth_num_of_threads enum value to the
actual count can be written somewhat more compactly with a small
lookup table, allowing us to replace the four switch statements.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 100
that are not really loops by creating static
inline helpers. If and when the numQueuesTx/numQueuesRx fields are
re-introduced, it suffices to update those helper to return the
appropriate field.
This cuts the .text segment of ucc_geth.o by 8%.
Signed-off-by: Rasmus Villemoes
---
drivers/net/eth
ery elegant and certainly makes a reader of the
code pause for a while.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 50 ---
drivers/net/ethernet/freescale/ucc_geth.h | 2 -
2 files changed, 17 insertions(+), 35 deletions(-)
diff --git a/drive
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index 75d1fb049698..65ef7ae38912 100644
--- a/drivers/net
On 18/01/2021 22.19, Vladimir Oltean wrote:
> On Sat, Jan 16, 2021 at 02:42:12AM +0100, Tobias Waldekranz wrote:
>>> What I'm _really_ trying to do is to get my mv88e6250 to participate in
>>> an MRP ring, which AFAICT will require that the master device's MAC gets
>>> added as a static entry in th
with that.
Signed-off-by: Rasmus Villemoes
---
I don't really understand why SWITCHDEV_ATTR_ID_MRP_PORT_STATE even
has to exist seperately from SWITCHDEV_ATTR_ID_PORT_STP_STATE, and
it's hard to tell what the difference might be since no kernel code
implements the former.
On 16/01/2021 02.42, Tobias Waldekranz wrote:
> On Thu, Jan 14, 2021 at 14:49, Rasmus Villemoes
> wrote:
>> Hi
>>
>> I've noticed something rather odd with my mv88e6250, which led me to the
>> commit in the subject.
>>
>> First, the MAC address
On 17/01/2021 22.08, Vladimir Oltean wrote:
> Hi Rasmus,
>
> On Sat, Jan 16, 2021 at 03:39:34AM +0100, Rasmus Villemoes wrote:
>> I finally managed to figure out why enabling VLAN filtering on the
>> 6250 broke all (ingressing) traffic,
>> cf.
>> https://lore.ker
sure to keep them that way when the entry is updated.
Fixes: 92307069a96c (net: dsa: mv88e6xxx: Avoid VTU corruption on 6097)
Signed-off-by: Rasmus Villemoes
---
drivers/net/dsa/mv88e6xxx/global1_vtu.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/net/dsa/mv88e6xxx/global1_vtu.c
mv88e6250_g1_vtu_getnext is almost identical to
mv88e6185_g1_vtu_getnext, except for the 6250 only having 64 databases
instead of 256. We can reduce code duplication by simply masking off
the extra two garbage bits when assembling the fid from VTU op [3:0]
and [11:8].
Signed-off-by: Rasmus
.
Rasmus Villemoes (2):
net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext
net: dsa: mv88e6xxx: use mv88e6185_g1_vtu_getnext() for the 6250
drivers/net/dsa/mv88e6xxx/chip.c| 2 +-
drivers/net/dsa/mv88e6xxx/global1.h | 2 --
drivers/net/dsa/mv88e6xxx/global1_vtu.c
Hi
I've noticed something rather odd with my mv88e6250, which led me to the
commit in the subject.
First, the MAC address of the master device never seems to get learned
(at least according to "mv88e6xxx_dump --atu"), so all packets destined
for the machine gets flooded out all ports - which I ca
ehind a +1000$
paywall can be called a standard.
Signed-off-by: Rasmus Villemoes
---
include/uapi/linux/mrp_bridge.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/mrp_bridge.h b/include/uapi/linux/mrp_bridge.h
index 6aeb13ef0b1e..d1d0cf65916d 100644
-
hdev_port_obj_notify() can propagate that information.
Signed-off-by: Rasmus Villemoes
---
net/switchdev/switchdev.c | 23 +--
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 23d868545362..2c1ffc9ba2eb 100
chip-ung/mrp.git and kernel v5.10.2.
Rasmus Villemoes (2):
net: mrp: fix definitions of MRP test packets
net: switchdev: don't set port_obj_info->handled true when -EOPNOTSUPP
include/uapi/linux/mrp_bridge.h | 4 ++--
net/switchdev/switchdev.c | 23 +--
2 fi
ugeth is the netdiv_priv() part of the netdevice. Accessing the memory
pointed to by ugeth (such as done by ucc_geth_memclean() and the two
of_node_puts) after free_netdev() is thus use-after-free.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 2 +-
1 file
Vladimir Oltean
Reviewed-by: Andrew Lunn
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index 714b501be7d0..380c1f09adaf 10064
t could be attributed to this, but
it seems to be the kind of thing that would be extremely hard to
debug. So extend the struct definition so that we do allocate 192
bytes.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.h | 9 -
1 file changed, 8 insertions(+),
This is three bug fixes that fell out of a series of cleanups of the
ucc_geth driver. Please consider applying via the net tree.
v2: reorder and split off from larger series; add Andrew's R-b to
patch 1; only move the free_netdev() call in patch 3.
Rasmus Villemoes (3):
ethernet: ucc_geth
method, use the existence
of the ->port_setup_message_port method as a proxy for determining
whether the learn2all bit exists (and should be set).
Signed-off-by: Rasmus Villemoes
---
v2: add comment explaining why ->port_setup_message_port is being used.
This doesn't fix anything from what
On 05/12/2020 22.27, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 22:11:39 +0100 Rasmus Villemoes wrote:
>>> Looks like a nice clean up on a quick look.
>>>
>>> Please separate patches 1 and 11 (which are the two bug fixes I see)
>>
>> I think patch 2
On 08/12/2020 16.13, Christophe Leroy wrote:
>
>
> Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit :
>> @@ -3714,25 +3712,23 @@ static int ucc_geth_probe(struct
>> platform_device* ofdev)
>> if ((ucc_num < 0) || (ucc_num > 7))
>> return -
On 08/12/2020 16.21, Christophe Leroy wrote:
>
>
> Le 05/12/2020 à 20:17, Rasmus Villemoes a écrit :
>> The translation from the ucc_geth_num_of_threads enum value to the
>> actual count can be written somewhat more compactly with a small
>> lookup table, allowing us
On 08/12/2020 20.14, Li Yang wrote:
> On Sat, Dec 5, 2020 at 1:21 PM Rasmus Villemoes
> wrote:
>>
>> Table 8-53 in the QUICC Engine Reference manual shows definitions of
>> fields up to a size of 192 bytes, not just 128. But in table 8-111,
>> one does find the te
, use the existence
of the ->port_setup_message_port method as a proxy for determining
whether the learn2all bit exists (and should be set).
Signed-off-by: Rasmus Villemoes
---
This doesn't fix anything from what I can tell, in particular not the
VLAN problems I'm having, so just ta
On 08/12/2020 04.07, Qiang Zhao wrote:
> On 06/12/2020 05:12, Rasmus Villemoes wrote:
>
>> I think patch 2 is a bug fix as well, but I'd like someone from NXP to
>> comment.
>
> It 's ok for me.
I was hoping for something a bit more than that. Can you please
On 06/12/2020 20.45, Vladimir Oltean wrote:
> It would be interesting to see what is the ingress drop reason, if that
> could be deduced from the drop counters that are incrementing in ethtool -S.
I don't see anything obvious from running ethtool -S before/during/after
ping.
> Since you've alrea
> I only noticed because I needed to add a free of the ug_info in a later
> patch.
Where, ironically, I add a use-after-free bug by freeing ug_info before
the ucc_geth_memclean() call.
:facepalm:
On 05/12/2020 22.27, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 22:11:39 +0100 Rasmus Villemoes wrote:
>>> rebase (retest) and post them against the net tree:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
>>
>> So I thought th
On 05/12/2020 22.19, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 22:04:28 +0100 Rasmus Villemoes wrote:
>> On 05/12/2020 21.48, Jakub Kicinski wrote:
>>> On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote:
>>>> - unregister_netdev(dev);
>>>> - f
On 05/12/2020 21.53, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 20:17:23 +0100 Rasmus Villemoes wrote:
>> While trying to figure out how to allow bumping the MTU with the
>> ucc_geth driver, I fell into a rabbit hole and stumbled on a whole
>> bunch of issues of varying
On 05/12/2020 21.48, Jakub Kicinski wrote:
> On Sat, 5 Dec 2020 20:17:34 +0100 Rasmus Villemoes wrote:
>> -unregister_netdev(dev);
>> -free_netdev(dev);
>> ucc_geth_memclean(ugeth);
>> if (of_phy_is_fixed_link(np))
>>
On 05/12/2020 20.03, Vladimir Oltean wrote:
> Hi Rasmus,
>
> On Sat, Dec 05, 2020 at 03:49:02PM +0100, Rasmus Villemoes wrote:
>> So I'm out of ideas. I also tried booting a 5.3, but that had some
>> horrible UBI/nand failure,
>
> Test with a ramdisk maybe?
>
Vladimir Oltean
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index 714b501be7d0..380c1f09adaf 100644
--- a/drivers/net/eth
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index 700eafef4921..a06744d8b4af 100644
--- a/drivers/net
k was dead code, as the
address of some static array element can obviously never be NULL.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 32 +--
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc
ery elegant and certainly makes a reader of the
code pause for a while.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 50 ---
drivers/net/ethernet/freescale/ucc_geth.h | 2 -
2 files changed, 17 insertions(+), 35 deletions(-)
diff --git a/drive
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index c9f619908561..3aebea191b52 100644
--- a
a lot of dead code, this is also motivated by
wanting to clean up the "store result from kmalloc() in a u32" mess.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 106 ++
include/soc/fsl/qe/qe.h | 6 --
inc
that are not really loops by creating static
inline helpers. If and when the numQueuesTx/numQueuesRx fields are
re-introduced, it suffices to update those helper to return the
appropriate field.
This cuts the .text segment of ucc_geth.o by 8%.
Signed-off-by: Rasmus Villemoes
---
drivers/net/eth
The translation from the ucc_geth_num_of_threads enum value to the
actual count can be written somewhat more compactly with a small
lookup table, allowing us to replace the four switch statements.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 100
These macros both have the value 32, there's no point first
initializing align to a lower value.
If anything, one could throw in a
BUILD_BUG_ON(UCC_GETH_TX_BD_RING_ALIGNMENT < 4), but it's not worth it
- lots of code depends on named constants having sensible values.
Signed-o
fixes the
problems with using IS_ERR_VALUE() on a u32 as explained in commit
800cd6fb76f0 ("soc: fsl: qe: change return type of cpm_muram_alloc()
to s32").
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 21 +
drivers/net/ethernet
ugeth is the netdiv_priv() part of the netdevice. Accessing the memory
pointed to by ugeth (such as done by ucc_geth_memclean() and the two
of_node_puts) after free_netdev() is thus use-after-free.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 4 ++--
1 file
Reduce the code duplication a bit by moving the parsing of
rx-clock-name and the fallback handling to a helper function.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 79 ++-
1 file changed, 35 insertions(+), 44 deletions(-)
diff --git a
This removes the explicit NULL checks, and allows us to stop storing
at least some of the _offset values separately.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 77 ++-
1 file changed, 33 insertions(+), 44 deletions(-)
diff --git a
These buffers have all just been handed out from qe_muram_alloc(), aka
cpm_muram_alloc(), and the helper cpm_muram_alloc_common() already
does
memset_io(cpm_muram_addr(start), 0, size);
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 19
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c
b/drivers/net/ethernet/freescale/ucc_geth.c
index f854ff90f238..e1574c14b7e5 100644
--- a/drivers/net
t could be attributed to this, but
it seems to be the kind of thing that would be extremely hard to
debug. So extend the struct definition so that we do allocate 192
bytes.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.h | 9 -
1 file changed, 8 insertions(+),
In theory, such a read-after-write might be required by the hardware,
but nothing in the data sheet suggests that to be the case. The name
test also suggests that it's some debug leftover.
Signed-off-by: Rasmus Villemoes
---
drivers/net/ethernet/freescale/ucc_geth.c | 3 ---
1 file chang
tch 2, someone in NXP should check how the hardware actually
works and make an updated reference manual available.
Rasmus Villemoes (20):
ethernet: ucc_geth: set dev->max_mtu to 1518
ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram
ethernet: ucc_geth: remove unused read of
These warnings become somewhat more informative when they include the
MTU value that could not be set and not just the errno.
Signed-off-by: Rasmus Villemoes
---
net/dsa/master.c | 7 ---
net/dsa/slave.c | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/net/dsa
On 05/12/2020 16.45, Russell King - ARM Linux admin wrote:
> On Sat, Dec 05, 2020 at 03:49:02PM +0100, Rasmus Villemoes wrote:
>> So, I found out that the problem disappers when I disable
>> vlan_filtering, and googling then led me to Russell's patches from
>&
On 30/11/2020 23.13, Rasmus Villemoes wrote:
> On 30/11/2020 17.04, Vladimir Oltean wrote:
> Thanks, but I don't think that will change anything. -34 is -ERANGE.
>> But you might also want to look into adding .ndo_change_mtu for
>> ucc_geth.
>
> Well, that
On 30/11/2020 23.35, Vladimir Oltean wrote:
> On Mon, Nov 30, 2020 at 11:13:39PM +0100, Rasmus Villemoes wrote:
>> FWIW, on a 4.19 kernel, I can do 'ping -s X -M do' for X up to 1472
>> for IPv4 and 1452 for IPv6, but I don't think that tells me much about
>>
On 30/11/2020 17.04, Vladimir Oltean wrote:
> Hi Rasmus,
>
> On Mon, Nov 30, 2020 at 03:30:50PM +0100, Rasmus Villemoes wrote:
>> Hi,
>>
>> Updating our mpc8309 board to 5.9, we're starting to get
>>
>> [0.709832] mv88e6085 mdio@e0102120:10:
Hi,
Updating our mpc8309 board to 5.9, we're starting to get
[0.709832] mv88e6085 mdio@e0102120:10: nonfatal error -34 setting
MTU on port 0
[0.720721] mv88e6085 mdio@e0102120:10: nonfatal error -34 setting
MTU on port 1
[0.731002] mv88e6085 mdio@e0102120:10: nonfatal error -34 settin
On 27/08/2020 13.14, Heiner Kallweit wrote:
> On 27.08.2020 13:00, Rasmus Villemoes wrote:
>> On 27/08/2020 12.29, Heiner Kallweit wrote:
>>> On 27.08.2020 12:08, Rasmus Villemoes wrote:
>>>> Hi,
>>>>
>>>> We have a requirement that when an
On 27/08/2020 12.29, Heiner Kallweit wrote:
> On 27.08.2020 12:08, Rasmus Villemoes wrote:
>> Hi,
>>
>> We have a requirement that when an interface is taken down
>> administratively, the phy should be powered off. That also works when
>> the interface has link w
Hi,
We have a requirement that when an interface is taken down
administratively, the phy should be powered off. That also works when
the interface has link when the 'ip link set down ...' is run. But if
there's no cable plugged in, the phy stays powered on (as can be seen
both using phytool, and f
On 14/08/2020 17.14, Christian Lamparter wrote:
> On 2020-08-14 13:39, Lee Jones wrote:
>> 'ar9170_qmap' is used in some source files which include carl9170.h,
>> but not all of them. Mark it as __maybe_unused to show that this is
>> not only okay, it's expected.
>>
>> Fixes the following W=1 kern
On 07/08/2020 05.39, Stephen Hemminger wrote:
> On Thu, 6 Aug 2020 12:46:43 +0300
> Nikolay Aleksandrov wrote:
>
>> On 06/08/2020 12:17, Rasmus Villemoes wrote:
>>> On 06/08/2020 01.34, Stephen Hemminger wrote:
>>>> On Wed, 5 Aug 2020 16:25:23 +0200
1 - 100 of 159 matches
Mail list logo