Patch "nfp: fill splittable of devlink_port_attrs correctly" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    nfp: fill splittable of devlink_port_attrs correctly

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfp-fill-splittable-of-devlink_port_attrs-correctly.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c88db5ce639a64a23f0ab55f6ca217d60e144590
Author: Diana Wang <na.wang@xxxxxxxxxxxx>
Date:   Thu Nov 17 16:37:43 2022 +0100

    nfp: fill splittable of devlink_port_attrs correctly
    
    [ Upstream commit 4abd9600b9d15d3d92a9ac25cf200422a4c415ee ]
    
    The error is reflected in that it shows wrong splittable status of
    port when executing "devlink port show".
    The reason which leads the error is that the assigned operation of
    splittable is just a simple negation operation of split and it does
    not consider port lanes quantity. A splittable port should have
    several lanes that can be split(lanes quantity > 1).
    If without the judgement, it will show wrong message for some
    firmware, such as 2x25G, 2x10G.
    
    Fixes: a0f49b548652 ("devlink: Add a new devlink port split ability attribute and pass to netlink")
    Signed-off-by: Diana Wang <na.wang@xxxxxxxxxxxx>
    Reviewed-by: Louis Peens <louis.peens@xxxxxxxxxxxx>
    Reviewed-by: Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx>
    Signed-off-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
index 405786c00334..cb08d7bf9524 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_devlink.c
@@ -341,7 +341,7 @@ int nfp_devlink_port_register(struct nfp_app *app, struct nfp_port *port)
 		return ret;
 
 	attrs.split = eth_port.is_split;
-	attrs.splittable = !attrs.split;
+	attrs.splittable = eth_port.port_lanes > 1 && !attrs.split;
 	attrs.lanes = eth_port.port_lanes;
 	attrs.flavour = DEVLINK_PORT_FLAVOUR_PHYSICAL;
 	attrs.phys.port_number = eth_port.label_port;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux